Added Bypass to FX Parameters

pull/764/head
jnonis 7 months ago
parent 8ca21774fb
commit 172c651aa5
  1. 3
      src/effect_chorus.cpp
  2. 1
      src/effect_chorus.h
  3. 3
      src/effect_delay.cpp
  4. 1
      src/effect_delay.h
  5. 4
      src/effect_lpf.h
  6. 8
      src/uimenu.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;

@ -9,6 +9,7 @@ class AudioEffectChorus : public AudioEffect
public:
enum Param
{
BYPASS,
CHORUS_I_ENABLE,
CHORUS_II_ENABLE,
CHORUS_I_RATE,

@ -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;

@ -11,6 +11,7 @@ public:
enum Param
{
BYPASS,
TIME_L,
TIME_R,
FEEDBACK,

@ -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;

@ -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
};

Loading…
Cancel
Save