@@ -132,6 +132,8 @@ struct LFO : Module { | |||||
configOutput(TRI_OUTPUT, "Triangle"); | configOutput(TRI_OUTPUT, "Triangle"); | ||||
configOutput(SAW_OUTPUT, "Sawtooth"); | configOutput(SAW_OUTPUT, "Sawtooth"); | ||||
configOutput(SQR_OUTPUT, "Square"); | configOutput(SQR_OUTPUT, "Square"); | ||||
configLight(PHASE_LIGHT, "Phase"); | |||||
lightInfos[PHASE_LIGHT]->description = "Tracks the sine output.\nGreen if positive, red if negative, blue if polyphonic."; | |||||
lightDivider.setDivision(16); | lightDivider.setDivision(16); | ||||
} | } | ||||
@@ -272,8 +274,10 @@ struct LFO2 : Module { | |||||
configParam(FM_PARAM, 0.f, 1.f, 1.f, "Frequency modulation", "%", 0.f, 100.f); | configParam(FM_PARAM, 0.f, 1.f, 1.f, "Frequency modulation", "%", 0.f, 100.f); | ||||
configInput(FM_INPUT, "Frequency modulation"); | configInput(FM_INPUT, "Frequency modulation"); | ||||
configInput(RESET_INPUT, "Reset"); | configInput(RESET_INPUT, "Reset"); | ||||
configInput(WAVE_INPUT, "Wave"); | |||||
configOutput(INTERP_OUTPUT, "Out"); | |||||
configInput(WAVE_INPUT, "Wave type"); | |||||
configOutput(INTERP_OUTPUT, "Audio"); | |||||
configLight(PHASE_LIGHT, "Phase"); | |||||
lightInfos[PHASE_LIGHT]->description = "Tracks the sine output.\nGreen if positive, red if negative, blue if polyphonic."; | |||||
lightDivider.setDivision(16); | lightDivider.setDivision(16); | ||||
} | } | ||||
@@ -25,7 +25,7 @@ struct Mutes : Module { | |||||
Mutes() { | Mutes() { | ||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | ||||
for (int i = 0; i < 10; i++) { | for (int i = 0; i < 10; i++) { | ||||
configParam(MUTE_PARAMS + i, 0.0, 1.0, 0.0, string::f("Row %d mute", i + 1)); | |||||
configButton(MUTE_PARAMS + i, string::f("Row %d mute", i + 1)); | |||||
configInput(IN_INPUTS + i, string::f("Row %d", i + 1)); | configInput(IN_INPUTS + i, string::f("Row %d", i + 1)); | ||||
configOutput(OUT_OUTPUTS + i, string::f("Row %d", i + 1)); | configOutput(OUT_OUTPUTS + i, string::f("Row %d", i + 1)); | ||||
} | } | ||||
@@ -23,8 +23,8 @@ struct Octave : Module { | |||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | ||||
configParam(OCTAVE_PARAM, -4.f, 4.f, 0.f, "Octave shift"); | configParam(OCTAVE_PARAM, -4.f, 4.f, 0.f, "Octave shift"); | ||||
configInput(PITCH_INPUT, "Pitch"); | configInput(PITCH_INPUT, "Pitch"); | ||||
configInput(OCTAVE_INPUT, "Octave shift"); | |||||
configOutput(PITCH_OUTPUT, "Octave-shifted pitch"); | |||||
configInput(OCTAVE_INPUT, "Octave shift CV"); | |||||
configOutput(PITCH_OUTPUT, "Pitch"); | |||||
} | } | ||||
void process(const ProcessArgs& args) override { | void process(const ProcessArgs& args) override { | ||||
@@ -64,6 +64,9 @@ struct OctaveButton : Widget { | |||||
if (pq) | if (pq) | ||||
activeOctave = std::round(pq->getValue()); | activeOctave = std::round(pq->getValue()); | ||||
// Disable tinting when rack brightness is decreased | |||||
nvgGlobalAlpha(args.vg, 1.0); | |||||
if (activeOctave == octave) { | if (activeOctave == octave) { | ||||
// Enabled | // Enabled | ||||
nvgBeginPath(args.vg); | nvgBeginPath(args.vg); | ||||
@@ -25,7 +25,7 @@ struct Pulses : Module { | |||||
Pulses() { | Pulses() { | ||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | ||||
for (int i = 0; i < 10; i++) { | for (int i = 0; i < 10; i++) { | ||||
configParam(TAP_PARAMS + i, 0.f, 1.f, 0.f, string::f("Row %d tap", i + 1)); | |||||
configButton(TAP_PARAMS + i, string::f("Row %d button", i + 1)); | |||||
configOutput(TRIG_OUTPUTS + i, string::f("Row %d trigger", i + 1)); | configOutput(TRIG_OUTPUTS + i, string::f("Row %d trigger", i + 1)); | ||||
configOutput(GATE_OUTPUTS + i, string::f("Row %d gate", i + 1)); | configOutput(GATE_OUTPUTS + i, string::f("Row %d gate", i + 1)); | ||||
} | } | ||||
@@ -127,6 +127,10 @@ struct QuantizerButton : OpaqueWidget { | |||||
void draw(const DrawArgs& args) override { | void draw(const DrawArgs& args) override { | ||||
const float margin = mm2px(1.5); | const float margin = mm2px(1.5); | ||||
Rect r = box.zeroPos().grow(Vec(margin, margin / 2).neg()); | Rect r = box.zeroPos().grow(Vec(margin, margin / 2).neg()); | ||||
// Disable tinting when rack brightness is decreased | |||||
nvgGlobalAlpha(args.vg, 1.0); | |||||
nvgBeginPath(args.vg); | nvgBeginPath(args.vg); | ||||
nvgRect(args.vg, RECT_ARGS(r)); | nvgRect(args.vg, RECT_ARGS(r)); | ||||
if (module ? module->playingNotes[note] : (note == 0)) { | if (module ? module->playingNotes[note] : (note == 0)) { | ||||
@@ -299,6 +299,9 @@ struct ScopeDisplay : TransparentWidget { | |||||
if (!module) | if (!module) | ||||
return; | return; | ||||
// Disable tinting when rack brightness is decreased | |||||
nvgGlobalAlpha(args.vg, 1.0); | |||||
float gainX = std::pow(2.f, std::round(module->params[Scope::X_SCALE_PARAM].getValue())) / 10.f; | float gainX = std::pow(2.f, std::round(module->params[Scope::X_SCALE_PARAM].getValue())) / 10.f; | ||||
float gainY = std::pow(2.f, std::round(module->params[Scope::Y_SCALE_PARAM].getValue())) / 10.f; | float gainY = std::pow(2.f, std::round(module->params[Scope::Y_SCALE_PARAM].getValue())) / 10.f; | ||||
float offsetX = module->params[Scope::X_POS_PARAM].getValue(); | float offsetX = module->params[Scope::X_POS_PARAM].getValue(); | ||||
@@ -31,22 +31,22 @@ struct SequentialSwitch : Module { | |||||
SequentialSwitch() { | SequentialSwitch() { | ||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | ||||
configParam(STEPS_PARAM, 0.0, 2.0, 0.0, "Steps", "", 0, -1, 4); | |||||
configSwitch(STEPS_PARAM, 0.0, 2.0, 0.0, "Steps", {"2", "3", "4"}); | |||||
configInput(CLOCK_INPUT, "Clock"); | configInput(CLOCK_INPUT, "Clock"); | ||||
configInput(RESET_INPUT, "Reset"); | configInput(RESET_INPUT, "Reset"); | ||||
if (INPUTS == 1) { | if (INPUTS == 1) { | ||||
configInput(IN_INPUTS + 0, "In"); | |||||
configInput(IN_INPUTS + 0, "Main"); | |||||
} | } | ||||
else { | else { | ||||
for (int i = 0; i < INPUTS; i++) | for (int i = 0; i < INPUTS; i++) | ||||
configInput(IN_INPUTS + i, string::f("Ch %d", i + 1)); | |||||
configInput(IN_INPUTS + i, string::f("Channel %d", i + 1)); | |||||
} | } | ||||
if (OUTPUTS == 1) { | if (OUTPUTS == 1) { | ||||
configOutput(OUT_OUTPUTS + 0, "Out"); | |||||
configOutput(OUT_OUTPUTS + 0, "Main"); | |||||
} | } | ||||
else { | else { | ||||
for (int i = 0; i < OUTPUTS; i++) | for (int i = 0; i < OUTPUTS; i++) | ||||
configOutput(OUT_OUTPUTS + i, string::f("Ch %d", i + 1)); | |||||
configOutput(OUT_OUTPUTS + i, string::f("Channel %d", i + 1)); | |||||
} | } | ||||
for (int i = 0; i < 4; i++) { | for (int i = 0; i < 4; i++) { | ||||
@@ -29,17 +29,17 @@ struct Unity : Module { | |||||
Unity() { | Unity() { | ||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | ||||
configSwitch(AVG1_PARAM, 0.0, 1.0, 0.0, "Ch 1 mode", {"Sum", "Average"}); | |||||
configSwitch(AVG2_PARAM, 0.0, 1.0, 0.0, "Ch 2 mode", {"Sum", "Average"}); | |||||
configSwitch(AVG1_PARAM, 0.0, 1.0, 0.0, "Channel 1 mode", {"Sum", "Average"}); | |||||
configSwitch(AVG2_PARAM, 0.0, 1.0, 0.0, "Channel 2 mode", {"Sum", "Average"}); | |||||
for (int i = 0; i < 2; i++) { | for (int i = 0; i < 2; i++) { | ||||
for (int j = 0; j < 6; j++) { | for (int j = 0; j < 6; j++) { | ||||
configInput(IN_INPUTS + i * 6 + j, string::f("In %d ch %d", i + 1, j + 1)); | |||||
configInput(IN_INPUTS + i * 6 + j, string::f("Channel %d #%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"); | |||||
configOutput(MIX1_OUTPUT, "Channel 1 mix"); | |||||
configOutput(INV1_OUTPUT, "Channel 1 inverse mix"); | |||||
configOutput(MIX2_OUTPUT, "Channel 2 mix"); | |||||
configOutput(INV2_OUTPUT, "Channel 2 inverse mix"); | |||||
lightDivider.setDivision(256); | lightDivider.setDivision(256); | ||||
} | } | ||||
@@ -24,16 +24,16 @@ struct VCA : Module { | |||||
VCA() { | VCA() { | ||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); | 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"); | |||||
configParam(LEVEL1_PARAM, 0.0, 1.0, 1.0, "Channel 1 level", "%", 0, 100); | |||||
configParam(LEVEL2_PARAM, 0.0, 1.0, 1.0, "Channel 2 level", "%", 0, 100); | |||||
configInput(EXP1_INPUT, "Channel 1 exponential CV"); | |||||
configInput(EXP2_INPUT, "Channel 2 exponential CV"); | |||||
configInput(LIN1_INPUT, "Channel 1 linear CV"); | |||||
configInput(LIN2_INPUT, "Channel 2 linear CV"); | |||||
configInput(IN1_INPUT, "Channel 1"); | |||||
configInput(IN2_INPUT, "Channel 2"); | |||||
configOutput(OUT1_OUTPUT, "Channel 1"); | |||||
configOutput(OUT2_OUTPUT, "Channel 2"); | |||||
} | } | ||||
void processChannel(Input& in, Param& level, Input& lin, Input& exp, Output& out) { | void processChannel(Input& in, Param& level, Input& lin, Input& exp, Output& out) { | ||||
@@ -159,7 +159,6 @@ struct VCA_1 : Module { | |||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | ||||
configParam(LEVEL_PARAM, 0.0, 1.0, 1.0, "Level", "%", 0, 100); | configParam(LEVEL_PARAM, 0.0, 1.0, 1.0, "Level", "%", 0, 100); | ||||
configSwitch(EXP_PARAM, 0.0, 1.0, 1.0, "Response mode", {"Exponential", "Linear"}); | configSwitch(EXP_PARAM, 0.0, 1.0, 1.0, "Response mode", {"Exponential", "Linear"}); | ||||
} | } | ||||
void process(const ProcessArgs& args) override { | void process(const ProcessArgs& args) override { | ||||
@@ -206,6 +205,9 @@ struct VCA_1VUKnob : SliderKnob { | |||||
nvgFillColor(args.vg, nvgRGB(0, 0, 0)); | nvgFillColor(args.vg, nvgRGB(0, 0, 0)); | ||||
nvgFill(args.vg); | nvgFill(args.vg); | ||||
// Disable tinting when rack brightness is decreased | |||||
nvgGlobalAlpha(args.vg, 1.0); | |||||
const Vec margin = Vec(3, 3); | const Vec margin = Vec(3, 3); | ||||
Rect r = box.zeroPos().grow(margin.neg()); | Rect r = box.zeroPos().grow(margin.neg()); | ||||
@@ -214,14 +216,16 @@ struct VCA_1VUKnob : SliderKnob { | |||||
float value = pq ? pq->getValue() : 1.f; | float value = pq ? pq->getValue() : 1.f; | ||||
// Segment value | // Segment value | ||||
nvgBeginPath(args.vg); | |||||
nvgRect(args.vg, | |||||
r.pos.x, | |||||
r.pos.y + r.size.y * (1 - value), | |||||
r.size.x, | |||||
r.size.y * value); | |||||
nvgFillColor(args.vg, color::mult(color::WHITE, 0.33)); | |||||
nvgFill(args.vg); | |||||
if (value >= 0.005f) { | |||||
nvgBeginPath(args.vg); | |||||
nvgRect(args.vg, | |||||
r.pos.x, | |||||
r.pos.y + r.size.y * (1 - value), | |||||
r.size.x, | |||||
r.size.y * value); | |||||
nvgFillColor(args.vg, color::mult(color::WHITE, 0.33)); | |||||
nvgFill(args.vg); | |||||
} | |||||
// Segment gain | // Segment gain | ||||
nvgBeginPath(args.vg); | nvgBeginPath(args.vg); | ||||
@@ -103,7 +103,7 @@ struct VCF : Module { | |||||
configInput(FREQ_INPUT, "Frequency"); | configInput(FREQ_INPUT, "Frequency"); | ||||
configInput(RES_INPUT, "Resonance"); | configInput(RES_INPUT, "Resonance"); | ||||
configInput(DRIVE_INPUT, "Drive"); | configInput(DRIVE_INPUT, "Drive"); | ||||
configInput(IN_INPUT, "In"); | |||||
configInput(IN_INPUT, "Audio"); | |||||
configOutput(LPF_OUTPUT, "Lowpass filter"); | configOutput(LPF_OUTPUT, "Lowpass filter"); | ||||
configOutput(HPF_OUTPUT, "Highpass filter"); | configOutput(HPF_OUTPUT, "Highpass filter"); | ||||
configBypass(IN_INPUT, LPF_OUTPUT); | configBypass(IN_INPUT, LPF_OUTPUT); | ||||
@@ -31,10 +31,10 @@ struct VCMixer : Module { | |||||
// x^1 scaling up to 6 dB | // x^1 scaling up to 6 dB | ||||
configParam(MIX_LVL_PARAM, 0.0, 2.0, 1.0, "Master level", " dB", -10, 20); | configParam(MIX_LVL_PARAM, 0.0, 2.0, 1.0, "Master level", " dB", -10, 20); | ||||
// x^2 scaling up to 6 dB | // x^2 scaling up to 6 dB | ||||
configParam(LVL_PARAMS + 0, 0.0, M_SQRT2, 1.0, "Ch 1 level", " dB", -10, 40); | |||||
configParam(LVL_PARAMS + 1, 0.0, M_SQRT2, 1.0, "Ch 2 level", " dB", -10, 40); | |||||
configParam(LVL_PARAMS + 2, 0.0, M_SQRT2, 1.0, "Ch 3 level", " dB", -10, 40); | |||||
configParam(LVL_PARAMS + 3, 0.0, M_SQRT2, 1.0, "Ch 4 level", " dB", -10, 40); | |||||
configParam(LVL_PARAMS + 0, 0.0, M_SQRT2, 1.0, "Channel 1 level", " dB", -10, 40); | |||||
configParam(LVL_PARAMS + 1, 0.0, M_SQRT2, 1.0, "Channel 2 level", " dB", -10, 40); | |||||
configParam(LVL_PARAMS + 2, 0.0, M_SQRT2, 1.0, "Channel 3 level", " dB", -10, 40); | |||||
configParam(LVL_PARAMS + 3, 0.0, M_SQRT2, 1.0, "Channel 4 level", " dB", -10, 40); | |||||
configInput(MIX_CV_INPUT, "Mix CV"); | configInput(MIX_CV_INPUT, "Mix CV"); | ||||
for (int i = 0; i < 4; i++) | for (int i = 0; i < 4; i++) | ||||
configInput(CH_INPUTS + i, string::f("Channel %d", i + 1)); | configInput(CH_INPUTS + i, string::f("Channel %d", i + 1)); | ||||
@@ -430,8 +430,8 @@ struct VCO2 : Module { | |||||
configParam(FM_PARAM, 0.f, 1.f, 1.f, "Frequency modulation", "%", 0.f, 100.f); | configParam(FM_PARAM, 0.f, 1.f, 1.f, "Frequency modulation", "%", 0.f, 100.f); | ||||
configInput(FM_INPUT, "Frequency modulation"); | configInput(FM_INPUT, "Frequency modulation"); | ||||
configInput(SYNC_INPUT, "Sync"); | configInput(SYNC_INPUT, "Sync"); | ||||
configInput(WAVE_INPUT, "Wave"); | |||||
configOutput(OUT_OUTPUT, "Out"); | |||||
configInput(WAVE_INPUT, "Wave type"); | |||||
configOutput(OUT_OUTPUT, "Audio"); | |||||
lightDivider.setDivision(16); | lightDivider.setDivision(16); | ||||
} | } | ||||
@@ -22,6 +22,8 @@ struct Viz : Module { | |||||
Viz() { | Viz() { | ||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | ||||
configInput(POLY_INPUT, "Polyphonic"); | |||||
lightDivider.setDivision(16); | lightDivider.setDivision(16); | ||||
} | } | ||||