MPE & release velocity
Hi,
I am looking for a way to create MPE notes that have a certain release velocity with a Max for Live device - as release velocity being one of the 5 per note expressions (data) that MPE supports.
Looking at the Cycling 74 sample "Envelope to MPE" (see :https://www.ableton.com/en/blog/live-11-and-max-for-live-get-a-glimpse-of-whats-possible-with-some-free-devices/ ) I figured out pressure, slide and glide (note-on velocity used as in normal MIDI), but I cannot imagine an "easy way" how to apply release velocity.
As midiformat (and other MIDI related Max objects) has no explicit "note-off" inlet, but uses a velocity of 0 instead to specify a note off. I know this conforms to the MIDI standard and its fine as long as no MPE is involved.
My first idea was to manually create a note-off message (a raw 3 byte sequence : [128 + midi channel] [pitch / midi note number] [release velocity], see : https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message) and send it to midiout, but the problem is, that I see no way how to know on which channel the MIDI note is playing respectively "was routed to by Live".
This is something that Mattijs Kneppers from Cycling ‘74 (developer of the demo devices mentioned above - really great ones & a great source of inspiration !) mentiones in one of his comments in the Max patch "Envelope to MPE".
I copied these comments in my attached research device - it states "Note that Live's MPE implementation will re-order notes to available MIDI channels anyway, so there is no need to rotate channels here."
In other words : after sending MPE note data into midiout, the MIDI channel the note will be played on (will be channel 2 to 16, as channel 1 is always the Master in Live), will be chosen (or changed if we would have set one through midiformat 7th inlet) by Live and this is "post device" - hence we have no way (?) to get aware of the channel the note was routed to ... as least as I understand.
Hence no way to use a manual "raw bytes" note-off message to create a release velocity.
Any ideas?
And by the way : if you record the MPE note data generated by the attached device in Live on another MIDI track, you will see that a default release velocty of 64 is set respectively "recorded out of nowhere" ;-).
I am not live user, and can't tell much about it's limitations
but in max mpeformat / mpeparse can use note off with release velocity.
simply as that, send raw bytes (itered ) to mpefromat.
trash unpack i i in max examples , because that hides 3rd byte...

Thanks for the ask, Soundyi, and thanks for the answer, SA! Can confirm this method works for release velocity in Ableton (though it took some hunting to find a device / VST that supported it -- ended up using Serum VST). Basically:
143, <note>, <releasevel>
|
[mpeformat] (with appropriate input channel as input)
|
[midiout]
Thanks @Source Audio ... it works ... brilliant finding !!
I updated the research device, so others can easily follow along - in a nutshell its just appending a 3rd byte to the normal "Pitch Velocity" message that we are used to send into midiformat.
In case of the Note-On event, just append a 0 (does nothing, but just to be consistent) and for the Note-Off event append the aimed release velocity as the 3rd byte respectively value to the message ... and it works.
I also tested it for chords to be sure this "hack around" (aka found & use of an undocumented feature ;-) works also when notes get routet and played on other channels than the first "MPE note channel".
Or in other words : this work also when several MPE notes are played simultaneously and hence get routet on different MIDI channel (2 to 16).