mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 05:50:46 +02:00
More UI cleanup
This commit is contained in:
parent
5e3e7257c8
commit
dd12f197e9
5 changed files with 14 additions and 11 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit cac21613040d2a29dbd5a22f0cb46a8bd732228c
|
Subproject commit 0e2729ff522819ddb94f8df6ce1d665494a6b19a
|
||||||
|
|
@ -5,4 +5,7 @@ namespace Cfg
|
||||||
constexpr static int numOSCs = 2;
|
constexpr static int numOSCs = 2;
|
||||||
constexpr static int numENVs = 3;
|
constexpr static int numENVs = 3;
|
||||||
constexpr static int numLFOs = 3;
|
constexpr static int numLFOs = 3;
|
||||||
|
|
||||||
|
constexpr static int numStepLFOSteps = 32;
|
||||||
|
constexpr static int numGateSteps = 16;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public:
|
||||||
addControl (new gin::Knob (osc.pos), 0, 0);
|
addControl (new gin::Knob (osc.pos), 0, 0);
|
||||||
addControl (new gin::Knob (osc.tune, true), 1, 0);
|
addControl (new gin::Knob (osc.tune, true), 1, 0);
|
||||||
addControl (new gin::Knob (osc.finetune, true), 2, 0);
|
addControl (new gin::Knob (osc.finetune, true), 2, 0);
|
||||||
addControl (new gin::Knob (osc.level, true), 3, 0);
|
addControl (new gin::Knob (osc.level), 3, 0);
|
||||||
addControl (new gin::Knob (osc.pan, true), 4, 0);
|
addControl (new gin::Knob (osc.pan, true), 4, 0);
|
||||||
|
|
||||||
addControl (new gin::Select (osc.voices), 0, 1);
|
addControl (new gin::Select (osc.voices), 0, 1);
|
||||||
|
|
@ -369,7 +369,7 @@ public:
|
||||||
addControl (new gin::Knob (prs.beat), 0, 1);
|
addControl (new gin::Knob (prs.beat), 0, 1);
|
||||||
addControl (new gin::Knob (prs.length), 1, 1);
|
addControl (new gin::Knob (prs.length), 1, 1);
|
||||||
|
|
||||||
auto g = new gin::StepLFOComponent();
|
auto g = new gin::StepLFOComponent (Cfg::numStepLFOSteps);
|
||||||
g->setParams (prs.beat, prs.length, prs.level, prs.enable);
|
g->setParams (prs.beat, prs.length, prs.level, prs.enable);
|
||||||
addControl (g, 0, 0, 4, 1);
|
addControl (g, 0, 0, 4, 1);
|
||||||
|
|
||||||
|
|
@ -433,7 +433,7 @@ public:
|
||||||
addControl (new gin::Knob (proc.gateParams.attack), 2, 0);
|
addControl (new gin::Knob (proc.gateParams.attack), 2, 0);
|
||||||
addControl (new gin::Knob (proc.gateParams.release), 3, 0);
|
addControl (new gin::Knob (proc.gateParams.release), 3, 0);
|
||||||
|
|
||||||
auto g = new gin::GateEffectComponent();
|
auto g = new gin::GateEffectComponent (Cfg::numGateSteps);
|
||||||
g->setParams (proc.gateParams.length, proc.gateParams.l, proc.gateParams.r, proc.gateParams.enable);
|
g->setParams (proc.gateParams.length, proc.gateParams.l, proc.gateParams.r, proc.gateParams.enable);
|
||||||
addControl (g, 0, 1, 4, 1);
|
addControl (g, 0, 1, 4, 1);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -214,10 +214,10 @@ void WavetableAudioProcessor::StepLFOParams::setup (WavetableAudioProcessor& p)
|
||||||
beat = p.addIntParam (id + "beat", nm + "Beat", "Beat", "", { 0.0, float (notes.size() - 1), 1.0, 1.0 }, 13.0, 0.0f, durationTextFunction);
|
beat = p.addIntParam (id + "beat", nm + "Beat", "Beat", "", { 0.0, float (notes.size() - 1), 1.0, 1.0 }, 13.0, 0.0f, durationTextFunction);
|
||||||
length = p.addIntParam (id + "length", nm + "Length", "Length", "", { 2.0, 32.0, 1.0, 1.0f }, 8.0f, 0.0f);
|
length = p.addIntParam (id + "length", nm + "Length", "Length", "", { 2.0, 32.0, 1.0, 1.0f }, 8.0f, 0.0f);
|
||||||
|
|
||||||
for (int i = 0; i < 32; i++)
|
for (int i = 0; i < Cfg::numStepLFOSteps; i++)
|
||||||
{
|
{
|
||||||
auto num = juce::String (i + 1);
|
auto num = juce::String (i + 1);
|
||||||
level[i] = p.addIntParam (id + "step" + num, nm + "Step " + num, "", "", { -1.0, 1.0, 0.0, 1.0f }, 0.0f, 0.0f);
|
level[i] = p.addIntParam (id + "step" + num, nm + "Step " + num, "", "", { -1.0, 1.0, 0.0, 1.0f }, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -231,11 +231,11 @@ void WavetableAudioProcessor::GateParams::setup (WavetableAudioProcessor& p)
|
||||||
|
|
||||||
enable = p.addIntParam (id + "enable", nm + "Enable", "Enable", "", { 0.0, 1.0, 1.0, 1.0 }, 0.0f, 0.0f, enableTextFunction);
|
enable = p.addIntParam (id + "enable", nm + "Enable", "Enable", "", { 0.0, 1.0, 1.0, 1.0 }, 0.0f, 0.0f, enableTextFunction);
|
||||||
beat = p.addIntParam (id + "beat", nm + "Beat", "Beat", "", { 0.0, float (notes.size() - 1), 1.0, 1.0 }, 7.0, 0.0f, durationTextFunction);
|
beat = p.addIntParam (id + "beat", nm + "Beat", "Beat", "", { 0.0, float (notes.size() - 1), 1.0, 1.0 }, 7.0, 0.0f, durationTextFunction);
|
||||||
length = p.addIntParam (id + "length", nm + "Length", "Length", "", { 2.0, 32.0, 1.0, 1.0f }, 8.0f, 0.0f);
|
length = p.addIntParam (id + "length", nm + "Length", "Length", "", { 2.0, Cfg::numGateSteps, 1.0, 1.0f }, 8.0f, 0.0f);
|
||||||
attack = p.addExtParam (id + "attack", nm + "Attack", "A", "s", { 0.0, 1.0, 0.0, 0.2f }, 0.1f, 0.0f);
|
attack = p.addExtParam (id + "attack", nm + "Attack", "A", "s", { 0.0, 1.0, 0.0, 0.2f }, 0.1f, 0.0f);
|
||||||
release = p.addExtParam (id + "release", nm + "Release", "R", "s", { 0.0, 1.0, 0.0, 0.2f }, 0.1f, 0.0f);
|
release = p.addExtParam (id + "release", nm + "Release", "R", "s", { 0.0, 1.0, 0.0, 0.2f }, 0.1f, 0.0f);
|
||||||
|
|
||||||
for (int i = 0; i < 32; i++)
|
for (int i = 0; i < Cfg::numGateSteps; i++)
|
||||||
{
|
{
|
||||||
auto num = juce::String (i + 1);
|
auto num = juce::String (i + 1);
|
||||||
l[i] = p.addIntParam (id + "l" + num, nm + "L " + num, "", "", { 0.0, 1.0, 1.0, 1.0f }, (i % 2 == 0 || i % 5 == 0) ? 1.0f : 0.0f, 0.0f);
|
l[i] = p.addIntParam (id + "l" + num, nm + "L " + num, "", "", { 0.0, 1.0, 1.0, 1.0f }, (i % 2 == 0 || i % 5 == 0) ? 1.0f : 0.0f, 0.0f);
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ public:
|
||||||
StepLFOParams() = default;
|
StepLFOParams() = default;
|
||||||
|
|
||||||
gin::Parameter::Ptr enable, beat, length;
|
gin::Parameter::Ptr enable, beat, length;
|
||||||
gin::Parameter::Ptr level[32] = { nullptr };
|
gin::Parameter::Ptr level[Cfg::numStepLFOSteps] = { nullptr };
|
||||||
|
|
||||||
void setup (WavetableAudioProcessor& p);
|
void setup (WavetableAudioProcessor& p);
|
||||||
|
|
||||||
|
|
@ -151,8 +151,8 @@ public:
|
||||||
GateParams() = default;
|
GateParams() = default;
|
||||||
|
|
||||||
gin::Parameter::Ptr enable, beat, length, attack, release;
|
gin::Parameter::Ptr enable, beat, length, attack, release;
|
||||||
gin::Parameter::Ptr l[32] = { nullptr };
|
gin::Parameter::Ptr l[Cfg::numGateSteps] = { nullptr };
|
||||||
gin::Parameter::Ptr r[32] = { nullptr };
|
gin::Parameter::Ptr r[Cfg::numGateSteps] = { nullptr };
|
||||||
|
|
||||||
void setup (WavetableAudioProcessor& p);
|
void setup (WavetableAudioProcessor& p);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue