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
----------begin_max5_patcher---------- 548.3ocyWssaiBCD8Y3qvxOyFgs45919cTUU4.dScWhMBbZS2p9uu1FxVRVR glMXEjBVdXXly43wiIu46AWK2yZgfuCtC348lumm0jwfW+bO3V59hJZq0MnR tYSECFz8nZpp3QtXyCMrBUWXvYQqRzWwIA.bT1pP8P3g6f6+6K1P2xTrlGXB 5Zc.0uaX+yD61xEULkMgndi7Ra5kqe5ajH3GdJ2oN00NSpWqYcHBxEZrcu4g u66atEb0HKAuhnuvYKEYww2LjEkluJdw3I41gm3TaEbJdoHKJ4lgrow1BXxh saEEdCsa0xrEgl4thkB1K57cHaJ1dK4fM5Lv.H.FP.QfXPxj5.JK0LnW6sBA ZfP7SoPIzRgMx+ngSqfiICo+qLbltUoCBbK+21.iL48LpCL3L+tlRVMs3WfP .ZZkJxVqfHC5KbAxEdjix97plYKWWSYQHULtXRQgzU8n6ebgUOi0qXb4f7Ek CydqfiFtpkMxpWmw1q7tZl7zKUeFobAcl5kn+aAROTwaOQnrHVaWb5mHZIsw 9wpWqbWSwgbzudB9f2krVEWPUboXnOjib5QdYISLryaIu0zL1pBgitL9UfCZ NvA4D3DOC0I2YhS7bDmPmBG7TvIwovgLAbvDmBmnofSrSgS7Dvw7u1bDbHyX ik6DGzbfCwsvAOC3bIMA6NwfVW+LqosOjVjnOY8IYiYZRfcJWzM0FQXC6Y9A +y7MQ6c++n55KSB -----------end_max5_patcher-----------
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]
don’t forget [borax]
thank you everyone for examples/suggestions. spectro’s solution is just the thing i needed.