diff --git a/plugins/editor/src/editor/Editor.cpp b/plugins/editor/src/editor/Editor.cpp index 72013cca..cceefe7a 100644 --- a/plugins/editor/src/editor/Editor.cpp +++ b/plugins/editor/src/editor/Editor.cpp @@ -237,7 +237,7 @@ void Editor::open(CFrame& frame) // request the whole Key and CC information impl.sendQueuedOSC("/key/slots", "", nullptr); - impl.sendQueuedOSC("/sw/slots", "", nullptr); + impl.sendQueuedOSC("/sw/last/slots", "", nullptr); impl.sendQueuedOSC("/cc/slots", "", nullptr); } @@ -268,7 +268,7 @@ void Editor::Impl::uiReceiveValue(EditId id, const EditValue& v) // request the whole Key and CC information sendQueuedOSC("/key/slots", "", nullptr); - sendQueuedOSC("/sw/slots", "", nullptr); + sendQueuedOSC("/sw/last/slots", "", nullptr); sendQueuedOSC("/cc/slots", "", nullptr); } break; @@ -430,7 +430,7 @@ void Editor::Impl::uiReceiveMessage(const char* path, const char* sig, const sfi updateKeyUsed(key, used); } } - else if (Messages::matchOSC("/sw/slots", path, indices) && !strcmp(sig, "b")) { + else if (Messages::matchOSC("/sw/last/slots", path, indices) && !strcmp(sig, "b")) { size_t numBits = 8 * args[0].b->size; ConstBitSpan bits { args[0].b->data, numBits }; for (unsigned key = 0; key < 128; ++key) { @@ -1033,7 +1033,7 @@ void Editor::Impl::changeSfzFile(const std::string& filePath) // request the whole Key and CC information sendQueuedOSC("/key/slots", "", nullptr); - sendQueuedOSC("/sw/slots", "", nullptr); + sendQueuedOSC("/sw/last/slots", "", nullptr); sendQueuedOSC("/cc/slots", "", nullptr); } diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index 5edb5e1e..3ca0beab 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -250,7 +250,7 @@ void Synth::Impl::clear() changedCCsThisCycle_.clear(); keyLabels_.clear(); keySlots_.clear(); - swSlots_.clear(); + swLastSlots_.clear(); keyswitchLabels_.clear(); globalOpcodes_.clear(); masterOpcodes_.clear(); @@ -749,13 +749,13 @@ void Synth::Impl::finalizeSfzLoad() // cache the set of keyswitches assigned for (const RegionPtr& regionPtr : regions_) { if (absl::optional sw = regionPtr->lastKeyswitch) { - swSlots_.set(*sw); + swLastSlots_.set(*sw); } else if (absl::optional> swRange = regionPtr->lastKeyswitchRange) { unsigned loKey = swRange->getStart(); unsigned hiKey = swRange->getEnd(); for (unsigned key = loKey; key <= hiKey; ++key) - swSlots_.set(key); + swLastSlots_.set(key); } } } diff --git a/src/sfizz/SynthMessaging.cpp b/src/sfizz/SynthMessaging.cpp index f8451d4f..6dd2d9eb 100644 --- a/src/sfizz/SynthMessaging.cpp +++ b/src/sfizz/SynthMessaging.cpp @@ -46,8 +46,8 @@ void sfz::Synth::dispatchMessage(Client& client, int delay, const char* path, co //---------------------------------------------------------------------- - MATCH("/sw/slots", "") { - const BitArray<128>& switches = impl.swSlots_; + MATCH("/sw/last/slots", "") { + const BitArray<128>& switches = impl.swLastSlots_; sfizz_blob_t blob { switches.data(), static_cast(switches.byte_size()) }; client.receive<'b'>(delay, path, &blob); } break; diff --git a/src/sfizz/SynthPrivate.h b/src/sfizz/SynthPrivate.h index 5c8b4479..da41a89f 100644 --- a/src/sfizz/SynthPrivate.h +++ b/src/sfizz/SynthPrivate.h @@ -217,7 +217,7 @@ struct Synth::Impl final: public Parser::Listener { std::map ccLabelsMap_; std::vector keyLabels_; BitArray<128> keySlots_; - BitArray<128> swSlots_; + BitArray<128> swLastSlots_; std::vector keyswitchLabels_; // Set as sw_default if present in the file