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 @@ - - - - + id="svg214" + sodipodi:docname="8VERT.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata218"> image/svg+xml - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="ac161694-2666-4a45-9d4c-73056424c028" + data-name="FND BG"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - - + id="svg204" + sodipodi:docname="M_S.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata208"> image/svg+xml - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="a80ca31a-5334-4cc0-b350-2a1b1473a882" + data-name="FND BG"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="svg144" + sodipodi:docname="MUTES.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata148"> image/svg+xml - + + + + + + + + + + - + id="f265fc9a-1edb-4724-b61d-29f402eaa6e3" + data-name="FND BG"> + + + - + id="g23"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id="g96"> - - + d="M38.51448,20.44141a.95639.95639,0,0,1,.96484-.96338h.21191a.98951.98951,0,0,1,.876.50049l2.32715,3.791,2.33984-3.80371a.94348.94348,0,0,1,.86328-.48779h.2129a.95618.95618,0,0,1,.96386.96338v6.957a.95754.95754,0,1,1-1.915,0V23.03125l-1.68847,2.60254a.90079.90079,0,0,1-1.60157,0L40.4051,23.06934v4.354a.94033.94033,0,0,1-.95117.93848.93038.93038,0,0,1-.93945-.93848Z" + fill="#1f1f1f" + id="path86" /> - - + d="M49.4344,24.5332V20.4165a.96338.96338,0,1,1,1.92676,0v4.06641c0,1.42627.71386,2.16455,1.88964,2.16455s1.88868-.71289,1.88868-2.102V20.4165a.96387.96387,0,0,1,1.92773,0v4.0542c0,2.65235-1.49023,3.95362-3.8418,3.95362S49.4344,27.11035,49.4344,24.5332Z" + fill="#1f1f1f" + id="path88" /> - - + d="M61.09651,21.30469H59.245a.88819.88819,0,1,1,0-1.77637H64.8758a.88819.88819,0,1,1,0,1.77637H63.02424v6.09375a.96387.96387,0,0,1-1.92773,0Z" + fill="#1f1f1f" + id="path90" /> - - - - - - - - - - - - - - - - + d="M67.1219,27.32324v-6.832a.95585.95585,0,0,1,.96289-.96289h4.85547a.86544.86544,0,0,1,.86328.86328.85465.85465,0,0,1-.86328.85059H69.036V23.019h3.34082a.86481.86481,0,0,1,.86328.86328.85445.85445,0,0,1-.86328.85108H69.036v1.83887h3.9668a.86575.86575,0,0,1,.86328.86328.85506.85506,0,0,1-.86328.85107h-4.918A.956.956,0,0,1,67.1219,27.32324Z" + fill="#1f1f1f" + id="path92" /> + d="M75.39827,27.36084a.89919.89919,0,0,1-.36231-.72607.88664.88664,0,0,1,.90039-.88819.92557.92557,0,0,1,.55078.1753,3.69169,3.69169,0,0,0,2.23926.78808c.78809,0,1.26367-.3125,1.26367-.82568v-.0249c0-.48829-.2998-.73829-1.76465-1.11377-1.76367-.45069-2.90234-.93848-2.90234-2.67725V22.043c0-1.58887,1.27637-2.64014,3.06543-2.64014a5.0887,5.0887,0,0,1,2.77832.77588.87678.87678,0,0,1,.42481.76318.88657.88657,0,0,1-.90137.88819.91789.91789,0,0,1-.48731-.1377,3.64775,3.64775,0,0,0-1.83886-.58789c-.73829,0-1.127.33789-1.127.76367v.02442c0,.57617.375.76367,1.88965,1.15137,1.77637.46289,2.77832,1.10107,2.77832,2.62793v.02441c0,1.73926-1.32617,2.71533-3.2168,2.71533A5.652,5.652,0,0,1,75.39827,27.36084Z" + fill="#1f1f1f" + id="path94" /> + id="g102"> - - + d="M18.32893,45.418a.417.417,0,0,1,.834,0v3.98389a.417.417,0,0,1-.834,0Z" + fill="#1f1f1f" + id="path98" /> + d="M20.63948,45.43164a.4168.4168,0,0,1,.41992-.41992h.08789a.52449.52449,0,0,1,.43359.24414l2.3711,3.06885V45.41113a.40968.40968,0,0,1,.81933,0V49.395a.40483.40483,0,0,1-.40625.41357h-.03418a.52421.52421,0,0,1-.43359-.251l-2.43848-3.15723v3.0083a.40968.40968,0,0,1-.81933,0Z" + fill="#1f1f1f" + id="path100" /> + id="g110"> - - + d="M90.93342,47.52734v-.01367a2.52117,2.52117,0,0,1,5.04-.01367v.01367a2.52116,2.52116,0,0,1-5.04.01367Zm3.9502,0v-.01367a1.44036,1.44036,0,0,0-1.43653-1.49023A1.41794,1.41794,0,0,0,92.02424,47.5v.01367a1.44077,1.44077,0,0,0,1.43653,1.49072A1.41866,1.41866,0,0,0,94.88362,47.52734Z" + fill="#f0f0f0" + id="path104" /> + d="M97.05256,47.85254v-2.229a.522.522,0,0,1,1.04395,0V47.8252c0,.77246.38476,1.17236,1.02246,1.17236.63672,0,1.02246-.38623,1.02246-1.13818V45.62354a.522.522,0,0,1,1.04395,0v2.19482a1.90889,1.90889,0,0,1-2.08008,2.14111A1.88179,1.88179,0,0,1,97.05256,47.85254Z" + fill="#f0f0f0" + id="path106" /> + - - - - - - - - - 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 @@ - - - - + id="svg124" + sodipodi:docname="NOIS.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata128"> image/svg+xml - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="a1349c98-ad5f-4933-9556-19be04013a9f" + data-name="FND BG"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - - + id="svg100" + sodipodi:docname="OCT.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata104"> image/svg+xml - + + + + + + + - - - - - - - - - - - - - - - - + id="ba95d92a-b4a4-43a9-a7ed-2dca14b08678" + data-name="FND BG"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - - + id="svg123" + sodipodi:docname="PULSES.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata127"> image/svg+xml - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + id="ef7a5a91-e61a-4278-b2be-30a4bea66505" + data-name="FND BG"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - - + id="svg106" + sodipodi:docname="QNT.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata110"> image/svg+xml - + + + + + + + - - - - - - - - - - - - - - - + id="a814b65d-5ca2-4c55-a7e7-ea85c3ffeae8" + data-name="FND BG"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="svg94" + sodipodi:docname="1_4.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata98"> image/svg+xml - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + id="fa5f17a2-6249-49d0-8fe7-80b34c10804b" + data-name="FND BG"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="svg94" + sodipodi:docname="4_1.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata98"> image/svg+xml - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + id="b80d2353-80d5-423e-ae42-56e5cb5389c8" + data-name="FND BG"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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(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.8, 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.191)), module, TSequentialSwitch::RESET_INPUT)); - addInput(createInput(mm2px(Vec(3.51398, 62.811)), module, TSequentialSwitch::IN_INPUTS + 0)); - addInput(createInput(mm2px(Vec(3.51398, 72.8114)), module, TSequentialSwitch::IN_INPUTS + 1)); - addInput(createInput(mm2px(Vec(3.51398, 82.8091)), module, TSequentialSwitch::IN_INPUTS + 2)); - addInput(createInput(mm2px(Vec(3.51398, 92.8109)), module, TSequentialSwitch::IN_INPUTS + 3)); + addInput(createInputCentered(mm2px(Vec(7.8, 33.831)), module, TSequentialSwitch::CLOCK_INPUT)); + addInput(createInputCentered(mm2px(Vec(7.8, 50.126)), module, TSequentialSwitch::RESET_INPUT)); + addInput(createInputCentered(mm2px(Vec(7.8, 66.379)), module, TSequentialSwitch::IN_INPUTS + 0)); + addInput(createInputCentered(mm2px(Vec(7.8, 76.539)), module, TSequentialSwitch::IN_INPUTS + 1)); + addInput(createInputCentered(mm2px(Vec(7.8, 86.699)), module, TSequentialSwitch::IN_INPUTS + 2)); + addInput(createInputCentered(mm2px(Vec(7.8, 96.859)), module, TSequentialSwitch::IN_INPUTS + 3)); - addOutput(createOutput(mm2px(Vec(3.51398, 107.622)), module, TSequentialSwitch::OUT_OUTPUTS + 0)); + addOutput(createOutputCentered(mm2px(Vec(7.8, 113.115)), module, TSequentialSwitch::OUT_OUTPUTS + 0)); - addChild(createLight>(mm2px(Vec(10.7321, 62.6277)), module, TSequentialSwitch::CHANNEL_LIGHT + 0)); - addChild(createLight>(mm2px(Vec(10.7321, 72.6281)), module, TSequentialSwitch::CHANNEL_LIGHT + 1)); - addChild(createLight>(mm2px(Vec(10.7321, 82.6285)), module, TSequentialSwitch::CHANNEL_LIGHT + 2)); - addChild(createLight>(mm2px(Vec(10.7321, 92.6276)), module, TSequentialSwitch::CHANNEL_LIGHT + 3)); + addChild(createLightCentered>(mm2px(Vec(11.526, 63.259)), module, TSequentialSwitch::CHANNEL_LIGHTS + 0)); + addChild(createLightCentered>(mm2px(Vec(11.526, 72.795)), module, TSequentialSwitch::CHANNEL_LIGHTS + 1)); + addChild(createLightCentered>(mm2px(Vec(11.526, 82.955)), module, TSequentialSwitch::CHANNEL_LIGHTS + 2)); + addChild(createLightCentered>(mm2px(Vec(11.526, 93.115)), module, TSequentialSwitch::CHANNEL_LIGHTS + 3)); } };