diff --git a/src/effect_chorus.cpp b/src/effect_chorus.cpp index 57e8f96..01436c0 100644 --- a/src/effect_chorus.cpp +++ b/src/effect_chorus.cpp @@ -26,6 +26,9 @@ void AudioEffectChorus::setParameter(unsigned param, unsigned value) { switch (param) { + case AudioEffectChorus::Param::BYPASS: + this->setBypass(value); + break; case AudioEffectChorus::Param::CHORUS_I_ENABLE: this->setChorusI(value); break; diff --git a/src/effect_chorus.h b/src/effect_chorus.h index 9368dca..371efd0 100644 --- a/src/effect_chorus.h +++ b/src/effect_chorus.h @@ -9,6 +9,7 @@ class AudioEffectChorus : public AudioEffect public: enum Param { + BYPASS, CHORUS_I_ENABLE, CHORUS_II_ENABLE, CHORUS_I_RATE, diff --git a/src/effect_delay.cpp b/src/effect_delay.cpp index 215804f..8262960 100644 --- a/src/effect_delay.cpp +++ b/src/effect_delay.cpp @@ -38,6 +38,9 @@ void AudioEffectDelay::setParameter(unsigned param, unsigned value) { switch (param) { + case AudioEffectDelay::Param::BYPASS: + this->setBypass(value); + break; case AudioEffectDelay::Param::TIME_L: this->timeL = (float32_t) value / 1000.0f; break; diff --git a/src/effect_delay.h b/src/effect_delay.h index 1e2ec03..13903cb 100644 --- a/src/effect_delay.h +++ b/src/effect_delay.h @@ -11,6 +11,7 @@ public: enum Param { + BYPASS, TIME_L, TIME_R, FEEDBACK, diff --git a/src/effect_lpf.h b/src/effect_lpf.h index d93b610..8733ac7 100644 --- a/src/effect_lpf.h +++ b/src/effect_lpf.h @@ -25,6 +25,7 @@ public: enum Param { + BYPASS, CUTOFF, RESONANCE, UNKNOWN @@ -53,6 +54,9 @@ public: { switch (param) { + case AudioEffectLPF::Param::BYPASS: + this->setBypass(value); + break; case AudioEffectLPF::Param::CUTOFF: this->setCutoff(((float32_t) value / 100.0f) * MAX_CUTOFF); break; diff --git a/src/uimenu.cpp b/src/uimenu.cpp index e9346f3..7487754 100644 --- a/src/uimenu.cpp +++ b/src/uimenu.cpp @@ -146,12 +146,13 @@ const CUIMenu::TMenuItem CUIMenu::s_InsertFX[] = const CUIMenu::TMenuItem CUIMenu::s_FXNone[] = { - {"None", EditTGParameter2}, + {"None"}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXChorus[] = { + {"Bypass", EditTGFXParameter, 0, AudioEffectChorus::Param::BYPASS}, {"Chorus I", EditTGFXParameter, 0, AudioEffectChorus::Param::CHORUS_I_ENABLE}, {"Chorus II", EditTGFXParameter, 0, AudioEffectChorus::Param::CHORUS_II_ENABLE}, {"Rate I", EditTGFXParameter, 0, AudioEffectChorus::Param::CHORUS_I_RATE}, @@ -161,6 +162,7 @@ const CUIMenu::TMenuItem CUIMenu::s_FXChorus[] = const CUIMenu::TMenuItem CUIMenu::s_FXDelay[] = { + {"Bypass", EditTGFXParameter, 0, AudioEffectDelay::Param::BYPASS}, {"Time L", EditTGFXParameter, 0, AudioEffectDelay::Param::TIME_L}, {"Time R", EditTGFXParameter, 0, AudioEffectDelay::Param::TIME_R}, {"Feedback", EditTGFXParameter, 0, AudioEffectDelay::Param::FEEDBACK}, @@ -170,6 +172,7 @@ const CUIMenu::TMenuItem CUIMenu::s_FXDelay[] = const CUIMenu::TMenuItem CUIMenu::s_FXLPFilter[] = { + {"Bypass", EditTGFXParameter, 0, AudioEffectLPF::Param::BYPASS}, {"Cutoff", EditTGFXParameter, 0, AudioEffectLPF::Param::CUTOFF}, {"Resonance", EditTGFXParameter, 0, AudioEffectLPF::Param::RESONANCE}, {0} @@ -299,6 +302,7 @@ const CUIMenu::TParameter CUIMenu::s_TGParameter[CMiniDexed::TGParameterUnknown] // must match AudioEffectChorus::Param const CUIMenu::TParameter CUIMenu::s_TGFXChorusParam[AudioEffectChorus::Param::UNKNOWN] = { + {0, 1, 1, ToOnOff}, // BYPASS {0, 1, 1, ToOnOff}, // CHORUS_I_ENABLE {0, 1, 1, ToOnOff}, // CHORUS_II_ENABLE {0, 100, 1}, // CHORUS_I_RATE, @@ -308,6 +312,7 @@ const CUIMenu::TParameter CUIMenu::s_TGFXChorusParam[AudioEffectChorus::Param::U // must match AudioEffectDelay::Param const CUIMenu::TParameter CUIMenu::s_TGFXDelayParam[AudioEffectDelay::Param::UNKNOWN] = { + {0, 1, 1, ToOnOff}, // BYPASS {0, AudioEffectDelay::MAX_DELAY_TIME * 1000, 1}, // TIME_L {0, AudioEffectDelay::MAX_DELAY_TIME * 1000, 1}, // TIME_R {0, 100, 1}, // FEEDBACK, @@ -317,6 +322,7 @@ const CUIMenu::TParameter CUIMenu::s_TGFXDelayParam[AudioEffectDelay::Param::UNK // must match AudioEffectLPF::Param const CUIMenu::TParameter CUIMenu::s_TGFXLPFParam[AudioEffectLPF::Param::UNKNOWN] = { + {0, 1, 1, ToOnOff}, // BYPASS {0, 100, 1}, // CUTOFF {0, 100, 1} // RESONANCE };