diff --git a/src/effect_base.cpp b/src/effect_base.cpp index ab424ce..abbc9bd 100644 --- a/src/effect_base.cpp +++ b/src/effect_base.cpp @@ -29,24 +29,19 @@ unsigned AudioEffect::getId() void AudioEffect::setParameters(std::vector params) { - LOGNOTE("setParameters size: %d", params.size()); for (size_t i = 0; i < params.size(); i++) { this->setParameter(i, params[i]); - LOGNOTE("Param %d: %d", i, params[i]); } } std::vector AudioEffect::getParameters() { - LOGNOTE("getParameters"); size_t len = getParametersSize(); - LOGNOTE("sizeof: %d", len); std::vector params; for (size_t i = 0; i < len; i++) { params.push_back(getParameter(i)); - LOGNOTE("Param %d: %d", i, params[i]); } return params; } diff --git a/src/effect_chorus.cpp b/src/effect_chorus.cpp index 01436c0..fd670b8 100644 --- a/src/effect_chorus.cpp +++ b/src/effect_chorus.cpp @@ -27,7 +27,7 @@ void AudioEffectChorus::setParameter(unsigned param, unsigned value) switch (param) { case AudioEffectChorus::Param::BYPASS: - this->setBypass(value); + this->setBypass(value == 1); break; case AudioEffectChorus::Param::CHORUS_I_ENABLE: this->setChorusI(value); @@ -50,6 +50,8 @@ unsigned AudioEffectChorus::getParameter(unsigned param) { switch (param) { + case AudioEffectChorus::Param::BYPASS: + return this->getBypass() ? 1 : 0; case AudioEffectChorus::Param::CHORUS_I_ENABLE: return this->getChorusI(); case AudioEffectChorus::Param::CHORUS_II_ENABLE: diff --git a/src/effect_delay.cpp b/src/effect_delay.cpp index 8262960..d62b7c9 100644 --- a/src/effect_delay.cpp +++ b/src/effect_delay.cpp @@ -39,7 +39,7 @@ void AudioEffectDelay::setParameter(unsigned param, unsigned value) switch (param) { case AudioEffectDelay::Param::BYPASS: - this->setBypass(value); + this->setBypass(value == 1); break; case AudioEffectDelay::Param::TIME_L: this->timeL = (float32_t) value / 1000.0f; @@ -62,6 +62,8 @@ unsigned AudioEffectDelay::getParameter(unsigned param) { switch (param) { + case AudioEffectDelay::Param::BYPASS: + return this->getBypass() ? 1 : 0; case AudioEffectDelay::Param::TIME_L: return roundf(this->timeL * 1000); case AudioEffectDelay::Param::TIME_R: diff --git a/src/effect_lpf.h b/src/effect_lpf.h index 8733ac7..97622fd 100644 --- a/src/effect_lpf.h +++ b/src/effect_lpf.h @@ -55,7 +55,7 @@ public: switch (param) { case AudioEffectLPF::Param::BYPASS: - this->setBypass(value); + this->setBypass(value == 1); break; case AudioEffectLPF::Param::CUTOFF: this->setCutoff(((float32_t) value / 100.0f) * MAX_CUTOFF); @@ -72,6 +72,8 @@ public: { switch (param) { + case AudioEffectLPF::Param::BYPASS: + return this->getBypass() ? 1 : 0; case AudioEffectLPF::Param::CUTOFF: return roundf((this->cutoff / MAX_CUTOFF) * 100); case AudioEffectLPF::Param::RESONANCE: diff --git a/src/minidexed.cpp b/src/minidexed.cpp index b61fb66..90a9ef2 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -1310,7 +1310,6 @@ bool CMiniDexed::DoSavePerformance (void) m_PerformanceConfig.SetPan (m_nPan[nTG], nTG); m_PerformanceConfig.SetInsertFX (m_InsertFX[nTG]->getId(), nTG); - LOGNOTE("Saving Insert FX Paramas"); std::vector pParams = m_InsertFX[nTG]->getParameters(); m_PerformanceConfig.SetInsertFXParams (pParams, nTG); pParams.clear(); diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index 7166990..ea30a54 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -384,26 +384,19 @@ std::vector CPerformanceConfig::GetInsertFXParams (unsigned nTG) const { assert (nTG < CConfig::ToneGenerators); - LOGNOTE("Loading Insert FX Params"); - + std::vector tokens; std::string params = m_nInsertFXParams[nTG]; if (params.empty()) { - LOGNOTE("Empty Insert FX Params"); - std::vector empty; - return empty; + return tokens; } char delimiter = ','; std::stringstream ss(params); std::string temp; - std::vector tokens; while (getline(ss, temp, delimiter)) { - LOGNOTE("Insert FX Params token: %s", temp.c_str()); tokens.push_back(stoi(temp)); } - LOGNOTE("Insert FX Params tokens size: %d\n", tokens.size()); - LOGNOTE("Loaded Insert FX Params\n"); return tokens; } @@ -487,10 +480,8 @@ void CPerformanceConfig::SetInsertFX (unsigned nValue, unsigned nTG) void CPerformanceConfig::SetInsertFXParams (std::vector pParams, unsigned nTG) { - LOGNOTE("SetInsertFXParams"); assert (nTG < CConfig::ToneGenerators); - LOGNOTE("SetInsertFXParams sizeof %d", pParams.size()); std::string params = ""; for (size_t i = 0; i < pParams.size(); i++) { @@ -499,7 +490,6 @@ void CPerformanceConfig::SetInsertFXParams (std::vector pParams, unsig } params += std::to_string(pParams[i]); } - LOGNOTE("SetInsertFXParams %s", params.c_str()); m_nInsertFXParams[nTG] = params; }