mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 05:50:46 +02:00
Add tabs to param boxes
This commit is contained in:
parent
5f678a3196
commit
8ce8ff8336
4 changed files with 34 additions and 5 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 0e2729ff522819ddb94f8df6ce1d665494a6b19a
|
||||
Subproject commit 051b6464cd5bc26a1b721ef74de53704a92e2406
|
||||
|
|
@ -282,6 +282,8 @@ public:
|
|||
|
||||
addEnable (lfo.enable);
|
||||
|
||||
addHeader ({"LFO 1", "LFO 2", "LFO 3"}, idx, proc.uiParams.activeLFO);
|
||||
|
||||
addModSource (new gin::ModulationSourceButton (proc.modMatrix, proc.modSrcLFO[idx], true));
|
||||
addModSource (new gin::ModulationSourceButton (proc.modMatrix, proc.modSrcMonoLFO[idx], false));
|
||||
|
||||
|
|
@ -309,14 +311,18 @@ public:
|
|||
{
|
||||
gin::ParamBox::paramChanged ();
|
||||
|
||||
auto& lfo = proc.lfoParams[idx];
|
||||
r->setVisible (! lfo.sync->isOn());
|
||||
b->setVisible (lfo.sync->isOn());
|
||||
if (r && b)
|
||||
{
|
||||
auto& lfo = proc.lfoParams[idx];
|
||||
r->setVisible (! lfo.sync->isOn());
|
||||
b->setVisible (lfo.sync->isOn());
|
||||
}
|
||||
}
|
||||
|
||||
WavetableAudioProcessor& proc;
|
||||
int idx;
|
||||
gin::ParamComponent::Ptr r, b;
|
||||
gin::ParamComponent::Ptr r = nullptr;
|
||||
gin::ParamComponent::Ptr b = nullptr;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -332,6 +338,8 @@ public:
|
|||
|
||||
addEnable (env.enable);
|
||||
|
||||
addHeader ({"ENV 1", "ENV 2", "ENV 3"}, idx, proc.uiParams.activeENV);
|
||||
|
||||
addModSource (new gin::ModulationSourceButton (proc.modMatrix, proc.modSrcEnv[idx], true));
|
||||
|
||||
addControl (new gin::Knob (env.attack), 0, 1);
|
||||
|
|
|
|||
|
|
@ -270,6 +270,13 @@ void WavetableAudioProcessor::GlobalParams::setup (WavetableAudioProcessor& p)
|
|||
level->conversionFunction = [] (float in) { return juce::Decibels::decibelsToGain (in); };
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void WavetableAudioProcessor::UIParams::setup (WavetableAudioProcessor& p)
|
||||
{
|
||||
activeLFO = p.addExtParam ("uiLFO", "LFO", "", "", { 0.0, 2.0, 0.0, 1.0 }, 0.0, 0.0f);
|
||||
activeENV = p.addExtParam ("uiENV", "ENV", "", "", { 0.0, 2.0, 0.0, 1.0 }, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void WavetableAudioProcessor::ChorusParams::setup (WavetableAudioProcessor& p)
|
||||
{
|
||||
|
|
@ -367,6 +374,7 @@ WavetableAudioProcessor::WavetableAudioProcessor()
|
|||
adsrParams.setup (*this);
|
||||
|
||||
globalParams.setup (*this);
|
||||
uiParams.setup (*this);
|
||||
gateParams.setup (*this);
|
||||
chorusParams.setup (*this);
|
||||
distortionParams.setup (*this);
|
||||
|
|
|
|||
|
|
@ -146,6 +146,18 @@ public:
|
|||
JUCE_DECLARE_NON_COPYABLE (GlobalParams)
|
||||
};
|
||||
|
||||
// UI Params
|
||||
struct UIParams
|
||||
{
|
||||
UIParams() = default;
|
||||
|
||||
gin::Parameter::Ptr activeLFO, activeENV;
|
||||
|
||||
void setup (WavetableAudioProcessor& p);
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (UIParams)
|
||||
};
|
||||
|
||||
struct GateParams
|
||||
{
|
||||
GateParams() = default;
|
||||
|
|
@ -227,6 +239,7 @@ public:
|
|||
DistortionParams distortionParams;
|
||||
DelayParams delayParams;
|
||||
ReverbParams reverbParams;
|
||||
UIParams uiParams;
|
||||
|
||||
//==============================================================================
|
||||
gin::GateEffect gate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue