diff --git a/src/surge-xt/CMakeLists.txt b/src/surge-xt/CMakeLists.txt index 741157198c7..e1a3df20612 100644 --- a/src/surge-xt/CMakeLists.txt +++ b/src/surge-xt/CMakeLists.txt @@ -56,7 +56,7 @@ juce_add_plugin(${PROJECT_NAME} if(SURGE_BUILD_CLAP) clap_juce_extensions_plugin(TARGET surge-xt CLAP_ID "org.surge-synth-team.surge-xt" - CLAP_FEATURES "instrument" "hybrid" "free and open source") + CLAP_FEATURES "instrument" "synthesizer" "hybrid" "free and open source") target_sources(${PROJECT_NAME}_CLAP PRIVATE plugin_type_extensions/SurgeSynthClapExtensions.cpp) endif() diff --git a/src/surge-xt/SurgeSynthProcessor.cpp b/src/surge-xt/SurgeSynthProcessor.cpp index 69837c6263c..412c9de20b7 100644 --- a/src/surge-xt/SurgeSynthProcessor.cpp +++ b/src/surge-xt/SurgeSynthProcessor.cpp @@ -603,7 +603,11 @@ void SurgeSynthProcessor::process_clap_event(const clap_event_header_t *evt) case CLAP_EVENT_NOTE_ON: { auto nevt = reinterpret_cast(evt); - surge->playNote(nevt->channel, nevt->key, 127 * nevt->velocity, 0, nevt->note_id); + + if (nevt->velocity != 0) + surge->playNote(nevt->channel, nevt->key, 127 * nevt->velocity, 0, nevt->note_id); + else + surge->releaseNote(nevt->channel, nevt->key, 127 * nevt->velocity, nevt->note_id); } break; case CLAP_EVENT_NOTE_CHOKE: @@ -705,7 +709,10 @@ void SurgeSynthProcessor::applyMidi(const juce::MidiMessageMetadata &it) if (m.isNoteOn()) { // no note ids coming from juce- or ui- land - surge->playNote(ch, m.getNoteNumber(), m.getVelocity(), 0, -1); + if (m.getVelocity() != 0) + surge->playNote(ch, m.getNoteNumber(), m.getVelocity(), 0, -1); + else + surge->releaseNote(ch, m.getNoteNumber(), m.getVelocity(), -1); } else if (m.isNoteOff()) {