I now understand how grab_midi works : the live.object connected to the push returns received_midi messages.
But unfortunately it's doesn't give more than the grab_control --> Button_Matrix method :
it returns only notes, without any mpe data.
here is an audio effect M4L device with a stripped down example :
grab_control --> Button_Matrix : get played notes [velocity column row]
send back the correct data to control Push leds
grab_midi : get played notes as raw midi data (without mpe)
+ an example of using pxspr.midiin to get all mpe data.
I would really love to not rely on this external...
https://www.dropbox.com/scl/fi/2ya88l4e ... lao65&dl=0
From memory if you set the device to be MPE Enabled and then grab the MIDI there was some MPE Information in the MIDI flow
I would love to see that

my example is au audio effect device, so I guess that live.thisdevice @is_mpe 1 is meaningless...
but the exact same patch in a Max MIDI Effect or Max Instrument returns the exact same midi data (no mpe)