Skip to content

Commit

Permalink
Add LP/HP/BP to the BitCrusher effect filter (#1054)
Browse files Browse the repository at this point in the history
Along the way, add json int param enablement capability, and
make multiswitch obey isenabled
  • Loading branch information
baconpaul authored Jul 29, 2024
1 parent be73182 commit 2469484
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
10 changes: 10 additions & 0 deletions src-ui/components/multi/ProcessorPane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,16 @@ bool ProcessorPane::layoutControlsFromJSON(const std::string &jsonpath,
lw->setJustification(juce::Justification::centred);
otherEditors.push_back(std::move(lw));
}

auto ei = ictag("enable-if", -1);
if (ei >= 0)
{
if (ei == c.index)
{
SCLOG("WARNING: Enable-if set to self on component " << c.index);
}
intEditors[c.index]->item->setEnabled(intAttachments[ei]->getValue());
}
}
else if (c.index < 0)
{
Expand Down
18 changes: 15 additions & 3 deletions src-ui/json-layout/processors/bitcrusher.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{
"index": 3,
"coordinates": [
40,
70,
80,
50,
50
Expand All @@ -46,7 +46,7 @@
{
"index": 4,
"coordinates": [
100,
130,
80,
50,
50
Expand All @@ -58,11 +58,23 @@
"component": "power",
"index": 0,
"coordinates": [
100,
130,
80,
50,
50
]
},
{
"type": "int",
"component": "multiswitch",
"index": 1,
"coordinates": [
10,
80,
50,
50
],
"enable-if": 0
}
]
}

0 comments on commit 2469484

Please sign in to comment.