From 6b4f535d9c35da2a881502129ce8fb31e10ee80d Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Mon, 8 Feb 2021 17:46:07 +0100 Subject: [PATCH] Add tests for extended cc triggers on aftertouch --- tests/SynthT.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/SynthT.cpp b/tests/SynthT.cpp index b9bf7ab8..46a42651 100644 --- a/tests/SynthT.cpp +++ b/tests/SynthT.cpp @@ -1424,3 +1424,18 @@ TEST_CASE("[Synth] Send CC vs. Automate CC") REQUIRE(synth.getNumActiveVoices() == 1); } } + +TEST_CASE("[Keyswitches] Trigger from aftertouch extended CC") +{ + sfz::Synth synth; + synth.loadSfzString(fs::current_path() / "tests/TestFiles/aftertouch_trigger.sfz", R"( + start_locc129=100 start_hicc129=127 sample=*saw + )"); + REQUIRE(synth.getNumActiveVoices() == 0); + synth.aftertouch(0, 90); + REQUIRE(synth.getNumActiveVoices() == 0); + synth.aftertouch(0, 110); + REQUIRE(synth.getNumActiveVoices() == 1); + synth.aftertouch(0, 120); + REQUIRE(synth.getNumActiveVoices() == 2); +}