fixing unit tests + change default delay flutter to 0

pull/409/head
abscisys 2 years ago
parent 23ab355c02
commit 398d11ec75
  1. 2
      src/fx_delay.cpp
  2. 10
      src/test/test_fx_components.cpp

@ -64,7 +64,7 @@ Delay::Delay(const float32_t sampling_rate, float32_t default_delay_time, float3
this->setRightDelayTime(default_delay_time); this->setRightDelayTime(default_delay_time);
this->setFeedback(default_feedback_level); this->setFeedback(default_feedback_level);
this->setFlutterRate(0.2f); this->setFlutterRate(0.2f);
this->setFlutterAmount(0.05f); this->setFlutterAmount(0.0f);
this->reset(); this->reset();
} }

@ -141,10 +141,10 @@ void testFastLFOPrecision(std::string file, float32_t freq, float32_t init_phase
lfo1.setFrequency(freq); lfo1.setFrequency(freq);
lfo2.setFrequency(freq); lfo2.setFrequency(freq);
std::string file0 = string("data/") + file + ".ComplexLFO." + std::to_string(freq) + "Hz-" + std::to_string(init_phase_deg) + ".data"; std::string file0 = std::string("data/") + file + ".ComplexLFO." + std::to_string(freq) + "Hz-" + std::to_string(init_phase_deg) + ".data";
std::string file1 = string("data/") + file + ".FastLFO." + std::to_string(freq) + "Hz-" + std::to_string(init_phase_deg) + ".data"; std::string file1 = std::string("data/") + file + ".FastLFO." + std::to_string(freq) + "Hz-" + std::to_string(init_phase_deg) + ".data";
std::string file2 = string("data/") + file + ".FastLFO2." + std::to_string(freq) + "Hz-" + std::to_string(init_phase_deg) + ".data"; std::string file2 = std::string("data/") + file + ".FastLFO2." + std::to_string(freq) + "Hz-" + std::to_string(init_phase_deg) + ".data";
std::string file3 = string(file + ".") + std::to_string(freq) + "Hz-" + std::to_string(init_phase_deg) + ".data.m"; std::string file3 = std::string(file + ".") + std::to_string(freq) + "Hz-" + std::to_string(init_phase_deg) + ".data.m";
std::ofstream _lfo0(getResultFile(file0, true)); std::ofstream _lfo0(getResultFile(file0, true));
std::ofstream _lfo1(getResultFile(file1, true)); std::ofstream _lfo1(getResultFile(file1, true));
@ -180,7 +180,7 @@ void testFastLFOPrecision(std::string file, float32_t freq, float32_t init_phase
_m << "fast_lfo = load(\"-ascii\", \"" << file1 << "\");" << std::endl; _m << "fast_lfo = load(\"-ascii\", \"" << file1 << "\");" << std::endl;
_m << "fast_lfo2 = load(\"-ascii\", \"" << file2 << "\");" << std::endl; _m << "fast_lfo2 = load(\"-ascii\", \"" << file2 << "\");" << std::endl;
_m << "plot(time, cplx_lfo, '-b', 'LineWidth', 6, time, fast_lfo, '-r', 'LineWidth', 4, time, fast_lfo2, '-o', 'LineWidth', 4);" << std::endl; _m << "plot(time, cplx_lfo, '-b', 'LineWidth', 6, time, fast_lfo, '-r', 'LineWidth', 4, time, fast_lfo2, '-o', 'LineWidth', 4);" << std::endl;
_m << "title('LFO tuning @ " << freq << "Hz / " << init_phase_deg << "°');" << std::endl; _m << "title('LFO tuning @ " << freq << "Hz / " << init_phase_deg << "<EFBFBD>');" << std::endl;
_m << "legend('ComplexLFO', 'FastLFO');" << std::endl; _m << "legend('ComplexLFO', 'FastLFO');" << std::endl;
_m.close(); _m.close();

Loading…
Cancel
Save