Skip to content

Commit

Permalink
Added mod matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Sep 9, 2023
1 parent 8f1653b commit 4421c1e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 3 deletions.
8 changes: 7 additions & 1 deletion plugin/Resources/layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@
{ "id": "mod", "x": "prevR()+1", "y": "prevY()", "r": "parW()", "h": 163, "children":
[
{ "id": "modlist", "x": 0, "y": 23, "r": "parW()", "b": "parH()" }
] },
]
},
{ "id": "mtx", "x": "prevX()", "y": "prevY()", "r": "parR()", "h": 163, "children":
[
{ "id": "matrix", "x": 0, "y": 23, "r": "parW()", "b": "parH()" }
]
},
{ "id": "gate", "x": "0", "y": "prevB()+1", "w": 290, "h": 137, "children":
[
{ "id": "Beat", "x": 61, "y": 30, "w": 42, "h": 57 },
Expand Down
1 change: 1 addition & 0 deletions plugin/Source/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Editor::Editor (WavetableAudioProcessor& proc_)
addAndMakeVisible (filter);
addAndMakeVisible (step);
addAndMakeVisible (mod);
addAndMakeVisible (mtx);
addAndMakeVisible (global);
addAndMakeVisible (gate);
addAndMakeVisible (chorus);
Expand Down
1 change: 1 addition & 0 deletions plugin/Source/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Editor : public juce::Component
ENVBox envs[Cfg::numENVs] { { "ENV 1", proc, 0 }, { "ENV 2", proc, 1 }, { "ENV 3", proc, 2 } };
StepBox step { "step", proc };
ModBox mod { "mod", proc };
MatrixBox mtx { "mtx", proc };
GlobalBox global { "global", proc };

GateBox gate { proc };
Expand Down
19 changes: 19 additions & 0 deletions plugin/Source/Panels.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,32 @@ class ModBox : public gin::ParamBox
: gin::ParamBox (name), proc (proc_)
{
setName ("mod");

addHeader ({"SRC", "MTX"}, 0, proc.uiParams.activeMOD);

addControl (new gin::ModSrcListBox (proc.modMatrix), 0, 0, 3, 2);
}

WavetableAudioProcessor& proc;
};

//==============================================================================
class MatrixBox : public gin::ParamBox
{
public:
MatrixBox (const juce::String& name, WavetableAudioProcessor& proc_)
: gin::ParamBox (name), proc (proc_)
{
setName ("mtx");

addHeader ({"SRC", "MTX"}, 1, proc.uiParams.activeMOD);

addControl (new gin::ModMatrixBox (proc, proc.modMatrix), 0, 0, 3, 2);
}

WavetableAudioProcessor& proc;
};

//==============================================================================
class GlobalBox : public gin::ParamBox
{
Expand Down
1 change: 1 addition & 0 deletions plugin/Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ void WavetableAudioProcessor::UIParams::setup (WavetableAudioProcessor& p)
{
activeLFO = p.addIntParam ("uiLFO", "LFO", "", "", { 0.0, 2.0, 0.0, 1.0 }, 0.0, 0.0f);
activeENV = p.addIntParam ("uiENV", "ENV", "", "", { 0.0, 2.0, 0.0, 1.0 }, 0.0f, 0.0f);
activeMOD = p.addIntParam ("uiMOD", "MOD", "", "", { 0.0, 1.0, 0.0, 1.0 }, 0.0f, 0.0f);
}

//==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion plugin/Source/PluginProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class WavetableAudioProcessor : public gin::Processor,
{
UIParams() = default;

gin::Parameter::Ptr activeLFO, activeENV;
gin::Parameter::Ptr activeLFO, activeENV, activeMOD;

void setup (WavetableAudioProcessor& p);

Expand Down

0 comments on commit 4421c1e

Please sign in to comment.