Print the modulation key more compactly
This commit is contained in:
parent
f317e2f6b9
commit
169ba940c9
4 changed files with 21 additions and 21 deletions
|
|
@ -71,22 +71,22 @@ std::string ModKey::toString() const
|
||||||
" {curve=", params_.curve, ", smooth=", params_.smooth,
|
" {curve=", params_.curve, ", smooth=", params_.smooth,
|
||||||
", value=", params_.value, ", step=", params_.step, "}");
|
", value=", params_.value, ", step=", params_.step, "}");
|
||||||
case ModId::Envelope:
|
case ModId::Envelope:
|
||||||
return absl::StrCat("EG ", 1 + params_.N, " {region=", region_.number(), "}");
|
return absl::StrCat("EG ", 1 + params_.N, " {", region_.number(), "}");
|
||||||
case ModId::LFO:
|
case ModId::LFO:
|
||||||
return absl::StrCat("LFO ", 1 + params_.N, " {region=", region_.number(), "}");
|
return absl::StrCat("LFO ", 1 + params_.N, " {", region_.number(), "}");
|
||||||
|
|
||||||
case ModId::Amplitude:
|
case ModId::Amplitude:
|
||||||
return absl::StrCat("Amplitude", " {region=", region_.number(), "}");
|
return absl::StrCat("Amplitude {", region_.number(), "}");
|
||||||
case ModId::Pan:
|
case ModId::Pan:
|
||||||
return absl::StrCat("Pan", " {region=", region_.number(), "}");
|
return absl::StrCat("Pan {", region_.number(), "}");
|
||||||
case ModId::Width:
|
case ModId::Width:
|
||||||
return absl::StrCat("Width", " {region=", region_.number(), "}");
|
return absl::StrCat("Width {", region_.number(), "}");
|
||||||
case ModId::Position:
|
case ModId::Position:
|
||||||
return absl::StrCat("Position", " {region=", region_.number(), "}");
|
return absl::StrCat("Position {", region_.number(), "}");
|
||||||
case ModId::Pitch:
|
case ModId::Pitch:
|
||||||
return absl::StrCat("Pitch", " {region=", region_.number(), "}");
|
return absl::StrCat("Pitch {", region_.number(), "}");
|
||||||
case ModId::Volume:
|
case ModId::Volume:
|
||||||
return absl::StrCat("Volume", " {region=", region_.number(), "}");
|
return absl::StrCat("Volume {", region_.number(), "}");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return {};
|
return {};
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ TEST_CASE("[FlexEG] Values")
|
||||||
REQUIRE( egDescription.points[4].level == 1.0_a );
|
REQUIRE( egDescription.points[4].level == 1.0_a );
|
||||||
REQUIRE( egDescription.sustain == 3 );
|
REQUIRE( egDescription.sustain == 3 );
|
||||||
REQUIRE(synth.getResources().modMatrix.toDotGraph() == createReferenceGraph({
|
REQUIRE(synth.getResources().modMatrix.toDotGraph() == createReferenceGraph({
|
||||||
R"("EG 1 {region=0}" -> "Amplitude {region=0}")",
|
R"("EG 1 {0}" -> "Amplitude {0}")",
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,12 +85,12 @@ TEST_CASE("[FlexEG] Connections")
|
||||||
REQUIRE( synth.getRegionView(0)->flexEGs.size() == 1 );
|
REQUIRE( synth.getRegionView(0)->flexEGs.size() == 1 );
|
||||||
REQUIRE( synth.getRegionView(0)->flexEGs[0].points.size() == 2 );
|
REQUIRE( synth.getRegionView(0)->flexEGs[0].points.size() == 2 );
|
||||||
REQUIRE( synth.getResources().modMatrix.toDotGraph() == createReferenceGraph({
|
REQUIRE( synth.getResources().modMatrix.toDotGraph() == createReferenceGraph({
|
||||||
R"("EG 1 {region=0}" -> "Amplitude {region=0}")",
|
R"("EG 1 {0}" -> "Amplitude {0}")",
|
||||||
R"("EG 1 {region=1}" -> "Pan {region=1}")",
|
R"("EG 1 {1}" -> "Pan {1}")",
|
||||||
R"("EG 1 {region=2}" -> "Width {region=2}")",
|
R"("EG 1 {2}" -> "Width {2}")",
|
||||||
R"("EG 1 {region=3}" -> "Position {region=3}")",
|
R"("EG 1 {3}" -> "Position {3}")",
|
||||||
R"("EG 1 {region=4}" -> "Pitch {region=4}")",
|
R"("EG 1 {4}" -> "Pitch {4}")",
|
||||||
R"("EG 1 {region=5}" -> "Volume {region=5}")",
|
R"("EG 1 {5}" -> "Volume {5}")",
|
||||||
}, 6));
|
}, 6));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,9 @@ width_oncc425=29
|
||||||
|
|
||||||
const std::string graph = synth.getResources().modMatrix.toDotGraph();
|
const std::string graph = synth.getResources().modMatrix.toDotGraph();
|
||||||
REQUIRE(graph == createReferenceGraph({
|
REQUIRE(graph == createReferenceGraph({
|
||||||
R"("Controller 20 {curve=3, smooth=0, value=59, step=0}" -> "Amplitude {region=0}")",
|
R"("Controller 20 {curve=3, smooth=0, value=59, step=0}" -> "Amplitude {0}")",
|
||||||
R"("Controller 42 {curve=0, smooth=32, value=71, step=0}" -> "Pitch {region=0}")",
|
R"("Controller 42 {curve=0, smooth=32, value=71, step=0}" -> "Pitch {0}")",
|
||||||
R"("Controller 36 {curve=0, smooth=0, value=14.5, step=1.5}" -> "Pan {region=0}")",
|
R"("Controller 36 {curve=0, smooth=0, value=14.5, step=1.5}" -> "Pan {0}")",
|
||||||
R"("Controller 425 {curve=0, smooth=0, value=29, step=0}" -> "Width {region=0}")",
|
R"("Controller 425 {curve=0, smooth=0, value=29, step=0}" -> "Width {0}")",
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,12 +73,12 @@ std::string createReferenceGraph(std::vector<std::string> lines, int numRegions)
|
||||||
{
|
{
|
||||||
for (int regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
|
for (int regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
|
||||||
lines.push_back(absl::StrCat(
|
lines.push_back(absl::StrCat(
|
||||||
R"("Controller 7 {curve=4, smooth=10, value=100, step=0}" -> "Amplitude {region=)",
|
R"("Controller 7 {curve=4, smooth=10, value=100, step=0}" -> "Amplitude {)",
|
||||||
regionIdx,
|
regionIdx,
|
||||||
R"(}")"
|
R"(}")"
|
||||||
));
|
));
|
||||||
lines.push_back(absl::StrCat(
|
lines.push_back(absl::StrCat(
|
||||||
R"("Controller 10 {curve=1, smooth=10, value=100, step=0}" -> "Pan {region=)",
|
R"("Controller 10 {curve=1, smooth=10, value=100, step=0}" -> "Pan {)",
|
||||||
regionIdx,
|
regionIdx,
|
||||||
R"(}")"
|
R"(}")"
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue