From aa29e1a4110b80b0731ddfbd64627355d112ad58 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 12 Nov 2020 08:17:19 +0100 Subject: [PATCH] Add test --- tests/SynthT.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/SynthT.cpp b/tests/SynthT.cpp index d1cd9156..5565d5ff 100644 --- a/tests/SynthT.cpp +++ b/tests/SynthT.cpp @@ -1394,3 +1394,32 @@ TEST_CASE("[Synth] Default ampeg_release") REQUIRE(synth.getRegionView(0)->amplitudeEG.release > 0.0005f); } + +TEST_CASE("[Synth] Send CC vs. Automate CC") +{ + { + sfz::Synth synth; + + synth.loadSfzString(fs::current_path() / "send_cc.sfz", R"( + sample=*sine + )"); + + synth.noteOn(0, 60, 100); + synth.hdcc(1, 120, 0.0f); + + REQUIRE(synth.getNumActiveVoices() == 0); + } + + { + sfz::Synth synth; + + synth.loadSfzString(fs::current_path() / "automate_cc.sfz", R"( + sample=*sine + )"); + + synth.noteOn(0, 60, 100); + synth.automateHdcc(1, 120, 0.0f); + + REQUIRE(synth.getNumActiveVoices() == 1); + } +}