From 79716e1c8390c3dc11fb14a9f18e2bb45583f373 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Sun, 22 Dec 2024 16:41:44 -0500 Subject: [PATCH] Fix a skipped event -> stuck note in the CLAP Events at the end of the block still need handling for block sizes which are not a power of block size. This would often stick notes in reaper clap --- doc/design.md | 1 + src/clap/six-sines-clap.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/doc/design.md b/doc/design.md index cc39ee2..82c9e5f 100644 --- a/doc/design.md +++ b/doc/design.md @@ -47,6 +47,7 @@ Sunday - LFO on Mixer Node to level or pan - LFO mul or plus on consistently on all three nodes - LFO Level Built In +- AM is somehow not quiet right. Signal to zero seems 'no modulation' not 'no output' - preset factory set with cmakerc - preset scan user directory to make tree - param split for voices and base/top diff --git a/src/clap/six-sines-clap.cpp b/src/clap/six-sines-clap.cpp index 2ec6bdb..6488513 100644 --- a/src/clap/six-sines-clap.cpp +++ b/src/clap/six-sines-clap.cpp @@ -144,6 +144,16 @@ struct SixSinesClap : public plugHelper_t, sst::clap_juce_shim::EditorProvider blockPos = 0; } } + + while (nextEvent) + { + handleEvent(nextEvent); + nextEventIndex++; + if (nextEventIndex < sz) + nextEvent = ev->get(ev, nextEventIndex); + else + nextEvent = nullptr; + } return CLAP_PROCESS_CONTINUE; } bool handleEvent(const clap_event_header_t *nextEvent) @@ -192,6 +202,7 @@ struct SixSinesClap : public plugHelper_t, sst::clap_juce_shim::EditorProvider break; default: { + SXSNLOG("Unknown inbound event of type " << nextEvent->type); } break; }