diff --git a/plugins/editor/src/editor/Editor.cpp b/plugins/editor/src/editor/Editor.cpp index fb09b25d..2866d04c 100644 --- a/plugins/editor/src/editor/Editor.cpp +++ b/plugins/editor/src/editor/Editor.cpp @@ -554,6 +554,9 @@ void Editor::Impl::uiReceiveMessage(const char* path, const char* sig, const sfi else if (Messages::matchOSC("/sw/last/current", path, indices) && !strcmp(sig, "i")) { updateSWLastCurrent(args[0].i); } + else if (Messages::matchOSC("/sw/last/current", path, indices) && !strcmp(sig, "N")) { + updateSWLastCurrent(-1); + } else if (Messages::matchOSC("/sw/last/&/label", path, indices) && !strcmp(sig, "s")) { updateSWLastLabel(indices[0], args[0].s); } diff --git a/src/sfizz/SynthMessaging.cpp b/src/sfizz/SynthMessaging.cpp index e96f0040..70fc6ed5 100644 --- a/src/sfizz/SynthMessaging.cpp +++ b/src/sfizz/SynthMessaging.cpp @@ -87,10 +87,10 @@ void sfz::Synth::dispatchMessage(Client& client, int delay, const char* path, co } break; MATCH("/sw/last/current", "") { - int32_t value = -1; if (impl.currentSwitch_) - value = *impl.currentSwitch_; - client.receive<'i'>(delay, path, value); + client.receive<'i'>(delay, path, *impl.currentSwitch_); + else + client.receive<'N'>(delay, path, {}); } break; MATCH("/sw/last/&/label", "") {