Merge pull request #809 from jpcima/cutoff-polyaft

Add cutoff_polyaft
This commit is contained in:
JP Cimalando 2021-04-10 14:08:35 +02:00 committed by GitHub
commit 014518486c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -590,6 +590,17 @@ bool sfz::Region::parseOpcode(const Opcode& rawOpcode, bool cleanOpcode)
getOrCreateConnection(source, target).sourceDepth = opcode.read(Default::filterCutoffMod);
}
break;
case hash("cutoff&_polyaft"):
{
const auto filterIndex = opcode.parameters.front() - 1;
if (!extendIfNecessary(filters, filterIndex + 1, Default::numFilters))
return false;
const ModKey source = ModKey::createNXYZ(ModId::PolyAftertouch, id);
const ModKey target = ModKey::createNXYZ(ModId::FilCutoff, id, filterIndex);
getOrCreateConnection(source, target).sourceDepth = opcode.read(Default::filterCutoffMod);
}
break;
case hash("fil&_keytrack"): // also fil_keytrack
{
const auto filterIndex = opcode.parameters.front() - 1;
@ -931,7 +942,7 @@ bool sfz::Region::parseLFOOpcode(const Opcode& opcode, LFODescription& lfo)
getOrCreateConnection(ModKey::createNXYZ(ModId::ChannelAftertouch), sourceDepthKey).sourceDepth
= opcode.read(depthModSpec);
break;
case_any_lfo("depthpolyaft"): // NOLINT bugprone-branch-clone
case_any_lfo("depthpolyaft"):
getOrCreateConnection(sourceKey, targetKey).sourceDepthMod = sourceDepthKey;
getOrCreateConnection(ModKey::createNXYZ(ModId::PolyAftertouch, id), sourceDepthKey).sourceDepth
= opcode.read(depthModSpec);
@ -945,11 +956,11 @@ bool sfz::Region::parseLFOOpcode(const Opcode& opcode, LFODescription& lfo)
case_any_lfo_any_ccN("freq"): // also freqcc&
processGenericCc(opcode, Default::lfoFreqMod, lfo.freqKey);
break;
case_any_lfo("freqchanaft"): // NOLINT bugprone-branch-clone
case_any_lfo("freqchanaft"):
getOrCreateConnection(ModKey::createNXYZ(ModId::ChannelAftertouch), lfo.freqKey).sourceDepth
= opcode.read(Default::lfoFreqMod);
break;
case_any_lfo("freqpolyaft"): // NOLINT bugprone-branch-clone
case_any_lfo("freqpolyaft"):
getOrCreateConnection(ModKey::createNXYZ(ModId::PolyAftertouch, id), lfo.freqKey).sourceDepth
= opcode.read(Default::lfoFreqMod);
break;