Browse Source

Add input/output port labels.

tags/v2.0.1
Andrew Belt 5 years ago
parent
commit
b824e0d690
20 changed files with 219 additions and 79 deletions
  1. +3
    -1
      src/8vert.cpp
  2. +6
    -0
      src/Delay.cpp
  3. +14
    -0
      src/LFO.cpp
  4. +4
    -0
      src/Merge.cpp
  5. +10
    -0
      src/MidSide.cpp
  6. +58
    -56
      src/Mutes.cpp
  7. +14
    -0
      src/Noise.cpp
  8. +3
    -0
      src/Octave.cpp
  9. +5
    -2
      src/Pulses.cpp
  10. +3
    -0
      src/Quantizer.cpp
  11. +8
    -0
      src/Random.cpp
  12. +29
    -20
      src/SEQ3.cpp
  13. +3
    -0
      src/Scope.cpp
  14. +16
    -0
      src/SequentialSwitch.cpp
  15. +4
    -0
      src/Split.cpp
  16. +2
    -0
      src/Sum.cpp
  17. +9
    -0
      src/Unity.cpp
  18. +8
    -0
      src/VCA.cpp
  19. +6
    -0
      src/VCF.cpp
  20. +14
    -0
      src/VCO.cpp

+ 3
- 1
src/8vert.cpp View File

@@ -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));
}
}



+ 6
- 0
src/Delay.cpp View File

@@ -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);


+ 14
- 0
src/LFO.cpp View File

@@ -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);
}



+ 4
- 0
src/Merge.cpp View File

@@ -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();
}


+ 10
- 0
src/MidSide.cpp View File

@@ -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 {


+ 58
- 56
src/Mutes.cpp View File

@@ -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<ScrewSilver>(Vec(15, 365)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 30, 365)));

addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 18.165)), module, Mutes::MUTE_PARAM + 0));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 28.164)), module, Mutes::MUTE_PARAM + 1));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 38.164)), module, Mutes::MUTE_PARAM + 2));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 48.165)), module, Mutes::MUTE_PARAM + 3));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 58.164)), module, Mutes::MUTE_PARAM + 4));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 68.165)), module, Mutes::MUTE_PARAM + 5));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 78.164)), module, Mutes::MUTE_PARAM + 6));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 88.164)), module, Mutes::MUTE_PARAM + 7));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 98.165)), module, Mutes::MUTE_PARAM + 8));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 108.166)), module, Mutes::MUTE_PARAM + 9));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 17.81)), module, Mutes::IN_INPUT + 0));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 27.809)), module, Mutes::IN_INPUT + 1));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 37.809)), module, Mutes::IN_INPUT + 2));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 47.81)), module, Mutes::IN_INPUT + 3));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 57.81)), module, Mutes::IN_INPUT + 4));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 67.809)), module, Mutes::IN_INPUT + 5));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 77.81)), module, Mutes::IN_INPUT + 6));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 87.81)), module, Mutes::IN_INPUT + 7));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 97.809)), module, Mutes::IN_INPUT + 8));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 107.809)), module, Mutes::IN_INPUT + 9));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 17.81)), module, Mutes::OUT_OUTPUT + 0));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 27.809)), module, Mutes::OUT_OUTPUT + 1));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 37.809)), module, Mutes::OUT_OUTPUT + 2));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 47.81)), module, Mutes::OUT_OUTPUT + 3));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 57.809)), module, Mutes::OUT_OUTPUT + 4));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 67.809)), module, Mutes::OUT_OUTPUT + 5));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 77.81)), module, Mutes::OUT_OUTPUT + 6));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 87.81)), module, Mutes::OUT_OUTPUT + 7));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 97.809)), module, Mutes::OUT_OUTPUT + 8));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 107.809)), module, Mutes::OUT_OUTPUT + 9));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 18.915)), module, Mutes::MUTE_LIGHT + 0));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 28.916)), module, Mutes::MUTE_LIGHT + 1));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 38.915)), module, Mutes::MUTE_LIGHT + 2));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 48.915)), module, Mutes::MUTE_LIGHT + 3));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 58.916)), module, Mutes::MUTE_LIGHT + 4));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 68.916)), module, Mutes::MUTE_LIGHT + 5));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 78.915)), module, Mutes::MUTE_LIGHT + 6));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 88.916)), module, Mutes::MUTE_LIGHT + 7));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 98.915)), module, Mutes::MUTE_LIGHT + 8));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 108.915)), module, Mutes::MUTE_LIGHT + 9));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 18.165)), module, Mutes::MUTE_PARAMS + 0));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 28.164)), module, Mutes::MUTE_PARAMS + 1));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 38.164)), module, Mutes::MUTE_PARAMS + 2));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 48.165)), module, Mutes::MUTE_PARAMS + 3));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 58.164)), module, Mutes::MUTE_PARAMS + 4));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 68.165)), module, Mutes::MUTE_PARAMS + 5));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 78.164)), module, Mutes::MUTE_PARAMS + 6));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 88.164)), module, Mutes::MUTE_PARAMS + 7));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 98.165)), module, Mutes::MUTE_PARAMS + 8));
addParam(createParam<LEDBezel>(mm2px(Vec(16.57, 108.166)), module, Mutes::MUTE_PARAMS + 9));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 17.81)), module, Mutes::IN_INPUTS + 0));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 27.809)), module, Mutes::IN_INPUTS + 1));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 37.809)), module, Mutes::IN_INPUTS + 2));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 47.81)), module, Mutes::IN_INPUTS + 3));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 57.81)), module, Mutes::IN_INPUTS + 4));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 67.809)), module, Mutes::IN_INPUTS + 5));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 77.81)), module, Mutes::IN_INPUTS + 6));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 87.81)), module, Mutes::IN_INPUTS + 7));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 97.809)), module, Mutes::IN_INPUTS + 8));
addInput(createInput<PJ301MPort>(mm2px(Vec(4.214, 107.809)), module, Mutes::IN_INPUTS + 9));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 17.81)), module, Mutes::OUT_OUTPUTS + 0));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 27.809)), module, Mutes::OUT_OUTPUTS + 1));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 37.809)), module, Mutes::OUT_OUTPUTS + 2));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 47.81)), module, Mutes::OUT_OUTPUTS + 3));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 57.809)), module, Mutes::OUT_OUTPUTS + 4));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 67.809)), module, Mutes::OUT_OUTPUTS + 5));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 77.81)), module, Mutes::OUT_OUTPUTS + 6));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 87.81)), module, Mutes::OUT_OUTPUTS + 7));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 97.809)), module, Mutes::OUT_OUTPUTS + 8));
addOutput(createOutput<PJ301MPort>(mm2px(Vec(28.214, 107.809)), module, Mutes::OUT_OUTPUTS + 9));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 18.915)), module, Mutes::MUTE_LIGHTS + 0));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 28.916)), module, Mutes::MUTE_LIGHTS + 1));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 38.915)), module, Mutes::MUTE_LIGHTS + 2));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 48.915)), module, Mutes::MUTE_LIGHTS + 3));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 58.916)), module, Mutes::MUTE_LIGHTS + 4));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 68.916)), module, Mutes::MUTE_LIGHTS + 5));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 78.915)), module, Mutes::MUTE_LIGHTS + 6));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 88.916)), module, Mutes::MUTE_LIGHTS + 7));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 98.915)), module, Mutes::MUTE_LIGHTS + 8));
addChild(createLight<LEDBezelLight<GreenLight>>(mm2px(Vec(17.32, 108.915)), module, Mutes::MUTE_LIGHTS + 9));
}
};



+ 14
- 0
src/Noise.cpp View File

@@ -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};


+ 3
- 0
src/Octave.cpp View File

@@ -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 {


+ 5
- 2
src/Pulses.cpp View File

@@ -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 {


+ 3
- 0
src/Quantizer.cpp View File

@@ -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();
}



+ 8
- 0
src/Random.cpp View File

@@ -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() {


+ 29
- 20
src/SEQ3.cpp View File

@@ -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<PJ301MPort>(Vec(portX[7] - 1, 98), module, SEQ3::ROW3_OUTPUT));

for (int i = 0; i < 8; i++) {
addParam(createParam<RoundBlackKnob>(Vec(portX[i] - 2, 157), module, SEQ3::ROW1_PARAM + i));
addParam(createParam<RoundBlackKnob>(Vec(portX[i] - 2, 198), module, SEQ3::ROW2_PARAM + i));
addParam(createParam<RoundBlackKnob>(Vec(portX[i] - 2, 240), module, SEQ3::ROW3_PARAM + i));
addParam(createParam<LEDButton>(Vec(portX[i] + 2, 278 - 1), module, SEQ3::GATE_PARAM + i));
addParam(createParam<RoundBlackKnob>(Vec(portX[i] - 2, 157), module, SEQ3::ROW1_PARAMS + i));
addParam(createParam<RoundBlackKnob>(Vec(portX[i] - 2, 198), module, SEQ3::ROW2_PARAMS + i));
addParam(createParam<RoundBlackKnob>(Vec(portX[i] - 2, 240), module, SEQ3::ROW3_PARAMS + i));
addParam(createParam<LEDButton>(Vec(portX[i] + 2, 278 - 1), module, SEQ3::GATE_PARAMS + i));
addChild(createLight<MediumLight<GreenLight>>(Vec(portX[i] + 6.4f, 281.4f), module, SEQ3::GATE_LIGHTS + i));
addOutput(createOutput<PJ301MPort>(Vec(portX[i] - 1, 307), module, SEQ3::GATE_OUTPUT + i));
addOutput(createOutput<PJ301MPort>(Vec(portX[i] - 1, 307), module, SEQ3::GATE_OUTPUTS + i));
}
}
};


+ 3
- 0
src/Scope.cpp View File

@@ -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 {


+ 16
- 0
src/SequentialSwitch.cpp View File

@@ -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


+ 4
- 0
src/Split.cpp View File

@@ -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);
}



+ 2
- 0
src/Sum.cpp View File

@@ -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);


+ 9
- 0
src/Unity.cpp View File

@@ -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);
}


+ 8
- 0
src/VCA.cpp View File

@@ -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) {


+ 6
- 0
src/VCF.cpp View File

@@ -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 {


+ 14
- 0
src/VCO.cpp View File

@@ -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);
}



Loading…
Cancel
Save