diff --git a/plugin.json b/plugin.json
index 5d60bda..d242985 100644
--- a/plugin.json
+++ b/plugin.json
@@ -24,7 +24,7 @@
},
{
"slug": "VCO2",
- "name": "Wavetable VCO (beta)",
+ "name": "Wavetable VCO",
"description": "Voltage-controlled wavetable oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#VCO",
"tags": [
diff --git a/res/8vert.svg b/res/8vert.svg
index 518bb3a..8c370ae 100644
--- a/res/8vert.svg
+++ b/res/8vert.svg
@@ -1,588 +1,888 @@
-
-
diff --git a/res/MidSide.svg b/res/MidSide.svg
index ae206d3..f0b6407 100644
--- a/res/MidSide.svg
+++ b/res/MidSide.svg
@@ -1,541 +1,601 @@
-
-
diff --git a/res/Mutes.svg b/res/Mutes.svg
index 640902c..a9e1636 100644
--- a/res/Mutes.svg
+++ b/res/Mutes.svg
@@ -1,1274 +1,662 @@
-
-
diff --git a/res/Noise.svg b/res/Noise.svg
index 2510364..5c3663b 100644
--- a/res/Noise.svg
+++ b/res/Noise.svg
@@ -1,6 +1,4 @@
-
-
diff --git a/res/Octave.svg b/res/Octave.svg
index 680da88..20f05d1 100644
--- a/res/Octave.svg
+++ b/res/Octave.svg
@@ -1,6 +1,4 @@
-
-
diff --git a/res/Pulses.svg b/res/Pulses.svg
index 095afd6..a4bf5d9 100644
--- a/res/Pulses.svg
+++ b/res/Pulses.svg
@@ -1,6 +1,4 @@
-
-
diff --git a/res/Quantizer.svg b/res/Quantizer.svg
index e8c12eb..eec8ce0 100644
--- a/res/Quantizer.svg
+++ b/res/Quantizer.svg
@@ -1,6 +1,4 @@
-
-
diff --git a/res/SequentialSwitch1.svg b/res/SequentialSwitch1.svg
index 1df9f53..5bb7f86 100644
--- a/res/SequentialSwitch1.svg
+++ b/res/SequentialSwitch1.svg
@@ -1,484 +1,321 @@
-
-
diff --git a/res/SequentialSwitch2.svg b/res/SequentialSwitch2.svg
index 30b87ed..4ced48e 100644
--- a/res/SequentialSwitch2.svg
+++ b/res/SequentialSwitch2.svg
@@ -1,490 +1,321 @@
-
-
diff --git a/src/8vert.cpp b/src/8vert.cpp
index 89eca16..0ef371b 100644
--- a/src/8vert.cpp
+++ b/src/8vert.cpp
@@ -90,37 +90,37 @@ struct _8vertWidget : ModuleWidget {
setModule(module);
setPanel(createPanel(asset::plugin(pluginInstance, "res/8vert.svg")));
- addChild(createWidget(Vec(15, 0)));
- addChild(createWidget(Vec(box.size.x - 30, 0)));
- addChild(createWidget(Vec(15, 365)));
- addChild(createWidget(Vec(box.size.x - 30, 365)));
-
- addParam(createParam(Vec(45.308, 47.753), module, _8vert::GAIN_PARAMS + 0));
- addParam(createParam(Vec(45.308, 86.198), module, _8vert::GAIN_PARAMS + 1));
- addParam(createParam(Vec(45.308, 124.639), module, _8vert::GAIN_PARAMS + 2));
- addParam(createParam(Vec(45.308, 163.084), module, _8vert::GAIN_PARAMS + 3));
- addParam(createParam(Vec(45.308, 201.529), module, _8vert::GAIN_PARAMS + 4));
- addParam(createParam(Vec(45.308, 239.974), module, _8vert::GAIN_PARAMS + 5));
- addParam(createParam(Vec(45.308, 278.415), module, _8vert::GAIN_PARAMS + 6));
- addParam(createParam(Vec(45.308, 316.86), module, _8vert::GAIN_PARAMS + 7));
-
- addInput(createInput(Vec(9.507, 50.397), module, _8vert::IN_INPUTS + 0));
- addInput(createInput(Vec(9.507, 88.842), module, _8vert::IN_INPUTS + 1));
- addInput(createInput(Vec(9.507, 127.283), module, _8vert::IN_INPUTS + 2));
- addInput(createInput(Vec(9.507, 165.728), module, _8vert::IN_INPUTS + 3));
- addInput(createInput(Vec(9.507, 204.173), module, _8vert::IN_INPUTS + 4));
- addInput(createInput(Vec(9.507, 242.614), module, _8vert::IN_INPUTS + 5));
- addInput(createInput(Vec(9.507, 281.059), module, _8vert::IN_INPUTS + 6));
- addInput(createInput(Vec(9.507, 319.504), module, _8vert::IN_INPUTS + 7));
-
- addOutput(createOutput(Vec(86.393, 50.397), module, _8vert::OUT_OUTPUTS + 0));
- addOutput(createOutput(Vec(86.393, 88.842), module, _8vert::OUT_OUTPUTS + 1));
- addOutput(createOutput(Vec(86.393, 127.283), module, _8vert::OUT_OUTPUTS + 2));
- addOutput(createOutput(Vec(86.393, 165.728), module, _8vert::OUT_OUTPUTS + 3));
- addOutput(createOutput(Vec(86.393, 204.173), module, _8vert::OUT_OUTPUTS + 4));
- addOutput(createOutput(Vec(86.393, 242.614), module, _8vert::OUT_OUTPUTS + 5));
- addOutput(createOutput(Vec(86.393, 281.059), module, _8vert::OUT_OUTPUTS + 6));
- addOutput(createOutput(Vec(86.393, 319.504), module, _8vert::OUT_OUTPUTS + 7));
+ addChild(createWidget(Vec(RACK_GRID_WIDTH, 0)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
+ addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
+
+ addParam(createParamCentered(mm2px(Vec(20.351, 21.968)), module, _8vert::GAIN_PARAMS + 0));
+ addParam(createParamCentered(mm2px(Vec(20.351, 34.982)), module, _8vert::GAIN_PARAMS + 1));
+ addParam(createParamCentered(mm2px(Vec(20.351, 48.004)), module, _8vert::GAIN_PARAMS + 2));
+ addParam(createParamCentered(mm2px(Vec(20.351, 61.026)), module, _8vert::GAIN_PARAMS + 3));
+ addParam(createParamCentered(mm2px(Vec(20.351, 74.048)), module, _8vert::GAIN_PARAMS + 4));
+ addParam(createParamCentered(mm2px(Vec(20.351, 87.07)), module, _8vert::GAIN_PARAMS + 5));
+ addParam(createParamCentered(mm2px(Vec(20.351, 100.093)), module, _8vert::GAIN_PARAMS + 6));
+ addParam(createParamCentered(mm2px(Vec(20.351, 113.115)), module, _8vert::GAIN_PARAMS + 7));
+
+ addInput(createInputCentered(mm2px(Vec(7.331, 21.968)), module, _8vert::IN_INPUTS + 0));
+ addInput(createInputCentered(mm2px(Vec(7.331, 34.982)), module, _8vert::IN_INPUTS + 1));
+ addInput(createInputCentered(mm2px(Vec(7.331, 48.004)), module, _8vert::IN_INPUTS + 2));
+ addInput(createInputCentered(mm2px(Vec(7.331, 61.026)), module, _8vert::IN_INPUTS + 3));
+ addInput(createInputCentered(mm2px(Vec(7.331, 74.048)), module, _8vert::IN_INPUTS + 4));
+ addInput(createInputCentered(mm2px(Vec(7.331, 87.07)), module, _8vert::IN_INPUTS + 5));
+ addInput(createInputCentered(mm2px(Vec(7.331, 100.093)), module, _8vert::IN_INPUTS + 6));
+ addInput(createInputCentered(mm2px(Vec(7.331, 113.115)), module, _8vert::IN_INPUTS + 7));
+
+ addOutput(createOutputCentered(mm2px(Vec(33.371, 21.968)), module, _8vert::OUT_OUTPUTS + 0));
+ addOutput(createOutputCentered(mm2px(Vec(33.371, 34.982)), module, _8vert::OUT_OUTPUTS + 1));
+ addOutput(createOutputCentered(mm2px(Vec(33.371, 48.004)), module, _8vert::OUT_OUTPUTS + 2));
+ addOutput(createOutputCentered(mm2px(Vec(33.371, 61.026)), module, _8vert::OUT_OUTPUTS + 3));
+ addOutput(createOutputCentered(mm2px(Vec(33.371, 74.048)), module, _8vert::OUT_OUTPUTS + 4));
+ addOutput(createOutputCentered(mm2px(Vec(33.371, 87.07)), module, _8vert::OUT_OUTPUTS + 5));
+ addOutput(createOutputCentered(mm2px(Vec(33.371, 100.093)), module, _8vert::OUT_OUTPUTS + 6));
+ addOutput(createOutputCentered(mm2px(Vec(33.371, 113.115)), module, _8vert::OUT_OUTPUTS + 7));
}
};
diff --git a/src/Mutes.cpp b/src/Mutes.cpp
index b4efd1b..063ee46 100644
--- a/src/Mutes.cpp
+++ b/src/Mutes.cpp
@@ -106,43 +106,43 @@ struct MutesWidget : ModuleWidget {
setModule(module);
setPanel(createPanel(asset::plugin(pluginInstance, "res/Mutes.svg")));
- addChild(createWidget(Vec(15, 0)));
- addChild(createWidget(Vec(box.size.x - 30, 0)));
- addChild(createWidget(Vec(15, 365)));
- addChild(createWidget(Vec(box.size.x - 30, 365)));
-
- addParam(createLightParam>(mm2px(Vec(16.57, 18.165)), module, Mutes::MUTE_PARAMS + 0, Mutes::MUTE_LIGHTS + 0));
- addParam(createLightParam>(mm2px(Vec(16.57, 28.164)), module, Mutes::MUTE_PARAMS + 1, Mutes::MUTE_LIGHTS + 1));
- addParam(createLightParam>(mm2px(Vec(16.57, 38.164)), module, Mutes::MUTE_PARAMS + 2, Mutes::MUTE_LIGHTS + 2));
- addParam(createLightParam>(mm2px(Vec(16.57, 48.165)), module, Mutes::MUTE_PARAMS + 3, Mutes::MUTE_LIGHTS + 3));
- addParam(createLightParam>(mm2px(Vec(16.57, 58.164)), module, Mutes::MUTE_PARAMS + 4, Mutes::MUTE_LIGHTS + 4));
- addParam(createLightParam>(mm2px(Vec(16.57, 68.165)), module, Mutes::MUTE_PARAMS + 5, Mutes::MUTE_LIGHTS + 5));
- addParam(createLightParam>(mm2px(Vec(16.57, 78.164)), module, Mutes::MUTE_PARAMS + 6, Mutes::MUTE_LIGHTS + 6));
- addParam(createLightParam>(mm2px(Vec(16.57, 88.164)), module, Mutes::MUTE_PARAMS + 7, Mutes::MUTE_LIGHTS + 7));
- addParam(createLightParam>(mm2px(Vec(16.57, 98.165)), module, Mutes::MUTE_PARAMS + 8, Mutes::MUTE_LIGHTS + 8));
- addParam(createLightParam>(mm2px(Vec(16.57, 108.166)), module, Mutes::MUTE_PARAMS + 9, Mutes::MUTE_LIGHTS + 9));
-
- addInput(createInput(mm2px(Vec(4.214, 17.81)), module, Mutes::IN_INPUTS + 0));
- addInput(createInput(mm2px(Vec(4.214, 27.809)), module, Mutes::IN_INPUTS + 1));
- addInput(createInput(mm2px(Vec(4.214, 37.809)), module, Mutes::IN_INPUTS + 2));
- addInput(createInput(mm2px(Vec(4.214, 47.81)), module, Mutes::IN_INPUTS + 3));
- addInput(createInput(mm2px(Vec(4.214, 57.81)), module, Mutes::IN_INPUTS + 4));
- addInput(createInput(mm2px(Vec(4.214, 67.809)), module, Mutes::IN_INPUTS + 5));
- addInput(createInput(mm2px(Vec(4.214, 77.81)), module, Mutes::IN_INPUTS + 6));
- addInput(createInput(mm2px(Vec(4.214, 87.81)), module, Mutes::IN_INPUTS + 7));
- addInput(createInput(mm2px(Vec(4.214, 97.809)), module, Mutes::IN_INPUTS + 8));
- addInput(createInput(mm2px(Vec(4.214, 107.809)), module, Mutes::IN_INPUTS + 9));
-
- addOutput(createOutput(mm2px(Vec(28.214, 17.81)), module, Mutes::OUT_OUTPUTS + 0));
- addOutput(createOutput(mm2px(Vec(28.214, 27.809)), module, Mutes::OUT_OUTPUTS + 1));
- addOutput(createOutput(mm2px(Vec(28.214, 37.809)), module, Mutes::OUT_OUTPUTS + 2));
- addOutput(createOutput(mm2px(Vec(28.214, 47.81)), module, Mutes::OUT_OUTPUTS + 3));
- addOutput(createOutput(mm2px(Vec(28.214, 57.809)), module, Mutes::OUT_OUTPUTS + 4));
- addOutput(createOutput(mm2px(Vec(28.214, 67.809)), module, Mutes::OUT_OUTPUTS + 5));
- addOutput(createOutput(mm2px(Vec(28.214, 77.81)), module, Mutes::OUT_OUTPUTS + 6));
- addOutput(createOutput(mm2px(Vec(28.214, 87.81)), module, Mutes::OUT_OUTPUTS + 7));
- addOutput(createOutput(mm2px(Vec(28.214, 97.809)), module, Mutes::OUT_OUTPUTS + 8));
- addOutput(createOutput(mm2px(Vec(28.214, 107.809)), module, Mutes::OUT_OUTPUTS + 9));
+ addChild(createWidget(Vec(RACK_GRID_WIDTH, 0)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
+ addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
+
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 21.968)), module, Mutes::MUTE_PARAMS + 0, Mutes::MUTE_LIGHTS + 0));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 32.095)), module, Mutes::MUTE_PARAMS + 1, Mutes::MUTE_LIGHTS + 1));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 42.222)), module, Mutes::MUTE_PARAMS + 2, Mutes::MUTE_LIGHTS + 2));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 52.35)), module, Mutes::MUTE_PARAMS + 3, Mutes::MUTE_LIGHTS + 3));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 62.477)), module, Mutes::MUTE_PARAMS + 4, Mutes::MUTE_LIGHTS + 4));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 72.605)), module, Mutes::MUTE_PARAMS + 5, Mutes::MUTE_LIGHTS + 5));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 82.732)), module, Mutes::MUTE_PARAMS + 6, Mutes::MUTE_LIGHTS + 6));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 92.86)), module, Mutes::MUTE_PARAMS + 7, Mutes::MUTE_LIGHTS + 7));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 102.987)), module, Mutes::MUTE_PARAMS + 8, Mutes::MUTE_LIGHTS + 8));
+ addParam(createLightParamCentered>(mm2px(Vec(20.312, 113.115)), module, Mutes::MUTE_PARAMS + 9, Mutes::MUTE_LIGHTS + 9));
+
+ addInput(createInputCentered(mm2px(Vec(7.291, 21.968)), module, Mutes::IN_INPUTS + 0));
+ addInput(createInputCentered(mm2px(Vec(7.291, 32.095)), module, Mutes::IN_INPUTS + 1));
+ addInput(createInputCentered(mm2px(Vec(7.291, 42.222)), module, Mutes::IN_INPUTS + 2));
+ addInput(createInputCentered(mm2px(Vec(7.291, 52.35)), module, Mutes::IN_INPUTS + 3));
+ addInput(createInputCentered(mm2px(Vec(7.291, 62.477)), module, Mutes::IN_INPUTS + 4));
+ addInput(createInputCentered(mm2px(Vec(7.291, 72.605)), module, Mutes::IN_INPUTS + 5));
+ addInput(createInputCentered(mm2px(Vec(7.291, 82.732)), module, Mutes::IN_INPUTS + 6));
+ addInput(createInputCentered(mm2px(Vec(7.291, 92.86)), module, Mutes::IN_INPUTS + 7));
+ addInput(createInputCentered(mm2px(Vec(7.291, 102.987)), module, Mutes::IN_INPUTS + 8));
+ addInput(createInputCentered(mm2px(Vec(7.291, 113.115)), module, Mutes::IN_INPUTS + 9));
+
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 21.968)), module, Mutes::OUT_OUTPUTS + 0));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 32.095)), module, Mutes::OUT_OUTPUTS + 1));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 42.222)), module, Mutes::OUT_OUTPUTS + 2));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 52.35)), module, Mutes::OUT_OUTPUTS + 3));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 62.477)), module, Mutes::OUT_OUTPUTS + 4));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 72.605)), module, Mutes::OUT_OUTPUTS + 5));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 82.732)), module, Mutes::OUT_OUTPUTS + 6));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 92.86)), module, Mutes::OUT_OUTPUTS + 7));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 102.987)), module, Mutes::OUT_OUTPUTS + 8));
+ addOutput(createOutputCentered(mm2px(Vec(33.332, 113.115)), module, Mutes::OUT_OUTPUTS + 9));
}
};
diff --git a/src/Noise.cpp b/src/Noise.cpp
index 094c1d4..8b4ecdc 100644
--- a/src/Noise.cpp
+++ b/src/Noise.cpp
@@ -186,13 +186,13 @@ struct NoiseWidget : ModuleWidget {
addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
- addOutput(createOutputCentered(mm2px(Vec(7.621, 21.727)), module, Noise::WHITE_OUTPUT));
- addOutput(createOutputCentered(mm2px(Vec(7.621, 36.726)), module, Noise::PINK_OUTPUT));
- addOutput(createOutputCentered(mm2px(Vec(7.621, 51.727)), module, Noise::RED_OUTPUT));
- addOutput(createOutputCentered(mm2px(Vec(7.621, 66.727)), module, Noise::VIOLET_OUTPUT));
- addOutput(createOutputCentered(mm2px(Vec(7.621, 81.727)), module, Noise::BLUE_OUTPUT));
- addOutput(createOutputCentered(mm2px(Vec(7.621, 96.727)), module, Noise::GRAY_OUTPUT));
- addOutput(createOutputCentered(mm2px(Vec(7.621, 111.727)), module, Noise::BLACK_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 21.897)), module, Noise::WHITE_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 37.102)), module, Noise::PINK_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 52.31)), module, Noise::RED_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 67.53)), module, Noise::VIOLET_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 82.732)), module, Noise::BLUE_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 97.923)), module, Noise::GRAY_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 113.115)), module, Noise::BLACK_OUTPUT));
}
};
diff --git a/src/Octave.cpp b/src/Octave.cpp
index 770a6f7..e61c2af 100644
--- a/src/Octave.cpp
+++ b/src/Octave.cpp
@@ -114,7 +114,7 @@ struct OctaveButton : Widget {
struct OctaveParam : ParamWidget {
OctaveParam() {
- box.size = mm2px(Vec(15.24, 63.0));
+ box.size = mm2px(Vec(15.263, 55.88));
const int octaves = 9;
const float margin = mm2px(2.0);
float height = box.size.y - 2 * margin;
@@ -126,16 +126,6 @@ struct OctaveParam : ParamWidget {
addChild(octaveButton);
}
}
-
- void draw(const DrawArgs& args) override {
- // Background
- nvgBeginPath(args.vg);
- nvgRect(args.vg, 0, 0, box.size.x, box.size.y);
- nvgFillColor(args.vg, nvgRGB(0, 0, 0));
- nvgFill(args.vg);
-
- ParamWidget::draw(args);
- }
};
@@ -155,6 +145,12 @@ inline void OctaveButton::onDragEnter(const event::DragEnter& e) {
}
+struct OctaveDisplay : LedDisplay {
+ void setModule(Octave* module) {
+ addChild(createParam(mm2px(Vec(0.0, 0.0)), module, Octave::OCTAVE_PARAM));
+ }
+};
+
struct OctaveWidget : ModuleWidget {
OctaveWidget(Octave* module) {
@@ -162,14 +158,19 @@ struct OctaveWidget : ModuleWidget {
setPanel(createPanel(asset::plugin(pluginInstance, "res/Octave.svg")));
addChild(createWidget(Vec(RACK_GRID_WIDTH, 0)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
- addInput(createInputCentered(mm2px(Vec(7.62, 82.753)), module, Octave::OCTAVE_INPUT));
- addInput(createInputCentered(mm2px(Vec(7.62, 97.253)), module, Octave::PITCH_INPUT));
+ addInput(createInputCentered(mm2px(Vec(7.62, 80.573)), module, Octave::OCTAVE_INPUT));
+ addInput(createInputCentered(mm2px(Vec(7.62, 96.859)), module, Octave::PITCH_INPUT));
- addOutput(createOutputCentered(mm2px(Vec(7.62, 112.253)), module, Octave::PITCH_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 113.115)), module, Octave::PITCH_OUTPUT));
- addParam(createParam(mm2px(Vec(0.0, 12.817)), module, Octave::OCTAVE_PARAM));
+ OctaveDisplay* display = createWidget(mm2px(Vec(-0.011, 13.039)));
+ display->box.size = mm2px(Vec(15.263, 55.88));
+ display->setModule(module);
+ addChild(display);
}
};
diff --git a/src/Pulses.cpp b/src/Pulses.cpp
index 89680fe..0535542 100644
--- a/src/Pulses.cpp
+++ b/src/Pulses.cpp
@@ -3,7 +3,7 @@
struct Pulses : Module {
enum ParamIds {
- ENUMS(TAP_PARAMS, 10),
+ ENUMS(PUSH_PARAMS, 10),
NUM_PARAMS
};
enum InputIds {
@@ -15,7 +15,7 @@ struct Pulses : Module {
NUM_OUTPUTS
};
enum LightIds {
- ENUMS(TAP_LIGHTS, 10),
+ ENUMS(PUSH_LIGHTS, 10),
NUM_LIGHTS
};
@@ -25,7 +25,7 @@ struct Pulses : Module {
Pulses() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
for (int i = 0; i < 10; i++) {
- configButton(TAP_PARAMS + i, string::f("Row %d button", i + 1));
+ configButton(PUSH_PARAMS + i, string::f("Row %d button", i + 1));
configOutput(TRIG_OUTPUTS + i, string::f("Row %d trigger", i + 1));
configOutput(GATE_OUTPUTS + i, string::f("Row %d gate", i + 1));
}
@@ -33,14 +33,14 @@ struct Pulses : Module {
void process(const ProcessArgs& args) override {
for (int i = 0; i < 10; i++) {
- bool tap = params[TAP_PARAMS + i].getValue() > 0.f;
+ bool tap = params[PUSH_PARAMS + i].getValue() > 0.f;
if (tapTriggers[i].process(tap)) {
pulseGenerators[i].trigger(1e-3f);
}
bool pulse = pulseGenerators[i].process(args.sampleTime);
outputs[TRIG_OUTPUTS + i].setVoltage(pulse ? 10.f : 0.f);
outputs[GATE_OUTPUTS + i].setVoltage(tap ? 10.f : 0.f);
- lights[TAP_LIGHTS + i].setBrightness(tap);
+ lights[PUSH_LIGHTS + i].setBrightness(tap);
}
}
};
@@ -56,37 +56,38 @@ struct PulsesWidget : ModuleWidget {
addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 21.505)), module, Pulses::TAP_PARAMS + 0, Pulses::TAP_LIGHTS + 0));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 31.504)), module, Pulses::TAP_PARAMS + 1, Pulses::TAP_LIGHTS + 1));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 41.505)), module, Pulses::TAP_PARAMS + 2, Pulses::TAP_LIGHTS + 2));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 51.505)), module, Pulses::TAP_PARAMS + 3, Pulses::TAP_LIGHTS + 3));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 61.505)), module, Pulses::TAP_PARAMS + 4, Pulses::TAP_LIGHTS + 4));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 71.505)), module, Pulses::TAP_PARAMS + 5, Pulses::TAP_LIGHTS + 5));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 81.505)), module, Pulses::TAP_PARAMS + 6, Pulses::TAP_LIGHTS + 6));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 91.504)), module, Pulses::TAP_PARAMS + 7, Pulses::TAP_LIGHTS + 7));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 101.505)), module, Pulses::TAP_PARAMS + 8, Pulses::TAP_LIGHTS + 8));
- addParam(createLightParamCentered>(mm2px(Vec(8.32, 111.505)), module, Pulses::TAP_PARAMS + 9, Pulses::TAP_LIGHTS + 9));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 21.968)), module, Pulses::PUSH_PARAMS + 0, Pulses::PUSH_LIGHTS + 0));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 32.095)), module, Pulses::PUSH_PARAMS + 1, Pulses::PUSH_LIGHTS + 1));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 42.222)), module, Pulses::PUSH_PARAMS + 2, Pulses::PUSH_LIGHTS + 2));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 52.35)), module, Pulses::PUSH_PARAMS + 3, Pulses::PUSH_LIGHTS + 3));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 62.477)), module, Pulses::PUSH_PARAMS + 4, Pulses::PUSH_LIGHTS + 4));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 72.605)), module, Pulses::PUSH_PARAMS + 5, Pulses::PUSH_LIGHTS + 5));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 82.732)), module, Pulses::PUSH_PARAMS + 6, Pulses::PUSH_LIGHTS + 6));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 92.86)), module, Pulses::PUSH_PARAMS + 7, Pulses::PUSH_LIGHTS + 7));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 102.987)), module, Pulses::PUSH_PARAMS + 8, Pulses::PUSH_LIGHTS + 8));
+ addParam(createLightParamCentered>(mm2px(Vec(7.28, 113.115)), module, Pulses::PUSH_PARAMS + 9, Pulses::PUSH_LIGHTS + 9));
+
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 21.968)), module, Pulses::TRIG_OUTPUTS + 0));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 32.095)), module, Pulses::TRIG_OUTPUTS + 1));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 42.222)), module, Pulses::TRIG_OUTPUTS + 2));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 52.35)), module, Pulses::TRIG_OUTPUTS + 3));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 62.477)), module, Pulses::TRIG_OUTPUTS + 4));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 72.605)), module, Pulses::TRIG_OUTPUTS + 5));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 82.732)), module, Pulses::TRIG_OUTPUTS + 6));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 92.86)), module, Pulses::TRIG_OUTPUTS + 7));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 102.987)), module, Pulses::TRIG_OUTPUTS + 8));
+ addOutput(createOutputCentered(mm2px(Vec(20.313, 113.115)), module, Pulses::TRIG_OUTPUTS + 9));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 21.968)), module, Pulses::GATE_OUTPUTS + 0));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 32.095)), module, Pulses::GATE_OUTPUTS + 1));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 42.222)), module, Pulses::GATE_OUTPUTS + 2));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 52.35)), module, Pulses::GATE_OUTPUTS + 3));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 62.477)), module, Pulses::GATE_OUTPUTS + 4));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 72.605)), module, Pulses::GATE_OUTPUTS + 5));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 82.732)), module, Pulses::GATE_OUTPUTS + 6));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 92.86)), module, Pulses::GATE_OUTPUTS + 7));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 102.987)), module, Pulses::GATE_OUTPUTS + 8));
+ addOutput(createOutputCentered(mm2px(Vec(33.321, 113.115)), module, Pulses::GATE_OUTPUTS + 9));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 21.504)), module, Pulses::TRIG_OUTPUTS + 0));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 21.504)), module, Pulses::GATE_OUTPUTS + 0));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 31.504)), module, Pulses::TRIG_OUTPUTS + 1));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 31.504)), module, Pulses::GATE_OUTPUTS + 1));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 41.505)), module, Pulses::TRIG_OUTPUTS + 2));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 41.505)), module, Pulses::GATE_OUTPUTS + 2));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 51.504)), module, Pulses::TRIG_OUTPUTS + 3));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 51.504)), module, Pulses::GATE_OUTPUTS + 3));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 61.504)), module, Pulses::TRIG_OUTPUTS + 4));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 61.504)), module, Pulses::GATE_OUTPUTS + 4));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 71.504)), module, Pulses::TRIG_OUTPUTS + 5));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 71.504)), module, Pulses::GATE_OUTPUTS + 5));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 81.505)), module, Pulses::TRIG_OUTPUTS + 6));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 81.505)), module, Pulses::GATE_OUTPUTS + 6));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 91.504)), module, Pulses::TRIG_OUTPUTS + 7));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 91.504)), module, Pulses::GATE_OUTPUTS + 7));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 101.504)), module, Pulses::TRIG_OUTPUTS + 8));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 101.504)), module, Pulses::GATE_OUTPUTS + 8));
- addOutput(createOutputCentered(mm2px(Vec(20.319, 111.504)), module, Pulses::TRIG_OUTPUTS + 9));
- addOutput(createOutputCentered(mm2px(Vec(32.319, 111.504)), module, Pulses::GATE_OUTPUTS + 9));
}
};
diff --git a/src/Quantizer.cpp b/src/Quantizer.cpp
index 498cb37..1c5b09f 100644
--- a/src/Quantizer.cpp
+++ b/src/Quantizer.cpp
@@ -3,6 +3,7 @@
struct Quantizer : Module {
enum ParamIds {
+ OFFSET_PARAM, // TODO
NUM_PARAMS
};
enum InputIds {
@@ -24,6 +25,7 @@ struct Quantizer : Module {
Quantizer() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
+ configParam(OFFSET_PARAM, -1.f, 1.f, 0.f, "Offset", " semitones", 0.f, 12.f);
configInput(PITCH_INPUT, "Pitch");
configOutput(PITCH_OUTPUT, "Pitch");
@@ -47,6 +49,7 @@ struct Quantizer : Module {
void process(const ProcessArgs& args) override {
bool playingNotes[12] = {};
int channels = std::max(inputs[PITCH_INPUT].getChannels(), 1);
+ float offsetParam = params[OFFSET_PARAM].getValue() / 12.f;
for (int c = 0; c < channels; c++) {
float pitch = inputs[PITCH_INPUT].getVoltage(c);
@@ -56,6 +59,7 @@ struct Quantizer : Module {
int note = ranges[range] + octave * 12;
playingNotes[eucMod(note, 12)] = true;
pitch = float(note) / 12;
+ pitch += offsetParam;
outputs[PITCH_OUTPUT].setVoltage(pitch, c);
}
outputs[PITCH_OUTPUT].setChannels(channels);
@@ -166,10 +170,9 @@ struct QuantizerButton : OpaqueWidget {
};
-struct QuantizerDisplay : OpaqueWidget {
+struct QuantizerDisplay : LedDisplay {
void setModule(Quantizer* module) {
const float margin = mm2px(1.5) / 2;
- box.size = mm2px(Vec(15.24, 72.0));
const int notes = 12;
const float height = box.size.y - 2 * margin;
for (int note = 0; note < notes; note++) {
@@ -181,16 +184,6 @@ struct QuantizerDisplay : OpaqueWidget {
addChild(quantizerButton);
}
}
-
- void draw(const DrawArgs& args) override {
- // Background
- nvgBeginPath(args.vg);
- nvgRect(args.vg, 0, 0, box.size.x, box.size.y);
- nvgFillColor(args.vg, nvgRGB(0, 0, 0));
- nvgFill(args.vg);
-
- OpaqueWidget::draw(args);
- }
};
@@ -200,13 +193,18 @@ struct QuantizerWidget : ModuleWidget {
setPanel(createPanel(asset::plugin(pluginInstance, "res/Quantizer.svg")));
addChild(createWidget(Vec(RACK_GRID_WIDTH, 0)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
+
+ addParam(createParamCentered(mm2px(Vec(7.62, 80.551)), module, Quantizer::OFFSET_PARAM));
- addInput(createInputCentered(mm2px(Vec(7.62, 97.253)), module, Quantizer::PITCH_INPUT));
+ addInput(createInputCentered(mm2px(Vec(7.62, 96.859)), module, Quantizer::PITCH_INPUT));
- addOutput(createOutputCentered(mm2px(Vec(7.62, 112.253)), module, Quantizer::PITCH_OUTPUT));
+ addOutput(createOutputCentered(mm2px(Vec(7.62, 113.115)), module, Quantizer::PITCH_OUTPUT));
- QuantizerDisplay* quantizerDisplay = createWidget(mm2px(Vec(0.0, 14.585)));
+ QuantizerDisplay* quantizerDisplay = createWidget(mm2px(Vec(0.0, 13.039)));
+ quantizerDisplay->box.size = mm2px(Vec(15.24, 55.88));
quantizerDisplay->setModule(module);
addChild(quantizerDisplay);
}
diff --git a/src/SequentialSwitch.cpp b/src/SequentialSwitch.cpp
index 1fd50b8..eda8d2d 100644
--- a/src/SequentialSwitch.cpp
+++ b/src/SequentialSwitch.cpp
@@ -19,7 +19,7 @@ struct SequentialSwitch : Module {
NUM_OUTPUTS
};
enum LightIds {
- ENUMS(CHANNEL_LIGHT, 4),
+ ENUMS(CHANNEL_LIGHTS, 4),
NUM_LIGHTS
};
@@ -113,7 +113,7 @@ struct SequentialSwitch : Module {
// Set lights
if (lightDivider.process()) {
for (int i = 0; i < 4; i++) {
- lights[CHANNEL_LIGHT + i].setBrightness(index == i);
+ lights[CHANNEL_LIGHTS + i].setBrightness(index == i);
}
}
}
@@ -128,23 +128,25 @@ struct SequentialSwitch1Widget : ModuleWidget {
setPanel(createPanel(asset::plugin(pluginInstance, "res/SequentialSwitch1.svg")));
addChild(createWidget(Vec(RACK_GRID_WIDTH, 0)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
+ addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
- addParam(createParam(mm2px(Vec(5.24619, 46.9153)), module, TSequentialSwitch::STEPS_PARAM));
+ addParam(createParamCentered(mm2px(Vec(7.555, 20.942)), module, TSequentialSwitch::STEPS_PARAM));
- addInput(createInput(mm2px(Vec(3.51398, 17.694)), module, TSequentialSwitch::CLOCK_INPUT));
- addInput(createInput(mm2px(Vec(3.51398, 32.1896)), module, TSequentialSwitch::RESET_INPUT));
- addInput(createInput(mm2px(Vec(3.51536, 62.8096)), module, TSequentialSwitch::IN_INPUTS + 0));
+ addInput(createInputCentered(mm2px(Vec(7.555, 33.831)), module, TSequentialSwitch::CLOCK_INPUT));
+ addInput(createInputCentered(mm2px(Vec(7.555, 50.126)), module, TSequentialSwitch::RESET_INPUT));
+ addInput(createInputCentered(mm2px(Vec(7.555, 66.379)), module, TSequentialSwitch::IN_INPUTS + 0));
- addOutput(createOutput(mm2px(Vec(3.51536, 77.8095)), module, TSequentialSwitch::OUT_OUTPUTS + 0));
- addOutput(createOutput(mm2px(Vec(3.51398, 87.8113)), module, TSequentialSwitch::OUT_OUTPUTS + 1));
- addOutput(createOutput(mm2px(Vec(3.51398, 97.809)), module, TSequentialSwitch::OUT_OUTPUTS + 2));
- addOutput(createOutput(mm2px(Vec(3.51398, 107.809)), module, TSequentialSwitch::OUT_OUTPUTS + 3));
+ addOutput(createOutputCentered(mm2px(Vec(7.555, 82.607)), module, TSequentialSwitch::OUT_OUTPUTS + 0));
+ addOutput(createOutputCentered(mm2px(Vec(7.555, 92.767)), module, TSequentialSwitch::OUT_OUTPUTS + 1));
+ addOutput(createOutputCentered(mm2px(Vec(7.555, 102.927)), module, TSequentialSwitch::OUT_OUTPUTS + 2));
+ addOutput(createOutputCentered(mm2px(Vec(7.555, 113.087)), module, TSequentialSwitch::OUT_OUTPUTS + 3));
- addChild(createLight>(mm2px(Vec(10.8203, 77.7158)), module, TSequentialSwitch::CHANNEL_LIGHT + 0));
- addChild(createLight>(mm2px(Vec(10.8203, 87.7163)), module, TSequentialSwitch::CHANNEL_LIGHT + 1));
- addChild(createLight>(mm2px(Vec(10.8203, 97.7167)), module, TSequentialSwitch::CHANNEL_LIGHT + 2));
- addChild(createLight>(mm2px(Vec(10.8203, 107.716)), module, TSequentialSwitch::CHANNEL_LIGHT + 3));
+ addChild(createLightCentered>(mm2px(Vec(11.28, 78.863)), module, TSequentialSwitch::CHANNEL_LIGHTS + 0));
+ addChild(createLightCentered>(mm2px(Vec(11.28, 89.023)), module, TSequentialSwitch::CHANNEL_LIGHTS + 1));
+ addChild(createLightCentered>(mm2px(Vec(11.28, 99.183)), module, TSequentialSwitch::CHANNEL_LIGHTS + 2));
+ addChild(createLightCentered>(mm2px(Vec(11.28, 109.343)), module, TSequentialSwitch::CHANNEL_LIGHTS + 3));
}
};
@@ -160,23 +162,25 @@ struct SequentialSwitch2Widget : ModuleWidget {
setPanel(createPanel(asset::plugin(pluginInstance, "res/SequentialSwitch2.svg")));
addChild(createWidget