Midi IN NOTE OFF is sending 64 instead of 0

Hi All, I am experimenting with codebox in max/gen for midi in. I can declare a Param in Codebox for example:
Param midi_vel10 (0, min=0, max=127);

when I upload to Daisy Patch and take a look at the parameter window I can see the correct variable in my list of values. When I send notes to the daisy with midi all velocity values are displayed correctly from 1-127. However when I release the note I get a velocity of 64 instead of a 0.
Can someone explain what I am doing wrong please?
The same also happens when you use a param object inside gen~instead of codebox.

I’ve just recently started experimenting with MIDI in Oopsy, and have had the same results. I know next to nothing about MIDI, so I’m anxious to learn how to implement it correctly. I’ve studied the MIDI io example, but am sure to be missing something…

MIDI Note Off messages have a velocity byte but do not require a velocity of zero. “Release Velocity” is actually an expressive parameter on a handful of controllers (usually MPE controllers and such) but it’s rarely used by synths. Is there a reason you need to receive varying Note Off velocity?

My guess is that the gen~/oopsy MIDI Note Off messages simply use a hard-coded velocity of 64. It might be possible to change this but it’s hard to say without seeing more of the patch.

One other thought - I wonder if you might be thinking of the convention where Note On messages with a velocity of zero are treated as Note Off? As long as the message status byte is actually Note Off and not Note On, then the third byte (velocity) can be anything - and as I said before, generating and/or interpreting “release velocity” is fairly rare so the vast majority of synths simply ignore it and the vast majority of controllers simply send a hard coded value (often nonzero).

2 Likes

thanks so much for your help. This makes total sense to me now. My mistake, I was looking for a zero as note off when actually the status byte is a note off already. Great!