From 4fe8178fa2909a7a452c7ae3cc1b8a296a1e7cc1 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 30 Mar 2019 18:42:57 -0400 Subject: [PATCH] Update to Rack v1 API --- src/ABC.cpp | 8 ++++---- src/DualAtenuverter.cpp | 8 ++++---- src/EvenVCO.cpp | 6 +++--- src/Mixer.cpp | 8 ++++---- src/Rampage.cpp | 26 +++++++++++++------------- src/SlewLimiter.cpp | 6 +++--- src/SpringReverb.cpp | 8 ++++---- 7 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/ABC.cpp b/src/ABC.cpp index 2996b82..238cd89 100644 --- a/src/ABC.cpp +++ b/src/ABC.cpp @@ -40,10 +40,10 @@ struct ABC : Module { ABC() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - params[B1_LEVEL_PARAM].config(-1.0, 1.0, 0.0, "B1 Level"); - params[C1_LEVEL_PARAM].config(-1.0, 1.0, 0.0, "C1 Level"); - params[B2_LEVEL_PARAM].config(-1.0, 1.0, 0.0, "B2 Level"); - params[C2_LEVEL_PARAM].config(-1.0, 1.0, 0.0, "C2 Level"); + configParam(B1_LEVEL_PARAM, -1.0, 1.0, 0.0, "B1 Level"); + configParam(C1_LEVEL_PARAM, -1.0, 1.0, 0.0, "C1 Level"); + configParam(B2_LEVEL_PARAM, -1.0, 1.0, 0.0, "B2 Level"); + configParam(C2_LEVEL_PARAM, -1.0, 1.0, 0.0, "C2 Level"); } void process(const ProcessArgs &args) override { diff --git a/src/DualAtenuverter.cpp b/src/DualAtenuverter.cpp index b5d23af..3007ba3 100644 --- a/src/DualAtenuverter.cpp +++ b/src/DualAtenuverter.cpp @@ -29,10 +29,10 @@ struct DualAtenuverter : Module { DualAtenuverter() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - params[ATEN1_PARAM].config(-1.0, 1.0, 0.0, "Ch 1 gain"); - params[OFFSET1_PARAM].config(-10.0, 10.0, 0.0, "Ch 1 offset", " V"); - params[ATEN2_PARAM].config(-1.0, 1.0, 0.0, "Ch 2 gain"); - params[OFFSET2_PARAM].config(-10.0, 10.0, 0.0, "Ch 2 offset", " V"); + configParam(ATEN1_PARAM, -1.0, 1.0, 0.0, "Ch 1 gain"); + configParam(OFFSET1_PARAM, -10.0, 10.0, 0.0, "Ch 1 offset", " V"); + configParam(ATEN2_PARAM, -1.0, 1.0, 0.0, "Ch 2 gain"); + configParam(OFFSET2_PARAM, -10.0, 10.0, 0.0, "Ch 2 offset", " V"); } void process(const ProcessArgs &args) override { diff --git a/src/EvenVCO.cpp b/src/EvenVCO.cpp index 535a6ba..f3d5496 100644 --- a/src/EvenVCO.cpp +++ b/src/EvenVCO.cpp @@ -44,9 +44,9 @@ struct EvenVCO : Module { EvenVCO() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); - params[OCTAVE_PARAM].config(-5.0, 4.0, 0.0, "Octave", "'", 0.5); - params[TUNE_PARAM].config(-7.0, 7.0, 0.0, "Tune", " semitones"); - params[PWM_PARAM].config(-1.0, 1.0, 0.0, "Pulse width"); + configParam(OCTAVE_PARAM, -5.0, 4.0, 0.0, "Octave", "'", 0.5); + configParam(TUNE_PARAM, -7.0, 7.0, 0.0, "Tune", " semitones"); + configParam(PWM_PARAM, -1.0, 1.0, 0.0, "Pulse width"); } void process(const ProcessArgs &args) override { diff --git a/src/Mixer.cpp b/src/Mixer.cpp index 5aafcc9..d097e75 100644 --- a/src/Mixer.cpp +++ b/src/Mixer.cpp @@ -29,10 +29,10 @@ struct Mixer : Module { Mixer() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - params[CH1_PARAM].config(0.0, 1.0, 0.0, "Ch 1 level", "%", 0, 100); - params[CH2_PARAM].config(0.0, 1.0, 0.0, "Ch 2 level", "%", 0, 100); - params[CH3_PARAM].config(0.0, 1.0, 0.0, "Ch 3 level", "%", 0, 100); - params[CH4_PARAM].config(0.0, 1.0, 0.0, "Ch 4 level", "%", 0, 100); + configParam(CH1_PARAM, 0.0, 1.0, 0.0, "Ch 1 level", "%", 0, 100); + configParam(CH2_PARAM, 0.0, 1.0, 0.0, "Ch 2 level", "%", 0, 100); + configParam(CH3_PARAM, 0.0, 1.0, 0.0, "Ch 3 level", "%", 0, 100); + configParam(CH4_PARAM, 0.0, 1.0, 0.0, "Ch 4 level", "%", 0, 100); } void process(const ProcessArgs &args) override { diff --git a/src/Rampage.cpp b/src/Rampage.cpp index be7f731..cacbc15 100644 --- a/src/Rampage.cpp +++ b/src/Rampage.cpp @@ -80,19 +80,19 @@ struct Rampage : Module { Rampage() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - params[RANGE_A_PARAM].config(0.0, 2.0, 0.0, "Ch 1 range"); - params[SHAPE_A_PARAM].config(-1.0, 1.0, 0.0, "Ch 1 shape"); - params[TRIGG_A_PARAM].config(0.0, 1.0, 0.0, "Ch 1 trigger"); - params[RISE_A_PARAM].config(0.0, 1.0, 0.0, "Ch 1 rise time"); - params[FALL_A_PARAM].config(0.0, 1.0, 0.0, "Ch 1 fall time"); - params[CYCLE_A_PARAM].config(0.0, 1.0, 0.0, "Ch 1 cycle"); - params[RANGE_B_PARAM].config(0.0, 2.0, 0.0, "Ch 2 range"); - params[SHAPE_B_PARAM].config(-1.0, 1.0, 0.0, "Ch 2 shape"); - params[TRIGG_B_PARAM].config(0.0, 1.0, 0.0, "Ch 2 trigger"); - params[RISE_B_PARAM].config(0.0, 1.0, 0.0, "Ch 2 rise time"); - params[FALL_B_PARAM].config(0.0, 1.0, 0.0, "Ch 2 fall time"); - params[CYCLE_B_PARAM].config(0.0, 1.0, 0.0, "Ch 2 cycle"); - params[BALANCE_PARAM].config(0.0, 1.0, 0.5, "Balance"); + configParam(RANGE_A_PARAM, 0.0, 2.0, 0.0, "Ch 1 range"); + configParam(SHAPE_A_PARAM, -1.0, 1.0, 0.0, "Ch 1 shape"); + configParam(TRIGG_A_PARAM, 0.0, 1.0, 0.0, "Ch 1 trigger"); + configParam(RISE_A_PARAM, 0.0, 1.0, 0.0, "Ch 1 rise time"); + configParam(FALL_A_PARAM, 0.0, 1.0, 0.0, "Ch 1 fall time"); + configParam(CYCLE_A_PARAM, 0.0, 1.0, 0.0, "Ch 1 cycle"); + configParam(RANGE_B_PARAM, 0.0, 2.0, 0.0, "Ch 2 range"); + configParam(SHAPE_B_PARAM, -1.0, 1.0, 0.0, "Ch 2 shape"); + configParam(TRIGG_B_PARAM, 0.0, 1.0, 0.0, "Ch 2 trigger"); + configParam(RISE_B_PARAM, 0.0, 1.0, 0.0, "Ch 2 rise time"); + configParam(FALL_B_PARAM, 0.0, 1.0, 0.0, "Ch 2 fall time"); + configParam(CYCLE_B_PARAM, 0.0, 1.0, 0.0, "Ch 2 cycle"); + configParam(BALANCE_PARAM, 0.0, 1.0, 0.5, "Balance"); } void process(const ProcessArgs &args) override { diff --git a/src/SlewLimiter.cpp b/src/SlewLimiter.cpp index 039c7aa..2af9b66 100644 --- a/src/SlewLimiter.cpp +++ b/src/SlewLimiter.cpp @@ -23,9 +23,9 @@ struct SlewLimiter : Module { SlewLimiter() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); - params[SHAPE_PARAM].config(0.0, 1.0, 0.0, "Shape"); - params[RISE_PARAM].config(0.0, 1.0, 0.0, "Rise time"); - params[FALL_PARAM].config(0.0, 1.0, 0.0, "Fall time"); + configParam(SHAPE_PARAM, 0.0, 1.0, 0.0, "Shape"); + configParam(RISE_PARAM, 0.0, 1.0, 0.0, "Rise time"); + configParam(FALL_PARAM, 0.0, 1.0, 0.0, "Fall time"); } void process(const ProcessArgs &args) override { diff --git a/src/SpringReverb.cpp b/src/SpringReverb.cpp index 6838b94..13e29aa 100644 --- a/src/SpringReverb.cpp +++ b/src/SpringReverb.cpp @@ -48,10 +48,10 @@ struct SpringReverb : Module { SpringReverb() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - params[WET_PARAM].config(0.0, 1.0, 0.5, "Dry/wet", "%", 0, 100); - params[LEVEL1_PARAM].config(0.0, 1.0, 0.0, "In 1 level", "%", 0, 100); - params[LEVEL2_PARAM].config(0.0, 1.0, 0.0, "In 1 level", "%", 0, 100); - params[HPF_PARAM].config(0.0, 1.0, 0.5, "High pass filter cutoff"); + configParam(WET_PARAM, 0.0, 1.0, 0.5, "Dry/wet", "%", 0, 100); + configParam(LEVEL1_PARAM, 0.0, 1.0, 0.0, "In 1 level", "%", 0, 100); + configParam(LEVEL2_PARAM, 0.0, 1.0, 0.0, "In 1 level", "%", 0, 100); + configParam(HPF_PARAM, 0.0, 1.0, 0.5, "High pass filter cutoff"); convolver = new dsp::RealTimeConvolver(BLOCK_SIZE);