From b824e0d6904b266da67ae9cbe49b781b34cc96d8 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 8 Nov 2019 21:31:59 -0500 Subject: [PATCH] Add input/output port labels. --- src/8vert.cpp | 4 +- src/Delay.cpp | 6 +++ src/LFO.cpp | 14 +++++ src/Merge.cpp | 4 ++ src/MidSide.cpp | 10 ++++ src/Mutes.cpp | 114 ++++++++++++++++++++------------------- src/Noise.cpp | 14 +++++ src/Octave.cpp | 3 ++ src/Pulses.cpp | 7 ++- src/Quantizer.cpp | 3 ++ src/Random.cpp | 8 +++ src/SEQ3.cpp | 49 ++++++++++------- src/Scope.cpp | 3 ++ src/SequentialSwitch.cpp | 16 ++++++ src/Split.cpp | 4 ++ src/Sum.cpp | 2 + src/Unity.cpp | 9 ++++ src/VCA.cpp | 8 +++ src/VCF.cpp | 6 +++ src/VCO.cpp | 14 +++++ 20 files changed, 219 insertions(+), 79 deletions(-) diff --git a/src/8vert.cpp b/src/8vert.cpp index 45ba4c5..c340987 100644 --- a/src/8vert.cpp +++ b/src/8vert.cpp @@ -21,7 +21,9 @@ struct _8vert : Module { _8vert() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); for (int i = 0; i < 8; i++) { - configParam(GAIN_PARAMS + i, -1.f, 1.f, 0.f, string::f("Ch %d gain", i + 1), "%", 0, 100); + configParam(GAIN_PARAMS + i, -1.f, 1.f, 0.f, string::f("Row %d gain", i + 1), "%", 0, 100); + configInput(IN_INPUTS + i, string::f("Row %d", i + 1)); + configOutput(OUT_OUTPUTS + i, string::f("Row %d", i + 1)); } } diff --git a/src/Delay.cpp b/src/Delay.cpp index 55e56ac..9cd2928 100644 --- a/src/Delay.cpp +++ b/src/Delay.cpp @@ -38,6 +38,12 @@ struct Delay : Module { configParam(FEEDBACK_PARAM, 0.f, 1.f, 0.5f, "Feedback", "%", 0, 100); configParam(COLOR_PARAM, 0.f, 1.f, 0.5f, "Color", "%", 0, 100); configParam(MIX_PARAM, 0.f, 1.f, 0.5f, "Mix", "%", 0, 100); + configInput(TIME_INPUT, "Time"); + configInput(FEEDBACK_INPUT, "Feedback"); + configInput(COLOR_INPUT, "Color"); + configInput(MIX_INPUT, "Mix"); + configInput(IN_INPUT, "Audio"); + configOutput(OUT_OUTPUT, "Audio"); src = src_new(SRC_SINC_FASTEST, 1, NULL); assert(src); diff --git a/src/LFO.cpp b/src/LFO.cpp index 30986e7..43928b5 100644 --- a/src/LFO.cpp +++ b/src/LFO.cpp @@ -124,6 +124,15 @@ struct LFO : Module { configParam(PW_PARAM, 0.01f, 0.99f, 0.5f, "Pulse width", "%", 0.f, 100.f); configParam(FM2_PARAM, 0.f, 1.f, 0.f, "Frequency modulation 2", "%", 0.f, 100.f); configParam(PWM_PARAM, 0.f, 1.f, 0.f, "Pulse width modulation", "%", 0.f, 100.f); + configInput(FM1_INPUT, "Frequency modulation 1"); + configInput(FM2_INPUT, "Frequency modulation 2"); + configInput(RESET_INPUT, "Reset"); + configInput(PW_INPUT, "Pulse width modulation"); + configOutput(SIN_OUTPUT, "Sine"); + configOutput(TRI_OUTPUT, "Triangle"); + configOutput(SAW_OUTPUT, "Sawtooth"); + configOutput(SQR_OUTPUT, "Square"); + lightDivider.setDivision(16); } @@ -261,6 +270,11 @@ struct LFO2 : Module { configParam(FREQ_PARAM, -8.f, 10.f, 1.f, "Frequency", " Hz", 2, 1); configParam(WAVE_PARAM, 0.f, 3.f, 1.5f, "Wave"); configParam(FM_PARAM, 0.f, 1.f, 0.5f, "Frequency modulation", "%", 0.f, 100.f); + configInput(FM_INPUT, "Frequency modulation"); + configInput(RESET_INPUT, "Reset"); + configInput(WAVE_INPUT, "Wave"); + configOutput(INTERP_OUTPUT, "Out"); + lightDivider.setDivision(16); } diff --git a/src/Merge.cpp b/src/Merge.cpp index 2b3b457..567a68a 100644 --- a/src/Merge.cpp +++ b/src/Merge.cpp @@ -23,6 +23,10 @@ struct Merge : Module { Merge() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + for (int i = 0; i < 16; i++) + configInput(MONO_INPUTS + i, string::f("Channel %d", i + 1)); + configOutput(POLY_OUTPUT, "Polyphonic"); + lightDivider.setDivision(512); onReset(); } diff --git a/src/MidSide.cpp b/src/MidSide.cpp index 16db18d..143bd00 100644 --- a/src/MidSide.cpp +++ b/src/MidSide.cpp @@ -31,6 +31,16 @@ struct MidSide : Module { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configParam(ENC_WIDTH_PARAM, 0.f, 2.f, 1.f, "Encoder width", "%", 0, 100); configParam(DEC_WIDTH_PARAM, 0.f, 2.f, 1.f, "Decoder width", "%", 0, 100); + configInput(ENC_WIDTH_INPUT, "Encoder width"); + configInput(ENC_LEFT_INPUT, "Encoder left"); + configInput(ENC_RIGHT_INPUT, "Encoder right"); + configInput(DEC_WIDTH_INPUT, "Decoder width"); + configInput(DEC_MID_INPUT, "Decoder mid"); + configInput(DEC_SIDES_INPUT, "Decoder sides"); + configOutput(ENC_MID_OUTPUT, "Encoder mid"); + configOutput(ENC_SIDES_OUTPUT, "Encoder sides"); + configOutput(DEC_LEFT_OUTPUT, "Decoder left"); + configOutput(DEC_RIGHT_OUTPUT, "Decoder right"); } void process(const ProcessArgs& args) override { diff --git a/src/Mutes.cpp b/src/Mutes.cpp index 2f7d138..bdd4930 100644 --- a/src/Mutes.cpp +++ b/src/Mutes.cpp @@ -3,19 +3,19 @@ struct Mutes : Module { enum ParamIds { - ENUMS(MUTE_PARAM, 10), + ENUMS(MUTE_PARAMS, 10), NUM_PARAMS }; enum InputIds { - ENUMS(IN_INPUT, 10), + ENUMS(IN_INPUTS, 10), NUM_INPUTS }; enum OutputIds { - ENUMS(OUT_OUTPUT, 10), + ENUMS(OUT_OUTPUTS, 10), NUM_OUTPUTS }; enum LightIds { - ENUMS(MUTE_LIGHT, 10), + ENUMS(MUTE_LIGHTS, 10), NUM_LIGHTS }; @@ -25,7 +25,9 @@ struct Mutes : Module { Mutes() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); for (int i = 0; i < 10; i++) { - configParam(MUTE_PARAM + i, 0.0, 1.0, 0.0, string::f("Ch %d mute", i + 1)); + configParam(MUTE_PARAMS + i, 0.0, 1.0, 0.0, string::f("Row %d mute", i + 1)); + configInput(IN_INPUTS + i, string::f("Row %d", i + 1)); + configOutput(OUT_OUTPUTS + i, string::f("Row %d", i + 1)); } onReset(); @@ -39,24 +41,24 @@ struct Mutes : Module { // Iterate rows for (int i = 0; i < 10; i++) { // Process trigger - if (muteTrigger[i].process(params[MUTE_PARAM + i].getValue() > 0.f)) + if (muteTrigger[i].process(params[MUTE_PARAMS + i].getValue() > 0.f)) state[i] ^= true; // Get input // Inputs are normalized to the input above it, so only set if connected - if (inputs[IN_INPUT + i].isConnected()) { - channels = inputs[IN_INPUT + i].getChannels(); - inputs[IN_INPUT + i].readVoltages(out); + if (inputs[IN_INPUTS + i].isConnected()) { + channels = inputs[IN_INPUTS + i].getChannels(); + inputs[IN_INPUTS + i].readVoltages(out); } // Set output - if (outputs[OUT_OUTPUT + i].isConnected()) { - outputs[OUT_OUTPUT + i].setChannels(channels); - outputs[OUT_OUTPUT + i].writeVoltages(state[i] ? out : zero); + if (outputs[OUT_OUTPUTS + i].isConnected()) { + outputs[OUT_OUTPUTS + i].setChannels(channels); + outputs[OUT_OUTPUTS + i].writeVoltages(state[i] ? out : zero); } // Set light - lights[MUTE_LIGHT + i].setBrightness(state[i] ? 0.9f : 0.f); + lights[MUTE_LIGHTS + i].setBrightness(state[i] ? 0.9f : 0.f); } } @@ -109,49 +111,49 @@ struct MutesWidget : ModuleWidget { addChild(createWidget(Vec(15, 365))); addChild(createWidget(Vec(box.size.x - 30, 365))); - addParam(createParam(mm2px(Vec(16.57, 18.165)), module, Mutes::MUTE_PARAM + 0)); - addParam(createParam(mm2px(Vec(16.57, 28.164)), module, Mutes::MUTE_PARAM + 1)); - addParam(createParam(mm2px(Vec(16.57, 38.164)), module, Mutes::MUTE_PARAM + 2)); - addParam(createParam(mm2px(Vec(16.57, 48.165)), module, Mutes::MUTE_PARAM + 3)); - addParam(createParam(mm2px(Vec(16.57, 58.164)), module, Mutes::MUTE_PARAM + 4)); - addParam(createParam(mm2px(Vec(16.57, 68.165)), module, Mutes::MUTE_PARAM + 5)); - addParam(createParam(mm2px(Vec(16.57, 78.164)), module, Mutes::MUTE_PARAM + 6)); - addParam(createParam(mm2px(Vec(16.57, 88.164)), module, Mutes::MUTE_PARAM + 7)); - addParam(createParam(mm2px(Vec(16.57, 98.165)), module, Mutes::MUTE_PARAM + 8)); - addParam(createParam(mm2px(Vec(16.57, 108.166)), module, Mutes::MUTE_PARAM + 9)); - - addInput(createInput(mm2px(Vec(4.214, 17.81)), module, Mutes::IN_INPUT + 0)); - addInput(createInput(mm2px(Vec(4.214, 27.809)), module, Mutes::IN_INPUT + 1)); - addInput(createInput(mm2px(Vec(4.214, 37.809)), module, Mutes::IN_INPUT + 2)); - addInput(createInput(mm2px(Vec(4.214, 47.81)), module, Mutes::IN_INPUT + 3)); - addInput(createInput(mm2px(Vec(4.214, 57.81)), module, Mutes::IN_INPUT + 4)); - addInput(createInput(mm2px(Vec(4.214, 67.809)), module, Mutes::IN_INPUT + 5)); - addInput(createInput(mm2px(Vec(4.214, 77.81)), module, Mutes::IN_INPUT + 6)); - addInput(createInput(mm2px(Vec(4.214, 87.81)), module, Mutes::IN_INPUT + 7)); - addInput(createInput(mm2px(Vec(4.214, 97.809)), module, Mutes::IN_INPUT + 8)); - addInput(createInput(mm2px(Vec(4.214, 107.809)), module, Mutes::IN_INPUT + 9)); - - addOutput(createOutput(mm2px(Vec(28.214, 17.81)), module, Mutes::OUT_OUTPUT + 0)); - addOutput(createOutput(mm2px(Vec(28.214, 27.809)), module, Mutes::OUT_OUTPUT + 1)); - addOutput(createOutput(mm2px(Vec(28.214, 37.809)), module, Mutes::OUT_OUTPUT + 2)); - addOutput(createOutput(mm2px(Vec(28.214, 47.81)), module, Mutes::OUT_OUTPUT + 3)); - addOutput(createOutput(mm2px(Vec(28.214, 57.809)), module, Mutes::OUT_OUTPUT + 4)); - addOutput(createOutput(mm2px(Vec(28.214, 67.809)), module, Mutes::OUT_OUTPUT + 5)); - addOutput(createOutput(mm2px(Vec(28.214, 77.81)), module, Mutes::OUT_OUTPUT + 6)); - addOutput(createOutput(mm2px(Vec(28.214, 87.81)), module, Mutes::OUT_OUTPUT + 7)); - addOutput(createOutput(mm2px(Vec(28.214, 97.809)), module, Mutes::OUT_OUTPUT + 8)); - addOutput(createOutput(mm2px(Vec(28.214, 107.809)), module, Mutes::OUT_OUTPUT + 9)); - - addChild(createLight>(mm2px(Vec(17.32, 18.915)), module, Mutes::MUTE_LIGHT + 0)); - addChild(createLight>(mm2px(Vec(17.32, 28.916)), module, Mutes::MUTE_LIGHT + 1)); - addChild(createLight>(mm2px(Vec(17.32, 38.915)), module, Mutes::MUTE_LIGHT + 2)); - addChild(createLight>(mm2px(Vec(17.32, 48.915)), module, Mutes::MUTE_LIGHT + 3)); - addChild(createLight>(mm2px(Vec(17.32, 58.916)), module, Mutes::MUTE_LIGHT + 4)); - addChild(createLight>(mm2px(Vec(17.32, 68.916)), module, Mutes::MUTE_LIGHT + 5)); - addChild(createLight>(mm2px(Vec(17.32, 78.915)), module, Mutes::MUTE_LIGHT + 6)); - addChild(createLight>(mm2px(Vec(17.32, 88.916)), module, Mutes::MUTE_LIGHT + 7)); - addChild(createLight>(mm2px(Vec(17.32, 98.915)), module, Mutes::MUTE_LIGHT + 8)); - addChild(createLight>(mm2px(Vec(17.32, 108.915)), module, Mutes::MUTE_LIGHT + 9)); + addParam(createParam(mm2px(Vec(16.57, 18.165)), module, Mutes::MUTE_PARAMS + 0)); + addParam(createParam(mm2px(Vec(16.57, 28.164)), module, Mutes::MUTE_PARAMS + 1)); + addParam(createParam(mm2px(Vec(16.57, 38.164)), module, Mutes::MUTE_PARAMS + 2)); + addParam(createParam(mm2px(Vec(16.57, 48.165)), module, Mutes::MUTE_PARAMS + 3)); + addParam(createParam(mm2px(Vec(16.57, 58.164)), module, Mutes::MUTE_PARAMS + 4)); + addParam(createParam(mm2px(Vec(16.57, 68.165)), module, Mutes::MUTE_PARAMS + 5)); + addParam(createParam(mm2px(Vec(16.57, 78.164)), module, Mutes::MUTE_PARAMS + 6)); + addParam(createParam(mm2px(Vec(16.57, 88.164)), module, Mutes::MUTE_PARAMS + 7)); + addParam(createParam(mm2px(Vec(16.57, 98.165)), module, Mutes::MUTE_PARAMS + 8)); + addParam(createParam(mm2px(Vec(16.57, 108.166)), module, Mutes::MUTE_PARAMS + 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(createLight>(mm2px(Vec(17.32, 18.915)), module, Mutes::MUTE_LIGHTS + 0)); + addChild(createLight>(mm2px(Vec(17.32, 28.916)), module, Mutes::MUTE_LIGHTS + 1)); + addChild(createLight>(mm2px(Vec(17.32, 38.915)), module, Mutes::MUTE_LIGHTS + 2)); + addChild(createLight>(mm2px(Vec(17.32, 48.915)), module, Mutes::MUTE_LIGHTS + 3)); + addChild(createLight>(mm2px(Vec(17.32, 58.916)), module, Mutes::MUTE_LIGHTS + 4)); + addChild(createLight>(mm2px(Vec(17.32, 68.916)), module, Mutes::MUTE_LIGHTS + 5)); + addChild(createLight>(mm2px(Vec(17.32, 78.915)), module, Mutes::MUTE_LIGHTS + 6)); + addChild(createLight>(mm2px(Vec(17.32, 88.916)), module, Mutes::MUTE_LIGHTS + 7)); + addChild(createLight>(mm2px(Vec(17.32, 98.915)), module, Mutes::MUTE_LIGHTS + 8)); + addChild(createLight>(mm2px(Vec(17.32, 108.915)), module, Mutes::MUTE_LIGHTS + 9)); } }; diff --git a/src/Noise.cpp b/src/Noise.cpp index a19213c..c576940 100644 --- a/src/Noise.cpp +++ b/src/Noise.cpp @@ -99,6 +99,20 @@ struct Noise : Module { Noise() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + configOutput(WHITE_OUTPUT, "White noise"); + outputInfos[WHITE_OUTPUT]->description = "0 dB/octave power density"; + configOutput(PINK_OUTPUT, "Pink noise"); + outputInfos[PINK_OUTPUT]->description = "-3 dB/octave power density"; + configOutput(RED_OUTPUT, "Red noise"); + outputInfos[RED_OUTPUT]->description = "-6 dB/octave power density"; + configOutput(VIOLET_OUTPUT, "Violet noise"); + outputInfos[VIOLET_OUTPUT]->description = "+6 dB/octave power density"; + configOutput(BLUE_OUTPUT, "Blue noise"); + outputInfos[BLUE_OUTPUT]->description = "+3 dB/octave power density"; + configOutput(GRAY_OUTPUT, "Gray noise"); + outputInfos[GRAY_OUTPUT]->description = "Psychoacoustic equal loudness"; + configOutput(BLACK_OUTPUT, "Black noise"); + outputInfos[BLACK_OUTPUT]->description = "Uniform random numbers"; // Hard-code coefficients for Butterworth lowpass with cutoff 20 Hz @ 44.1kHz. const float b[] = {0.00425611, 0.00425611}; diff --git a/src/Octave.cpp b/src/Octave.cpp index 3d5211d..6049f09 100644 --- a/src/Octave.cpp +++ b/src/Octave.cpp @@ -22,6 +22,9 @@ struct Octave : Module { Octave() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configParam(OCTAVE_PARAM, -4.f, 4.f, 0.f, "Octave shift"); + configInput(PITCH_INPUT, "Pitch"); + configInput(OCTAVE_INPUT, "Octave shift"); + configOutput(PITCH_OUTPUT, "Octave-shifted pitch"); } void process(const ProcessArgs& args) override { diff --git a/src/Pulses.cpp b/src/Pulses.cpp index d69891e..3408b51 100644 --- a/src/Pulses.cpp +++ b/src/Pulses.cpp @@ -24,8 +24,11 @@ struct Pulses : Module { Pulses() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - for (int i = 0; i < 10; i++) - configParam(TAP_PARAMS + i, 0.f, 1.f, 0.f, string::f("Tap %d", i + 1)); + for (int i = 0; i < 10; i++) { + configParam(TAP_PARAMS + i, 0.f, 1.f, 0.f, string::f("Row %d tap", i + 1)); + configOutput(TRIG_OUTPUTS + i, string::f("Row %d trigger", i + 1)); + configOutput(GATE_OUTPUTS + i, string::f("Row %d gate", i + 1)); + } } void process(const ProcessArgs& args) override { diff --git a/src/Quantizer.cpp b/src/Quantizer.cpp index ef2a5bb..0261efe 100644 --- a/src/Quantizer.cpp +++ b/src/Quantizer.cpp @@ -24,6 +24,9 @@ struct Quantizer : Module { Quantizer() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + configInput(PITCH_INPUT, "Pitch"); + configOutput(PITCH_OUTPUT, "Pitch"); + onReset(); } diff --git a/src/Random.cpp b/src/Random.cpp index 68fe944..f8e6385 100644 --- a/src/Random.cpp +++ b/src/Random.cpp @@ -42,6 +42,14 @@ struct Random : Module { configParam(SHAPE_PARAM, 0.f, 1.f, 0.5f, "Shape", "%", 0, 100); configParam(OFFSET_PARAM, 0.f, 1.f, 1.f, "Bipolar/unipolar"); configParam(MODE_PARAM, 0.f, 1.f, 1.f, "Relative/absolute randomness"); + configInput(RATE_INPUT, "Rate"); + configInput(SHAPE_INPUT, "Shape"); + configInput(TRIGGER_INPUT, "Trigger"); + configInput(EXTERNAL_INPUT, "External"); + configOutput(STEPPED_OUTPUT, "Stepped"); + configOutput(LINEAR_OUTPUT, "Linear"); + configOutput(SMOOTH_OUTPUT, "Smooth"); + configOutput(EXPONENTIAL_OUTPUT, "Exponential"); } void trigger() { diff --git a/src/SEQ3.cpp b/src/SEQ3.cpp index cc29c06..07fd035 100644 --- a/src/SEQ3.cpp +++ b/src/SEQ3.cpp @@ -7,10 +7,10 @@ struct SEQ3 : Module { RUN_PARAM, RESET_PARAM, STEPS_PARAM, - ENUMS(ROW1_PARAM, 8), - ENUMS(ROW2_PARAM, 8), - ENUMS(ROW3_PARAM, 8), - ENUMS(GATE_PARAM, 8), + ENUMS(ROW1_PARAMS, 8), + ENUMS(ROW2_PARAMS, 8), + ENUMS(ROW3_PARAMS, 8), + ENUMS(GATE_PARAMS, 8), NUM_PARAMS }; enum InputIds { @@ -25,7 +25,7 @@ struct SEQ3 : Module { ROW1_OUTPUT, ROW2_OUTPUT, ROW3_OUTPUT, - ENUMS(GATE_OUTPUT, 8), + ENUMS(GATE_OUTPUTS, 8), NUM_OUTPUTS }; enum LightIds { @@ -54,12 +54,21 @@ struct SEQ3 : Module { configParam(RESET_PARAM, 0.f, 1.f, 0.f); configParam(STEPS_PARAM, 1.f, 8.f, 8.f); for (int i = 0; i < 8; i++) { - configParam(ROW1_PARAM + i, 0.f, 10.f, 0.f); - configParam(ROW2_PARAM + i, 0.f, 10.f, 0.f); - configParam(ROW3_PARAM + i, 0.f, 10.f, 0.f); - configParam(GATE_PARAM + i, 0.f, 1.f, 0.f); + configParam(ROW1_PARAMS + i, 0.f, 10.f, 0.f); + configParam(ROW2_PARAMS + i, 0.f, 10.f, 0.f); + configParam(ROW3_PARAMS + i, 0.f, 10.f, 0.f); + configParam(GATE_PARAMS + i, 0.f, 1.f, 0.f); } - + configInput(CLOCK_INPUT, "Clock rate"); + configInput(EXT_CLOCK_INPUT, "External clock"); + configInput(RESET_INPUT, "Reset"); + configInput(STEPS_INPUT, "Steps"); + configOutput(GATES_OUTPUT, "Gate"); + configOutput(ROW1_OUTPUT, "Row 1"); + configOutput(ROW2_OUTPUT, "Row 2"); + configOutput(ROW3_OUTPUT, "Row 3"); + for (int i = 0; i < 8; i++) + configOutput(GATE_OUTPUTS + i, string::f("Gate %d", i + 1)); onReset(); } @@ -150,17 +159,17 @@ struct SEQ3 : Module { // Gate buttons for (int i = 0; i < 8; i++) { - if (gateTriggers[i].process(params[GATE_PARAM + i].getValue())) { + if (gateTriggers[i].process(params[GATE_PARAMS + i].getValue())) { gates[i] = !gates[i]; } - outputs[GATE_OUTPUT + i].setVoltage((running && gateIn && i == index && gates[i]) ? 10.f : 0.f); + outputs[GATE_OUTPUTS + i].setVoltage((running && gateIn && i == index && gates[i]) ? 10.f : 0.f); lights[GATE_LIGHTS + i].setSmoothBrightness((gateIn && i == index) ? (gates[i] ? 1.f : 0.33) : (gates[i] ? 0.66 : 0.0), args.sampleTime); } // Outputs - outputs[ROW1_OUTPUT].setVoltage(params[ROW1_PARAM + index].getValue()); - outputs[ROW2_OUTPUT].setVoltage(params[ROW2_PARAM + index].getValue()); - outputs[ROW3_OUTPUT].setVoltage(params[ROW3_PARAM + index].getValue()); + outputs[ROW1_OUTPUT].setVoltage(params[ROW1_PARAMS + index].getValue()); + outputs[ROW2_OUTPUT].setVoltage(params[ROW2_PARAMS + index].getValue()); + outputs[ROW3_OUTPUT].setVoltage(params[ROW3_PARAMS + index].getValue()); outputs[GATES_OUTPUT].setVoltage((gateIn && gates[index]) ? 10.f : 0.f); lights[RUNNING_LIGHT].value = (running); lights[RESET_LIGHT].setSmoothBrightness(resetTrigger.isHigh(), args.sampleTime); @@ -204,12 +213,12 @@ struct SEQ3Widget : ModuleWidget { addOutput(createOutput(Vec(portX[7] - 1, 98), module, SEQ3::ROW3_OUTPUT)); for (int i = 0; i < 8; i++) { - addParam(createParam(Vec(portX[i] - 2, 157), module, SEQ3::ROW1_PARAM + i)); - addParam(createParam(Vec(portX[i] - 2, 198), module, SEQ3::ROW2_PARAM + i)); - addParam(createParam(Vec(portX[i] - 2, 240), module, SEQ3::ROW3_PARAM + i)); - addParam(createParam(Vec(portX[i] + 2, 278 - 1), module, SEQ3::GATE_PARAM + i)); + addParam(createParam(Vec(portX[i] - 2, 157), module, SEQ3::ROW1_PARAMS + i)); + addParam(createParam(Vec(portX[i] - 2, 198), module, SEQ3::ROW2_PARAMS + i)); + addParam(createParam(Vec(portX[i] - 2, 240), module, SEQ3::ROW3_PARAMS + i)); + addParam(createParam(Vec(portX[i] + 2, 278 - 1), module, SEQ3::GATE_PARAMS + i)); addChild(createLight>(Vec(portX[i] + 6.4f, 281.4f), module, SEQ3::GATE_LIGHTS + i)); - addOutput(createOutput(Vec(portX[i] - 1, 307), module, SEQ3::GATE_OUTPUT + i)); + addOutput(createOutput(Vec(portX[i] - 1, 307), module, SEQ3::GATE_OUTPUTS + i)); } } }; diff --git a/src/Scope.cpp b/src/Scope.cpp index 6e9409e..e9eb9a5 100644 --- a/src/Scope.cpp +++ b/src/Scope.cpp @@ -58,6 +58,9 @@ struct Scope : Module { configParam(LISSAJOUS_PARAM, 0.f, 1.f, 0.f); configParam(TRIG_PARAM, -10.f, 10.f, 0.f, "Trigger position", " V"); configParam(EXTERNAL_PARAM, 0.f, 1.f, 0.f); + configInput(X_INPUT, "X"); + configInput(Y_INPUT, "Y"); + configInput(TRIG_INPUT, "External trigger"); } void onReset() override { diff --git a/src/SequentialSwitch.cpp b/src/SequentialSwitch.cpp index e884f5c..34d5444 100644 --- a/src/SequentialSwitch.cpp +++ b/src/SequentialSwitch.cpp @@ -32,6 +32,22 @@ struct SequentialSwitch : Module { SequentialSwitch() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configParam(STEPS_PARAM, 0.0, 2.0, 0.0, "Steps", "", 0, -1, 4); + configInput(CLOCK_INPUT, "Clock"); + configInput(RESET_INPUT, "Reset"); + if (INPUTS == 1) { + configInput(IN_INPUTS + 0, "In"); + } + else { + for (int i = 0; i < INPUTS; i++) + configInput(IN_INPUTS + i, string::f("Ch %d", i + 1)); + } + if (OUTPUTS == 1) { + configOutput(OUT_OUTPUTS + 0, "Out"); + } + else { + for (int i = 0; i < OUTPUTS; i++) + configOutput(OUT_OUTPUTS + i, string::f("Ch %d", i + 1)); + } for (int i = 0; i < 4; i++) { clickFilters[i].rise = 400.f; // Hz diff --git a/src/Split.cpp b/src/Split.cpp index 8ead535..79f54a7 100644 --- a/src/Split.cpp +++ b/src/Split.cpp @@ -22,6 +22,10 @@ struct Split : Module { Split() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + configInput(POLY_INPUT, "Polyphonic"); + for (int i = 0; i < 8; i++) + configOutput(MONO_OUTPUTS + i, string::f("Channel %d", i + 1)); + lightDivider.setDivision(512); } diff --git a/src/Sum.cpp b/src/Sum.cpp index 50f3a56..396155c 100644 --- a/src/Sum.cpp +++ b/src/Sum.cpp @@ -27,6 +27,8 @@ struct Sum : Module { Sum() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configParam(LEVEL_PARAM, 0.f, 1.f, 1.f, "Level", "%", 0.f, 100.f); + configInput(POLY_INPUT, "Polyphonic"); + configOutput(MONO_OUTPUT, "Monophonic"); vuMeter.lambda = 1 / 0.1f; vuDivider.setDivision(16); diff --git a/src/Unity.cpp b/src/Unity.cpp index b248e9d..da7de14 100644 --- a/src/Unity.cpp +++ b/src/Unity.cpp @@ -31,6 +31,15 @@ struct Unity : Module { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); configParam(AVG1_PARAM, 0.0, 1.0, 0.0, "Ch 1 average mode"); configParam(AVG2_PARAM, 0.0, 1.0, 0.0, "Ch 2 average mode"); + for (int i = 0; i < 2; i++) { + for (int j = 0; j < 6; j++) { + configInput(IN_INPUTS + i * 6 + j, string::f("In %d ch %d", i + 1, j + 1)); + } + } + configOutput(MIX1_OUTPUT, "Mix 1"); + configOutput(INV1_OUTPUT, "Inverse mix 1"); + configOutput(MIX2_OUTPUT, "Mix 2"); + configOutput(INV2_OUTPUT, "Inverse mix 2"); lightDivider.setDivision(256); } diff --git a/src/VCA.cpp b/src/VCA.cpp index 2bac208..d891c7b 100644 --- a/src/VCA.cpp +++ b/src/VCA.cpp @@ -26,6 +26,14 @@ struct VCA : Module { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(LEVEL1_PARAM, 0.0, 1.0, 1.0, "Ch 1 level", "%", 0, 100); configParam(LEVEL2_PARAM, 0.0, 1.0, 1.0, "Ch 2 level", "%", 0, 100); + configInput(EXP1_INPUT, "Exponential CV 1"); + configInput(LIN1_INPUT, "Linear CV 1"); + configInput(IN1_INPUT, "In 1"); + configInput(EXP2_INPUT, "Exponential CV 2"); + configInput(LIN2_INPUT, "Linear CV 2"); + configInput(IN2_INPUT, "In 2"); + configOutput(OUT1_OUTPUT, "Out 1"); + configOutput(OUT2_OUTPUT, "Out 2"); } void processChannel(Input& in, Param& level, Input& lin, Input& exp, Output& out) { diff --git a/src/VCF.cpp b/src/VCF.cpp index 2935dff..8dcbc6a 100644 --- a/src/VCF.cpp +++ b/src/VCF.cpp @@ -99,6 +99,12 @@ struct VCF : Module { configParam(RES_PARAM, 0.f, 1.f, 0.f, "Resonance", "%", 0.f, 100.f); configParam(FREQ_CV_PARAM, -1.f, 1.f, 0.f, "Frequency modulation", "%", 0.f, 100.f); configParam(DRIVE_PARAM, 0.f, 1.f, 0.f, "Drive", "", 0, 11); + configInput(FREQ_INPUT, "Frequency"); + configInput(RES_INPUT, "Resonance"); + configInput(DRIVE_INPUT, "Drive"); + configInput(IN_INPUT, "In"); + configOutput(LPF_OUTPUT, "Lowpass filter"); + configOutput(HPF_OUTPUT, "Highpass filter"); } void onReset() override { diff --git a/src/VCO.cpp b/src/VCO.cpp index fdbbbd0..5e8b800 100644 --- a/src/VCO.cpp +++ b/src/VCO.cpp @@ -287,6 +287,15 @@ struct VCO : Module { configParam(FM_PARAM, 0.f, 1.f, 0.f, "Frequency modulation", "%", 0.f, 100.f); configParam(PW_PARAM, 0.01f, 0.99f, 0.5f, "Pulse width", "%", 0.f, 100.f); configParam(PWM_PARAM, 0.f, 1.f, 0.f, "Pulse width modulation", "%", 0.f, 100.f); + configInput(PITCH_INPUT, "1V/oct pitch"); + configInput(FM_INPUT, "Frequency modulation"); + configInput(SYNC_INPUT, "Sync"); + configInput(PW_INPUT, "Pulse width modulation"); + configOutput(SIN_OUTPUT, "Sine"); + configOutput(TRI_OUTPUT, "Triangle"); + configOutput(SAW_OUTPUT, "Sawtooth"); + configOutput(SQR_OUTPUT, "Square"); + lightDivider.setDivision(16); } @@ -419,6 +428,11 @@ struct VCO2 : Module { configParam(FREQ_PARAM, -54.f, 54.f, 0.f, "Frequency", " Hz", dsp::FREQ_SEMITONE, dsp::FREQ_C4); configParam(WAVE_PARAM, 0.f, 3.f, 1.5f, "Wave"); configParam(FM_PARAM, 0.f, 1.f, 0.f, "Frequency modulation", "%", 0.f, 100.f); + configInput(FM_INPUT, "Frequency modulation"); + configInput(SYNC_INPUT, "Sync"); + configInput(WAVE_INPUT, "Wave"); + configOutput(OUT_OUTPUT, "Out"); + lightDivider.setDivision(16); }