Monophonic MIDI note-off conundrum
I'm fairly new to max so apologies well in advance if this is a time waster. I have tried very hard before resorting to the forums.
I have a monophonic midi keyboard. I want to be able slur notes. To do this i've decided that I want a gate to close only when the most recent midi pitch value to be issued that has a velocity of more than 0 is then given a velocity of 0. The effect being that the most recent pitch to sound won't be silenced if another key that was pressed before it is then released.
At the moment, when key x is press and then y is press before releasing key x, and then key x is released the note-off value overrides key y.
I imagine there's a very easy solution that I'm just not seeing.
I've experimented with the route, select, zlselect, packing and unpacking this and that....This is my more recent attempt at solving it. I'm trying to use a series of sluice messages to differentiate between pitch values with velocities over 0 and and those those that aren't, then, using [if], compare that to the values I'm actually getting from the [notein].
It almost sounds like you want your mono kybd to function in a pseudo polyphonic manner, am I right? I haven't yet looked at your patch, but I would imagine that the [route] object would fit well here, but you could alternatively use the [poly] (no tilde) object here to separate out note voice numbers.
Brendan
Thanks Brendan.
That's exactly what I want to do.
In fact I made a poly alternative but what I'm having problems with is getting the signal to stop when I note off.
That's sounds very easy but I've not been so successful in my previous experiments with route.
Maybe try the frequently overlooked [Borax] and use the "number of notes currently active" count to ensure the second note is not turned off prematurely by the first note.
PS you don't need a midin connected to a notein. You can directly get MIDI note messages from whichever port notein is set to...
Hey, did you do any more work on this?
Thanks
the ddg.mono object solved my problem: https://cycling74.com/forums/legato-synth-problems