[Solved] Inconsistent midi event message between midiparse and midiformat objects
Hello !
I was making a patch manipulating MIDI and I noticed a weird behaviour : if I feed all the outputs of midiparse into midiformat, the midievent messages are slightly different : the note release event 128 for VST is changed into a 144 event with a velocity of zero.
I did not notice any bug due to that (yet) in my patches but I'm a bit worried anyway : do you guys have an explanation for this ?
Have a good day/night !
Here is a minimal patch :
i dont know what a "note release event for 128" is or why midiparse shows 128, but "144" would be correct for note event"" on channel 1
Oh I see ! Thank you for the answer !
Well 0x80 (aka 128) seems to be considered as NoteOff message for many VSTs. And 0x90 (aka 144) is supposed to be the note on. So on the patch I sent, note off messages (let's use MIDI note 69) in max (a couple 69 0) are considered as NoteOff message (128 69 0) by midiparse and as a NoteOn message with velocity 0 (144 69 0) by midiformat.
Is this behaving the same way at your place ?
I also started to mess arround with MIDI (which was my initial intent) and I actually observed that a lot of notes are indeed not released. Maybe I did something wrong but the patch I sent is very minimal and I have no idea what I did wrong there...
oh well maybe you are sending 128 into max, that can of course be.
it kind of makes sense that midiparse doesnt make a difference between that and velocity 0, as midi devices would do the same.
if you for some reason need to produce 128, just send raw bytes to midiout. but i dont think there is any device or software which would not understand "60 0".
Thank you for your answer !
The thing is : I'm not sending any 128 message. Though the output after midiformat is not the same even though I sent exactly the output of midiparse. As I was suprised, I checked the MIDI event and noticed they were indeed not the same (cf patch)
Oh wait I just understood better your answer : are you saying I'm parsing a 128 event ? That would be strange since I'm directly feeding midi from Ableton Live and a MIDI keyboard but that could be indeed
I can confirm that Ableton Live sends note off with release velocity (128).
Thank you @broc . So I guess there is a bug either in midiformat or midiparse, because midiformat should definitely send a note off (128) event and not a note on (144) with velocity 0.
No bug. Output from midiparse exactly reflects its input and midiformat is not designed to send note off with release velocity (128). For this you need to use [xnoteout].
in a way it is consistent; midiparse also only shows 128 under "other".
these "others" in midiformat are when you not use it and go directly to an output object....
OK thank you so much both of you I got it !
That's really interesting