note busy status bit

Jul 27, 2013 at 7:56am

note busy status bit

Hi to everyone,
I want to create some variables to keep track of which notes are currently generated by a patch.
Let’s say I take note in info up to a poly object (not poly~). Let’s say my synth is for a guitar so it has a max polyphony of 6 notes. If I press one key, the corresponding bit of the string played should turn on (to 1) and reset (back to 0) when noteoff message is received.

In total I want to have six bit registers.

I tried to have this simple bit working but seems I can’t find a way to route the noteoff message properly. I know it will be the same note (of the note on last message) with velocity 0.

Any ideas on making this working

m

#257313
Jul 28, 2013 at 3:36am

<code>

– Pasted Max Patch, click to expand. –

</code>

#257346
Jul 28, 2013 at 5:28am

it might be easier to do that _outside_ the poly~.

a very basic version of counting the number of running notes would be to let
any note-on-event send 1 to accum, and any note-off-event send -1 to accum.

“60 127, 60 0″
[zl ecils 1]
[expr ($i1!=0) - ($i1==0)]
[t b i]
[accum]

#257351
Jul 28, 2013 at 6:09am

don’t forget [borax]

#257352
Jul 28, 2013 at 12:58pm

thank you everyone for examples/suggestions. spectro’s solution is just the thing i needed.

m

#257374

You must be logged in to reply to this topic.