free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.73k stars 98 forks source link

Document MIDI sustain/damper pedal behaviour with CLAP dialect #307

Closed nakst closed 1 year ago

nakst commented 1 year ago

For CLAP_NOTE_DIALECT_CLAP, should the host send CLAP_EVENT_NOTE_OFF events if a note is released but the MIDI sustain/damper pedal is held? Or it is the plugin's responsibility to parse CLAP_EVENT_MIDI events to implement the sustain/damper pedal behaviour for the CLAP note dialect? And could this be added to the relevant documentation in the header files.

baconpaul commented 1 year ago

I believe that it is the plugins responsibility to parse the EVENT_MIDI for CC 65 64 yes, and that the host should send note off when the physical note is released independent of damper. I would love to know if my colleagues agree.

robbert-vdh commented 1 year ago

The host should not send different events in the presence of MIDI CC 65 64. If the plugin doesn't support MIDI events, the nit simply doesn't receive MIDI CCs. The fact that MIDI CC 65 64 is used for sustain pedals and that sustain pedals typically delay a note's release are just conventions.

baconpaul commented 1 year ago

agree

abique commented 1 year ago

There might be a minimal midi clap host which just pass through raw midi.

My point is that you should write your plugin in a robust way and deal with CC64. If the host takes care of CC64, then it'll delay the note off for you and it won't conflict with your sustain pedal code.

baconpaul commented 1 year ago

There might be a minimal midi clap host which just pass through raw midi.

I think all hosts other than Bitwig are such hosts, actually, right now!