I built a small CLAP test plugin that simply passes through the following midi events: note on/off, midi cc, channel aftertouch and pitchbend.
The CLAP plugin works fine in REAPER and Bitwig.
But no midi is sent out from the VST3 wrapped plugin when using CLAP_EVENT_MIDI events. Note on/off, however, does work if using CLAP_EVENT_NOTE_ON/OFF.
One note port is definied the the CLAP plugin, with supported_dialects set to "CLAP_NOTE_DIALECT_CLAP" and "CLAP_NOTE_DIALECT_MIDI", and preferred_dialect is set to "CLAP_NOTE_DIALECT_CLAP".
Plugin features are set to "CLAP_PLUGIN_FEATURE_INSTRUMENT" and "CLAP_PLUGIN_FEATURE_NOTE_EFFECT".
Question: Is there a specific setting in the VST3 wrapper that must be enabled to support CLAP_EVENT_MIDI for outgoing MIDI events? Or is something wrong with the port setup or plugin features?
Code to send CLAP_EVENT_MIDI events:
FillChar(event_midi, SizeOf(event_midi), 0);
event_midi.header.Size := SizeOf(event_midi);
event_midi.header.time := RawMidiData.Offset;
event_midi.header.space_id := CLAP_CORE_EVENT_SPACE_ID;
event_midi.header._type := CLAP_EVENT_MIDI;
event_midi.data[0] := RawMidiData.Byte0;
event_midi.data[1] := RawMidiData.Byte1;
event_midi.data[2] := RawMidiData.Byte2;
OutputEvents.try_push(OutputEvents, @event_midi);
Code to send CLAP_EVENT_NOTE_ON/OFF (and this works!):
FillChar(event_note, SizeOf(event_note), 0);
event_note.header.Size := SizeOf(event_note);
event_note.header.time := ClapNoteData.Offset;
event_note.header.space_id := CLAP_CORE_EVENT_SPACE_ID;
event_note.header._type := ClapNoteData.EventType;
event_note.note_id := ClapNoteData.NoteID;
event_note.port_index:= ClapNoteData.PortIndex;
event_note.channel := ClapNoteData.Channel;
event_note.key := ClapNoteData.Key;
event_note.velocity := ClapNoteData.Velocity;
OutputEvents.try_push(OutputEvents, @event_note);
Using Visual Studio Community 2022 to compile the VST3 wrapper.
I built a small CLAP test plugin that simply passes through the following midi events: note on/off, midi cc, channel aftertouch and pitchbend.
The CLAP plugin works fine in REAPER and Bitwig.
But no midi is sent out from the VST3 wrapped plugin when using CLAP_EVENT_MIDI events. Note on/off, however, does work if using CLAP_EVENT_NOTE_ON/OFF.
One note port is definied the the CLAP plugin, with supported_dialects set to "CLAP_NOTE_DIALECT_CLAP" and "CLAP_NOTE_DIALECT_MIDI", and preferred_dialect is set to "CLAP_NOTE_DIALECT_CLAP".
Plugin features are set to "CLAP_PLUGIN_FEATURE_INSTRUMENT" and "CLAP_PLUGIN_FEATURE_NOTE_EFFECT".
Question: Is there a specific setting in the VST3 wrapper that must be enabled to support CLAP_EVENT_MIDI for outgoing MIDI events? Or is something wrong with the port setup or plugin features?
Code to send CLAP_EVENT_MIDI events:
Code to send CLAP_EVENT_NOTE_ON/OFF (and this works!):
Using Visual Studio Community 2022 to compile the VST3 wrapper.