From d695762f1e49411869c491d3aca6a59259d53e81 Mon Sep 17 00:00:00 2001 From: Javier Nonis Date: Sun, 28 Jul 2024 18:46:59 -0300 Subject: [PATCH] Fix for A Phaser parameters --- src/effect_audio/effect_aphaser.h | 44 +++++++++++++------------------ src/uimenu.cpp | 20 +++++++------- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/src/effect_audio/effect_aphaser.h b/src/effect_audio/effect_aphaser.h index 764a8826..5e7498c8 100644 --- a/src/effect_audio/effect_aphaser.h +++ b/src/effect_audio/effect_aphaser.h @@ -21,17 +21,18 @@ class AudioEffectAPhaser : public AudioEffect { BYPASS, WETDRY, - PAN, + DISTORTION, PH_FREQ, PH_RND, TYPE, STDL, - PH_DEPTH, + WIDTH, FB, STAGES, - LRCR, + OFFSET, SUB, - PHASE, + PH_DEPTH, + HYPER, UNKNOWN }; @@ -41,20 +42,6 @@ class AudioEffectAPhaser : public AudioEffect this->init_params = true; this->phaser->setpreset(0); - /* - this->setParameter(AudioEffectAPhaser::Param::WETDRY, 64); - this->setParameter(AudioEffectAPhaser::Param::PAN, 64); - this->setParameter(AudioEffectAPhaser::Param::PH_FREQ, 11); - this->setParameter(AudioEffectAPhaser::Param::PH_RND, 0); - this->setParameter(AudioEffectAPhaser::Param::TYPE, 0); - this->setParameter(AudioEffectAPhaser::Param::STDL, 64); - this->setParameter(AudioEffectAPhaser::Param::PH_DEPTH, 110); - this->setParameter(AudioEffectAPhaser::Param::FB, 64); - this->setParameter(AudioEffectAPhaser::Param::STAGES, 4); - this->setParameter(AudioEffectAPhaser::Param::LRCR, 0); - this->setParameter(AudioEffectAPhaser::Param::SUB, 0); - this->setParameter(AudioEffectAPhaser::Param::PHASE, 20); - */ } virtual ~AudioEffectAPhaser() @@ -88,7 +75,7 @@ class AudioEffectAPhaser : public AudioEffect case AudioEffectAPhaser::Param::WETDRY: this->phaser->changepar(0, value); break; - case AudioEffectAPhaser::Param::PAN: + case AudioEffectAPhaser::Param::DISTORTION: this->phaser->changepar(1, value); break; case AudioEffectAPhaser::Param::PH_FREQ: @@ -103,7 +90,7 @@ class AudioEffectAPhaser : public AudioEffect case AudioEffectAPhaser::Param::STDL: this->phaser->changepar(5, value); break; - case AudioEffectAPhaser::Param::PH_DEPTH: + case AudioEffectAPhaser::Param::WIDTH: this->phaser->changepar(6, value); break; case AudioEffectAPhaser::Param::FB: @@ -112,15 +99,18 @@ class AudioEffectAPhaser : public AudioEffect case AudioEffectAPhaser::Param::STAGES: this->phaser->changepar(8, value); break; - case AudioEffectAPhaser::Param::LRCR: + case AudioEffectAPhaser::Param::OFFSET: this->phaser->changepar(9, value); break; case AudioEffectAPhaser::Param::SUB: this->phaser->changepar(10, value); break; - case AudioEffectAPhaser::Param::PHASE: + case AudioEffectAPhaser::Param::PH_DEPTH: this->phaser->changepar(11, value); break; + case AudioEffectAPhaser::Param::HYPER: + this->phaser->changepar(12, value); + break; default: break; } @@ -134,7 +124,7 @@ class AudioEffectAPhaser : public AudioEffect return this->getBypass() ? 1 : 0; case AudioEffectAPhaser::Param::WETDRY: return this->phaser->getpar(0); - case AudioEffectAPhaser::Param::PAN: + case AudioEffectAPhaser::Param::DISTORTION: return this->phaser->getpar(1); case AudioEffectAPhaser::Param::PH_FREQ: return this->phaser->getpar(2); @@ -144,18 +134,20 @@ class AudioEffectAPhaser : public AudioEffect return this->phaser->getpar(4); case AudioEffectAPhaser::Param::STDL: return this->phaser->getpar(5); - case AudioEffectAPhaser::Param::PH_DEPTH: + case AudioEffectAPhaser::Param::WIDTH: return this->phaser->getpar(6); case AudioEffectAPhaser::Param::FB: return this->phaser->getpar(7); case AudioEffectAPhaser::Param::STAGES: return this->phaser->getpar(8); - case AudioEffectAPhaser::Param::LRCR: + case AudioEffectAPhaser::Param::OFFSET: return this->phaser->getpar(9); case AudioEffectAPhaser::Param::SUB: return this->phaser->getpar(10); - case AudioEffectAPhaser::Param::PHASE: + case AudioEffectAPhaser::Param::PH_DEPTH: return this->phaser->getpar(11); + case AudioEffectAPhaser::Param::HYPER: + return this->phaser->getpar(12); default: return 0; } diff --git a/src/uimenu.cpp b/src/uimenu.cpp index 4f4c9b15..b367db70 100644 --- a/src/uimenu.cpp +++ b/src/uimenu.cpp @@ -286,17 +286,18 @@ CUIMenu::TMenuItem CUIMenu::s_FXAPhaser[] = { {"Bypass", EditTGFXParameter, 0, AudioEffectAPhaser::Param::BYPASS}, {"Mix", EditTGFXParameter, 0, AudioEffectAPhaser::Param::WETDRY}, - {"Pan", EditTGFXParameter, 0, AudioEffectAPhaser::Param::PAN}, + {"Distortion", EditTGFXParameter, 0, AudioEffectAPhaser::Param::DISTORTION}, {"Freq", EditTGFXParameter, 0, AudioEffectAPhaser::Param::PH_FREQ}, {"Random", EditTGFXParameter, 0, AudioEffectAPhaser::Param::PH_RND}, {"Type", EditTGFXParameter, 0, AudioEffectAPhaser::Param::TYPE}, {"Stereo", EditTGFXParameter, 0, AudioEffectAPhaser::Param::STDL}, - {"Depth", EditTGFXParameter, 0, AudioEffectAPhaser::Param::PH_DEPTH}, + {"Width", EditTGFXParameter, 0, AudioEffectAPhaser::Param::WIDTH}, {"Feedback", EditTGFXParameter, 0, AudioEffectAPhaser::Param::FB}, {"Stages", EditTGFXParameter, 0, AudioEffectAPhaser::Param::STAGES}, - {"L/R Cross", EditTGFXParameter, 0, AudioEffectAPhaser::Param::LRCR}, + {"Offset", EditTGFXParameter, 0, AudioEffectAPhaser::Param::OFFSET}, {"Sub", EditTGFXParameter, 0, AudioEffectAPhaser::Param::SUB}, - {"Phase", EditTGFXParameter, 0, AudioEffectAPhaser::Param::PHASE}, + {"Depth", EditTGFXParameter, 0, AudioEffectAPhaser::Param::PH_DEPTH}, + {"Hyper", EditTGFXParameter, 0, AudioEffectAPhaser::Param::HYPER}, {0} }; @@ -575,21 +576,22 @@ const CUIMenu::TParameter CUIMenu::s_TGFXPhaserParam[AudioEffectPhaser::Param::U }; // must match AudioEffectAPhaser::Param -const CUIMenu::TParameter CUIMenu::s_TGFXAPhaserParam[AudioEffectPhaser::Param::UNKNOWN] = +const CUIMenu::TParameter CUIMenu::s_TGFXAPhaserParam[AudioEffectAPhaser::Param::UNKNOWN] = { {0, 1, 1, ToOnOff}, // BYPASS {0, 127, 1}, // WETDRY - {0, 127, 1}, // PAN + {0, 127, 1}, // DISTORTION {1, 600, 1}, // PH_FREQ {0, 127, 1}, // PH_RND {0, 11, 1}, // TYPE {0, 127, 1}, // STDL - {0, 127, 1}, // PH_DEPTH + {0, 127, 1}, // WIDTH {0, 127, 1}, // FB {0, 12, 1}, // STAGES - {0, 127, 1}, // LRCR + {0, 127, 1}, // OFFSET {0, 1, 1, ToOnOff}, // SUB - {0, 127, 1}, // PHASE + {0, 127, 1}, // PH_DEPTH + {0, 1, 1, ToOnOff}, // HYPER }; // must match MidiArp::Param