commit 4886d8c700fbf33ce55bb1442d7ca7c936935144
parent 91a36b8152a68c824029861406d36687dd4c7557
Author: Adam M <aemalone@gmail.com>
Date: Fri, 5 Jul 2019 20:01:09 -0500
Arrange pobs and puttons so they match merge & split orientation. Add module presets for Laundry Soup
Diffstat:
4 files changed, 111 insertions(+), 24 deletions(-)
diff --git a/presets/computerscare-laundry-soup/6-Channel Random Trigger.vcvm b/presets/computerscare-laundry-soup/6-Channel Random Trigger.vcvm
@@ -0,0 +1,48 @@
+{
+ "id": 12,
+ "plugin": "computerscare",
+ "version": "1.0.0",
+ "model": "computerscare-laundry-soup",
+ "params": [
+ {
+ "id": 0,
+ "value": 0.0
+ },
+ {
+ "id": 1,
+ "value": 0.0
+ },
+ {
+ "id": 2,
+ "value": 0.0
+ },
+ {
+ "id": 3,
+ "value": 0.0
+ },
+ {
+ "id": 4,
+ "value": 0.0
+ },
+ {
+ "id": 5,
+ "value": 0.0
+ },
+ {
+ "id": 6,
+ "value": 0.0
+ },
+ {
+ "id": 7,
+ "value": 0.0
+ }
+ ],
+ "sequences": [
+ "1?",
+ "1?",
+ "1?",
+ "1?",
+ "1?",
+ "1?"
+ ]
+}
+\ No newline at end of file
diff --git a/presets/computerscare-laundry-soup/Integer Clock Divider.vcvm b/presets/computerscare-laundry-soup/Integer Clock Divider.vcvm
@@ -0,0 +1,49 @@
+{
+ "id": 12,
+ "plugin": "computerscare",
+ "version": "1.0.0",
+ "model": "computerscare-laundry-soup",
+ "params": [
+ {
+ "id": 0,
+ "value": 0.0
+ },
+ {
+ "id": 1,
+ "value": 0.0
+ },
+ {
+ "id": 2,
+ "value": 0.0
+ },
+ {
+ "id": 3,
+ "value": 0.0
+ },
+ {
+ "id": 4,
+ "value": 0.0
+ },
+ {
+ "id": 5,
+ "value": 0.0
+ },
+ {
+ "id": 6,
+ "value": 0.0
+ },
+ {
+ "id": 7,
+ "value": 0.0
+ }
+ ],
+ "rightModuleId": 9,
+ "sequences": [
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7"
+ ]
+}
+\ No newline at end of file
diff --git a/src/ComputerscareBolyPuttons.cpp b/src/ComputerscareBolyPuttons.cpp
@@ -128,10 +128,15 @@ struct ComputerscareBolyPuttonsWidget : ModuleWidget {
}
float xx;
float yy;
+ // for (int i = 0; i < numToggles; i++) {
+ // xx = 7.4f + 27.3 * (i % 2);
+ // yy = 94 + 16.5 * (i - i % 2) + 11.3 * (i % 2);
+ // addLabeledButton(std::to_string(i + 1), xx, yy, module, i, (i % 2) * (3 + 10 * (i < 9)) - 2, 0);
+ // }
for (int i = 0; i < numToggles; i++) {
- xx = 7.4f + 27.3 * (i % 2);
- yy = 94 + 16.5 * (i - i % 2) + 11.3 * (i % 2);
- addLabeledButton(std::to_string(i + 1), xx, yy, module, i, (i % 2) * (3 + 10 * (i < 9)) - 2, 0);
+ xx = 7.2f + 24.3 * (i - i % 8) / 8;
+ yy = 92 + 33.5 * (i % 8) + 14.3 * (i - i % 8) / 8;
+ addLabeledButton(std::to_string(i + 1), xx, yy, module, i, (i - i % 8) * 1.2 - 2, 2);
}
@@ -149,19 +154,9 @@ struct ComputerscareBolyPuttonsWidget : ModuleWidget {
smallLetterDisplay->value = label;
smallLetterDisplay->textAlign = 1;
smallLetterDisplay->box.pos = Vec(x + labelDx, y - 12 + labelDy);
-
- //SmallIsoButton sib = new SmallIsoButton(momentary);
- //sib->box.pos=Vec(x, y);
- //sib->module = module;
-
- //addParam(sib);
- addParam(createParam<SmallIsoButton>(Vec(x, y), module, ComputerscareBolyPuttons::TOGGLE + index));
-
-
-
-
addChild(smallLetterDisplay);
+ addParam(createParam<SmallIsoButton>(Vec(x, y), module, ComputerscareBolyPuttons::TOGGLE + index));
}
json_t *toJson() override
{
@@ -200,12 +195,6 @@ void ComputerscareBolyPuttonsWidget::appendContextMenu(Menu *menu)
MenuLabel *spacerLabel = new MenuLabel();
menu->addChild(spacerLabel);
-
- MenuLabel *modeLabel = new MenuLabel();
- modeLabel->text = "Output Range";
- menu->addChild(modeLabel);
-
- // randomization output bounds
menu->addChild(construct<MenuLabel>());
menu->addChild(construct<MenuLabel>(&MenuLabel::text, "Output Range"));
menu->addChild(construct<OutputRangeItem>(&MenuItem::text, " 0v ... +10v", &OutputRangeItem::bolyPuttons, bolyPuttons, &OutputRangeItem::outputRangeEnum, 0));
@@ -213,7 +202,6 @@ void ComputerscareBolyPuttonsWidget::appendContextMenu(Menu *menu)
menu->addChild(construct<OutputRangeItem>(&MenuItem::text, " 0v ... +5v", &OutputRangeItem::bolyPuttons, bolyPuttons, &OutputRangeItem::outputRangeEnum, 2));
menu->addChild(construct<OutputRangeItem>(&MenuItem::text, " 0v ... +1v", &OutputRangeItem::bolyPuttons, bolyPuttons, &OutputRangeItem::outputRangeEnum, 3));
menu->addChild(construct<OutputRangeItem>(&MenuItem::text, " -1v ... +1v", &OutputRangeItem::bolyPuttons, bolyPuttons, &OutputRangeItem::outputRangeEnum, 4));
-
menu->addChild(construct<OutputRangeItem>(&MenuItem::text, "-10v ... +10v", &OutputRangeItem::bolyPuttons, bolyPuttons, &OutputRangeItem::outputRangeEnum, 5));
}
diff --git a/src/ComputerscareKnolyPobs.cpp b/src/ComputerscareKnolyPobs.cpp
@@ -74,9 +74,9 @@ struct ComputerscareKnolyPobsWidget : ModuleWidget {
float xx;
float yy;
for (int i = 0; i < numKnobs; i++) {
- xx = 1.4f + 24.3 * (i % 2);
- yy = 64 + 18.5 * (i - i % 2) + 11.3 * (i % 2);
- addLabeledKnob(std::to_string(i + 1), xx, yy, module, i, (i % 2) * (11 + 5 * (i < 9)) - 4, 0);
+ xx = 1.4f + 24.3 * (i-i % 8)/8;
+ yy = 64 + 37.5 * (i % 8) + 14.3 * (i - i % 8)/8;
+ addLabeledKnob(std::to_string(i + 1), xx, yy, module, i, (i-i%8)*1.2-2, 0);
}