Map CC11 expression
This commit is contained in:
parent
2fc6aab964
commit
162673939a
3 changed files with 17 additions and 0 deletions
|
|
@ -233,10 +233,12 @@ void sfz::Synth::clear()
|
|||
fill(absl::MakeSpan(ccInitialValues), 0.0f);
|
||||
initCc(7, 100); // volume
|
||||
initHdcc(10, 0.5f); // pan
|
||||
initHdcc(11, 1.0f); // expression
|
||||
|
||||
// set default controller labels
|
||||
insertPairUniquely(ccLabels, 7, "Volume");
|
||||
insertPairUniquely(ccLabels, 10, "Pan");
|
||||
insertPairUniquely(ccLabels, 11, "Expression");
|
||||
}
|
||||
|
||||
void sfz::Synth::handleMasterOpcodes(const std::vector<Opcode>& members)
|
||||
|
|
@ -676,6 +678,11 @@ void sfz::Synth::finalizeSfzLoad()
|
|||
ModKey::createCC(10, 1, defaultSmoothness, 0),
|
||||
ModKey::createNXYZ(ModId::Pan, region.id)).sourceDepth = 100.0f;
|
||||
}
|
||||
if (!usedCCs.test(11)) {
|
||||
region.getOrCreateConnection(
|
||||
ModKey::createCC(11, 4, defaultSmoothness, 0),
|
||||
ModKey::createNXYZ(ModId::Amplitude, region.id)).sourceDepth = 100.0f;
|
||||
}
|
||||
}
|
||||
|
||||
modificationTime = checkModificationTime();
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ TEST_CASE("[Modulations] FlexEG Ampeg target")
|
|||
const std::string graph = synth.getResources().modMatrix.toDotGraph();
|
||||
REQUIRE(graph == createModulationDotGraph({
|
||||
R"("Controller 10 {curve=1, smooth=10, step=0}" -> "Pan {0}")",
|
||||
R"("Controller 11 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
R"("Controller 7 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
R"("EG 1 {0}" -> "MasterAmplitude {0}")",
|
||||
}));
|
||||
|
|
@ -273,6 +274,7 @@ TEST_CASE("[Modulations] FlexEG Ampeg target with 2 FlexEGs")
|
|||
const std::string graph = synth.getResources().modMatrix.toDotGraph();
|
||||
REQUIRE(graph == createModulationDotGraph({
|
||||
R"("Controller 10 {curve=1, smooth=10, step=0}" -> "Pan {0}")",
|
||||
R"("Controller 11 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
R"("Controller 7 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
R"("EG 2 {0}" -> "MasterAmplitude {0}")",
|
||||
}));
|
||||
|
|
@ -299,6 +301,7 @@ TEST_CASE("[Modulations] FlexEG Ampeg target with multiple EGs targeting ampeg")
|
|||
const std::string graph = synth.getResources().modMatrix.toDotGraph();
|
||||
REQUIRE(graph == createModulationDotGraph({
|
||||
R"("Controller 10 {curve=1, smooth=10, step=0}" -> "Pan {0}")",
|
||||
R"("Controller 11 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
R"("Controller 7 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
R"("EG 1 {0}" -> "MasterAmplitude {0}")",
|
||||
}));
|
||||
|
|
@ -316,6 +319,7 @@ TEST_CASE("[Modulations] Override the default volume controller")
|
|||
REQUIRE(graph == createModulationDotGraph({
|
||||
R"("AmplitudeEG {0}" -> "MasterAmplitude {0}")",
|
||||
R"("Controller 10 {curve=1, smooth=10, step=0}" -> "Pan {0}")",
|
||||
R"("Controller 11 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
R"("Controller 7 {curve=0, smooth=0, step=0}" -> "Pitch {0}")",
|
||||
}));
|
||||
}
|
||||
|
|
@ -331,6 +335,7 @@ TEST_CASE("[Modulations] Override the default pan controller")
|
|||
const std::string graph = synth.getResources().modMatrix.toDotGraph();
|
||||
REQUIRE(graph == createModulationDotGraph({
|
||||
R"("AmplitudeEG {0}" -> "MasterAmplitude {0}")",
|
||||
R"("Controller 11 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
R"("Controller 7 {curve=4, smooth=10, step=0}" -> "Amplitude {0}")",
|
||||
}));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,11 @@ std::string createDefaultGraph(std::vector<std::string> lines, int numRegions)
|
|||
regionIdx,
|
||||
R"(}")"
|
||||
));
|
||||
lines.push_back(absl::StrCat(
|
||||
R"("Controller 11 {curve=4, smooth=10, step=0}" -> "Amplitude {)",
|
||||
regionIdx,
|
||||
R"(}")"
|
||||
));
|
||||
}
|
||||
|
||||
return createModulationDotGraph(lines);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue