How to make patch overriding ordinary behavior of release and sus pedal?

I’d like my patch to override ordinary behavior of key releases and sus pedal, so I could put my own blocks of script for these events. How it can be done? What should I do either in the patch itself or in the script? Let me emphasize, that it’s not mere discarding (filtering out) of key releases and CC64. I still need this events going to engine, but I’d like them to do not typical actions, but custom ones.

Hi @olmerk

Turn off the sustain in program settings.


The CC64 will not be filtered out but it will stop from sustaining the notes automatically. You will be able to handle it with onController as any other controllers.

To override the key release use the onRelease
It’s up to you if you want to post the release event or do something else.

The important thing is to turn off the sustain. Then the onRelease will be called when the key is released regardless of the sustain pedal is pressed or not.