Default states in Synth
This commit is contained in:
parent
33753d2e11
commit
4da5de49a8
1 changed files with 8 additions and 0 deletions
|
|
@ -154,7 +154,15 @@ bool sfz::Synth::loadSfzFile(const std::filesystem::path& filename)
|
||||||
|
|
||||||
for (auto cc = region->keyRange.getStart(); cc <= region->keyRange.getEnd(); cc++)
|
for (auto cc = region->keyRange.getStart(); cc <= region->keyRange.getEnd(); cc++)
|
||||||
ccActivationLists[cc].push_back(*currentRegion);
|
ccActivationLists[cc].push_back(*currentRegion);
|
||||||
|
|
||||||
|
for (int ccIndex = 1; ccIndex < 128; ccIndex++)
|
||||||
|
region->registerCC(region->channelRange.getStart(), ccIndex, ccState[ccIndex]);
|
||||||
|
|
||||||
|
if (defaultSwitch)
|
||||||
|
{
|
||||||
|
region->registerNoteOn(region->channelRange.getStart(), *defaultSwitch, 127, 1.0);
|
||||||
|
region->registerNoteOff(region->channelRange.getStart(), *defaultSwitch, 0, 1.0);
|
||||||
|
}
|
||||||
currentRegion++;
|
currentRegion++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue