Rename keyswitch things for disambiguation
This commit is contained in:
parent
22e0aec6b1
commit
291aa3d16b
4 changed files with 10 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<uint8_t> sw = regionPtr->lastKeyswitch) {
|
||||
swSlots_.set(*sw);
|
||||
swLastSlots_.set(*sw);
|
||||
}
|
||||
else if (absl::optional<Range<uint8_t>> swRange = regionPtr->lastKeyswitchRange) {
|
||||
unsigned loKey = swRange->getStart();
|
||||
unsigned hiKey = swRange->getEnd();
|
||||
for (unsigned key = loKey; key <= hiKey; ++key)
|
||||
swSlots_.set(key);
|
||||
swLastSlots_.set(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<uint32_t>(switches.byte_size()) };
|
||||
client.receive<'b'>(delay, path, &blob);
|
||||
} break;
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ struct Synth::Impl final: public Parser::Listener {
|
|||
std::map<int, size_t> ccLabelsMap_;
|
||||
std::vector<NoteNamePair> keyLabels_;
|
||||
BitArray<128> keySlots_;
|
||||
BitArray<128> swSlots_;
|
||||
BitArray<128> swLastSlots_;
|
||||
std::vector<NoteNamePair> keyswitchLabels_;
|
||||
|
||||
// Set as sw_default if present in the file
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue