From e587fbbe7064d15692e5ecc253578024a1e16e2f Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Sat, 20 Jun 2020 00:05:57 +0200 Subject: [PATCH] Keep the file name for string SFZ tests --- tests/SynthT.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/SynthT.cpp b/tests/SynthT.cpp index 0d8918e3..e1e37432 100644 --- a/tests/SynthT.cpp +++ b/tests/SynthT.cpp @@ -124,7 +124,7 @@ TEST_CASE("[Synth] All notes offs/all sounds off") { sfz::Synth synth; synth.setNumVoices(8); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/sound_off.sfz", R"( key=60 sample=*noise key=62 sample=*noise )"); @@ -157,7 +157,7 @@ TEST_CASE("[Synth] Releasing before the EG started smoothing (initial delay) kil synth.setSamplesPerBlock(1024); sfz::AudioBuffer buffer { 2, 1024 }; synth.setNumVoices(1); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/delay_release.sfz", R"( ampeg_delay=0.005 ampeg_release=1 sample=*noise )"); synth.noteOn(0, 60, 63); @@ -178,7 +178,7 @@ TEST_CASE("[Synth] Releasing after the initial and normal mode does not trigger synth.setSamplesPerBlock(1024); sfz::AudioBuffer buffer(2, 1024); synth.setNumVoices(1); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/delay_release.sfz", R"( ampeg_delay=0.005 ampeg_release=1 sample=*noise )"); synth.noteOn(200, 60, 63); @@ -197,7 +197,7 @@ TEST_CASE("[Synth] Trigger=release and an envelope properly kills the voice at t synth.setSamplesPerBlock(480); sfz::AudioBuffer buffer(2, 480); synth.setNumVoices(1); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/envelope_trigger_release.sfz", R"( lovel=0 hivel=127 trigger=release sample=*noise loop_mode=one_shot ampeg_attack=0.02 ampeg_decay=0.02 ampeg_release=0.1 ampeg_sustain=0 @@ -224,7 +224,7 @@ TEST_CASE("[Synth] Trigger=release_key and an envelope properly kills the voice synth.setSamplesPerBlock(480); sfz::AudioBuffer buffer(2, 480); synth.setNumVoices(1); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/envelope_trigger_release_key.sfz", R"( lovel=0 hivel=127 trigger=release_key sample=*noise loop_mode=one_shot ampeg_attack=0.02 ampeg_decay=0.02 ampeg_release=0.1 ampeg_sustain=0 @@ -251,7 +251,7 @@ TEST_CASE("[Synth] loopmode=one_shot and an envelope properly kills the voice at synth.setSamplesPerBlock(480); sfz::AudioBuffer buffer(2, 480); synth.setNumVoices(1); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/envelope_one_shot.sfz", R"( lovel=0 hivel=127 sample=*noise loop_mode=one_shot ampeg_attack=0.02 ampeg_decay=0.02 ampeg_release=0.1 ampeg_sustain=0 @@ -278,7 +278,7 @@ TEST_CASE("[Synth] Number of effect buses and resetting behavior") sfz::AudioBuffer buffer { 2, blockSize }; REQUIRE( synth.getEffectBusView(0) == nullptr); // No effects at first - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/base.sfz", R"( lokey=0 hikey=127 sample=*sine )"); REQUIRE( synth.getEffectBusView(0) != nullptr); // We have a main bus @@ -286,7 +286,7 @@ TEST_CASE("[Synth] Number of effect buses and resetting behavior") for (int i = 0; i < 100; ++i) synth.renderBlock(buffer); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/bitcrusher_2.sfz", R"( lokey=0 hikey=127 sample=*sine effect1=100 directtomain=50 fx1tomain=50 type=lofi bus=fx1 bitred=90 decim=10 )"); @@ -296,7 +296,7 @@ TEST_CASE("[Synth] Number of effect buses and resetting behavior") for (int i = 0; i < 100; ++i) synth.renderBlock(buffer); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/base.sfz", R"( lokey=0 hikey=127 sample=*sine )"); REQUIRE( synth.getEffectBusView(0) != nullptr); // We have a main bus @@ -305,7 +305,7 @@ TEST_CASE("[Synth] Number of effect buses and resetting behavior") for (int i = 0; i < 100; ++i) synth.renderBlock(buffer); - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/bitcrusher_3.sfz", R"( lokey=0 hikey=127 sample=*sine effect1=100 directtomain=50 fx3tomain=50 type=lofi bus=fx3 bitred=90 decim=10 )"); @@ -322,7 +322,7 @@ TEST_CASE("[Synth] Number of effect buses and resetting behavior") TEST_CASE("[Synth] No effect in the main bus") { sfz::Synth synth; - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/base.sfz", R"( lokey=0 hikey=127 sample=*sine )"); auto bus = synth.getEffectBusView(0); @@ -335,7 +335,7 @@ TEST_CASE("[Synth] No effect in the main bus") TEST_CASE("[Synth] One effect") { sfz::Synth synth; - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/bitcrusher_1.sfz", R"( lokey=0 hikey=127 sample=*sine type=lofi bitred=90 decim=10 )"); @@ -349,7 +349,7 @@ TEST_CASE("[Synth] One effect") TEST_CASE("[Synth] Effect on a second bus") { sfz::Synth synth; - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/bitcrusher_2.sfz", R"( lokey=0 hikey=127 sample=*sine effect1=100 directtomain=50 fx1tomain=50 type=lofi bus=fx1 bitred=90 decim=10 )"); @@ -369,7 +369,7 @@ TEST_CASE("[Synth] Effect on a second bus") TEST_CASE("[Synth] Effect on a third bus") { sfz::Synth synth; - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/bitcrusher_3.sfz", R"( lokey=0 hikey=127 sample=*sine effect1=100 directtomain=50 fx3tomain=50 type=lofi bus=fx3 bitred=90 decim=10 )"); @@ -388,7 +388,7 @@ TEST_CASE("[Synth] Effect on a third bus") TEST_CASE("[Synth] Gain to mix") { sfz::Synth synth; - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/Effects/to_mix.sfz", R"( lokey=0 hikey=127 sample=*sine effect1=100 fx1tomix=50 bus=fx1 type=lofi bitred=90 decim=10 )"); @@ -408,7 +408,7 @@ TEST_CASE("[Synth] Basic curves") { sfz::Synth synth; const auto& curves = synth.getResources().curves; - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/curves.sfz", R"( sample=*sine curve_index=18 v000=0 v095=0.5 v127=1 curve_index=17 v000=0 v095=0.5 v100=1 @@ -425,7 +425,7 @@ TEST_CASE("[Synth] Basic curves") TEST_CASE("[Synth] Velocity points") { sfz::Synth synth; - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/velocity_endpoints.sfz", R"( amp_velcurve_064=1 sample=*sine amp_velcurve_064=1 amp_veltrack=-100 sample=*sine )"); @@ -440,7 +440,7 @@ TEST_CASE("[Synth] Velocity points") TEST_CASE("[Synth] velcurve") { sfz::Synth synth; - synth.loadSfzString(fs::current_path(), R"( + synth.loadSfzString(fs::current_path() / "tests/TestFiles/velocity_endpoints.sfz", R"( amp_velcurve_064=1 sample=*sine amp_velcurve_064=1 amp_veltrack=-100 sample=*sine )");