Skip to content

Commit

Permalink
Add tests for extended cc triggers on aftertouch
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfd committed Feb 11, 2021
1 parent d1d659b commit 6b4f535
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/SynthT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"(
<region> 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);
}

0 comments on commit 6b4f535

Please sign in to comment.