commit a7af271467ec0f6cc8882193c5bf6ed1b89e5808 parent 366118388e1fdd5dcc55d889738e51d125969505 Author: Matt Demanett <matt@demanett.net> Date: Sat, 30 Nov 2019 01:48:57 -0500 Drop empty lights enums. Diffstat:
50 files changed, 59 insertions(+), 240 deletions(-)
diff --git a/scripts/svg_widgets.rb b/scripts/svg_widgets.rb @@ -280,9 +280,13 @@ def make_enums(widgets_by_type, comments, indent) i2 = indent ? "\t\t" : "\t" groups = %w(Params Inputs Outputs Lights).map do |type| ids = (widgets_by_type[type.downcase] || []).map(&:id) - ids << "NUM_#{type.upcase}" - "#{i1}enum #{type}Ids {\n#{i2}#{ids.join(",\n#{i2}")}\n#{i1}};" - end + if ids.empty? && type == 'Lights' + nil + else + ids << "NUM_#{type.upcase}" + "#{i1}enum #{type}Ids {\n#{i2}#{ids.join(",\n#{i2}")}\n#{i1}};" + end + end.reject { |s| s.nil? } s = groups.join("\n\n") s = [make_comment(true, indent), s, make_comment(false, indent)].join("\n") if comments s @@ -332,6 +336,9 @@ def make_stub(widgets_by_type, template, options) s.gsub!(/%PARAMCONFIGS%/, make_param_configs(widgets_by_type, false, true, options)) end s.sub!(/\s*\}\s*(Model\*.*)\Z/, "\n}\n\n\n\\1") + if widgets_by_type['lights'].nil? + s.sub!(/, NUM_LIGHTS\)/, ')') + end s = [make_comment(true, false), s, make_comment(false, false)].join("\n") if comments s end diff --git a/src/AMRM.hpp b/src/AMRM.hpp @@ -30,14 +30,10 @@ struct AMRM : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Saturator _saturator; AMRM() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(RECTIFY_PARAM, 0.0f, 1.0f, 0.0f, "Rectification", "%", 0.0f, 100.0f); configParam(DRYWET_PARAM, 0.0f, 1.0f, 1.0f, "Wet mix", "%", 0.0f, 100.0f); } diff --git a/src/AnalyzerXL.hpp b/src/AnalyzerXL.hpp @@ -28,16 +28,12 @@ struct AnalyzerXL : AnalyzerBase { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - float _range = 0.0f; float _smooth = 0.25f; AnalyzerCore::Quality _quality = AnalyzerCore::QUALITY_GOOD; AnalyzerCore::Window _window = AnalyzerCore::WINDOW_KAISER; - AnalyzerXL() : AnalyzerBase(8, NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { + AnalyzerXL() : AnalyzerBase(8, NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS) { reset(); } diff --git a/src/Assign.hpp b/src/Assign.hpp @@ -25,10 +25,6 @@ struct Assign : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - int _channelsOut; Trigger _resetTrigger; Trigger _gateTrigger[maxChannels]; @@ -43,7 +39,7 @@ struct Assign : BGModule { unsigned long _step = 0; Assign() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(CHANNELS_PARAM, 1.0f, 16.0f, 0.0f, "Channels"); reset(); } diff --git a/src/Blank3.hpp b/src/Blank3.hpp @@ -23,15 +23,11 @@ struct Blank3 : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - RootMeanSquare _rms; float _level = 0.0f; Blank3() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); sampleRateChange(); } diff --git a/src/Blank6.hpp b/src/Blank6.hpp @@ -23,15 +23,11 @@ struct Blank6 : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - RootMeanSquare _rms; float _level = 0.0f; Blank6() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); sampleRateChange(); } diff --git a/src/Bool.hpp b/src/Bool.hpp @@ -26,12 +26,8 @@ struct Bool : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Bool() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); } void processChannel(const ProcessArgs& args, int c) override; diff --git a/src/CVD.hpp b/src/CVD.hpp @@ -29,10 +29,6 @@ struct CVD : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - struct Engine { DelayLine delay; CrossFader mix; @@ -44,7 +40,7 @@ struct CVD : BGModule { Engine* _engines[maxChannels] {}; CVD() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(TIME_PARAM, 0.0f, 1.0f, 0.5f, "Time base"); configParam(TIME_SCALE_PARAM, 0.0f, 2.0f, 1.0f, "Time scale", "", 10.0f, 0.1f); configParam(MIX_PARAM, -1.0f, 1.0f, 0.0f, "Dry wet mix", "%", 0.0f, 100.0f); diff --git a/src/Clpr.hpp b/src/Clpr.hpp @@ -31,10 +31,6 @@ struct Clpr : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - struct Engine { float thresholdDb = 0.0f; float outGain = -1.0f; @@ -49,7 +45,7 @@ struct Clpr : BGModule { bool _softKnee = true; Clpr() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(THRESHOLD_PARAM, 0.0f, 1.0f, 0.8f, "Threshold", " dB", 0.0f, 30.0f, -24.0f); configParam(OUTPUT_GAIN_PARAM, 0.0f, 1.0f, 0.0f, "Output gain", " dB", 0.0f, 24.0f); configParam(KNEE_PARAM, 0.0f, 1.0f, 0.0f, "Knee"); diff --git a/src/Cmp.hpp b/src/Cmp.hpp @@ -32,10 +32,6 @@ struct Cmp : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - enum State { LOW, HIGH, @@ -52,7 +48,7 @@ struct Cmp : BGModule { int _lagInSamples[maxChannels] {}; Cmp() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(A_PARAM, -1.0f, 1.0f, 0.0f, "A", " V", 0.0f, 10.0f); configParam(B_PARAM, -1.0f, 1.0f, 0.0f, "B", " V", 0.0f, 10.0f); configParam(WINDOW_PARAM, 0.0f, 1.0f, 0.5f, "Window", " V", 0.0f, 10.0f); diff --git a/src/Detune.hpp b/src/Detune.hpp @@ -28,10 +28,6 @@ struct Detune : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - float _cents[maxChannels] {}; float _lastCents[maxChannels]; float _lastInCV[maxChannels]; @@ -39,7 +35,7 @@ struct Detune : BGModule { float _minusCV[maxChannels] {}; Detune() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(CENTS_PARAM, 0.0f, 50.0f, 0.0f, "Cents"); for (int i = 0; i < maxChannels; ++i) { diff --git a/src/EightFO.hpp b/src/EightFO.hpp @@ -57,10 +57,6 @@ struct EightFO : LFOBase { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - enum Wave { NO_WAVE, RAMP_UP_WAVE, @@ -118,7 +114,7 @@ struct EightFO : LFOBase { Wave _wave = NO_WAVE; Engine* _engines[maxChannels] {}; - EightFO() : LFOBase(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { + EightFO() : LFOBase(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS) { configParam<LFOFrequencyParamQuantity>(FREQUENCY_PARAM, -5.0f, 8.0f, 0.0, "Frequency", " Hz"); configParam(WAVE_PARAM, 1.0, 5.0, 3.0, "Waveform"); configParam(SLOW_PARAM, 0.0, 1.0, 0.0, "Slow"); diff --git a/src/FMOp.hpp b/src/FMOp.hpp @@ -45,10 +45,6 @@ struct FMOp : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - static constexpr float amplitude = 5.0f; static constexpr int oversample = 8; static constexpr float oversampleMixIncrement = 0.01f; @@ -95,7 +91,7 @@ struct FMOp : BGModule { }; FMOp() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam<RatioParamQuantity>(RATIO_PARAM, -1.0f, 1.0f, 0.0f, "Frequency ratio"); configParam(FINE_PARAM, -1.0f, 1.0f, 0.0f, "Fine tune", " cents", 0.0f, 100.0f); configParam<EnvelopeSegmentParamQuantity>(ATTACK_PARAM, 0.0f, 1.0f, 0.141421f, "Attack", " s"); diff --git a/src/FlipFlop.hpp b/src/FlipFlop.hpp @@ -30,10 +30,6 @@ struct FlipFlop : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - bool _flipped1[maxChannels] {}; bool _flipped2[maxChannels] {}; PositiveZeroCrossing _trigger1[maxChannels]; @@ -42,7 +38,7 @@ struct FlipFlop : BGModule { Trigger _resetTrigger2[maxChannels]; FlipFlop() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); reset(); } diff --git a/src/Follow.hpp b/src/Follow.hpp @@ -28,14 +28,10 @@ struct Follow : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - RootMeanSquare* _rms[maxChannels] {}; Follow() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(RESPONSE_PARAM, 0.0f, 1.0f, 0.3f, "Sensitivity", "%", 0.0f, 100.0f); configParam(SCALE_PARAM, 0.0f, 1.0f, 1.0f, "Scale", "%", 0.0f, 100.0f); diff --git a/src/LFO.hpp b/src/LFO.hpp @@ -39,10 +39,6 @@ struct LFO : LFOBase { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - struct Engine { int sampleSteps = 1; int sampleStep = 0; @@ -75,7 +71,7 @@ struct LFO : LFOBase { const float amplitude = 5.0f; Engine* _engines[maxChannels] {}; - LFO() : LFOBase(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { + LFO() : LFOBase(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS) { configParam<LFOFrequencyParamQuantity>(FREQUENCY_PARAM, -5.0f, 8.0f, 0.0f, "Frequency", " Hz"); configParam(SLOW_PARAM, 0.0f, 1.0f, 0.0f, "Slow"); configParam(SAMPLE_PARAM, 0.0f, 1.0f, 0.0f, "Output sampling", "%", 0.0f, 100.0f); diff --git a/src/Lag.hpp b/src/Lag.hpp @@ -29,14 +29,10 @@ struct Lag : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - ShapedSlewLimiter _slew; Lag() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(TIME_PARAM, 0.0f, 1.0f, 0.5f, "time"); configParam(TIME_SCALE_PARAM, 0.0f, 2.0f, 1.0f, "time_scale"); configParam(SHAPE_PARAM, -1.0f, 1.0f, 0.0f, "shape"); diff --git a/src/Lmtr.hpp b/src/Lmtr.hpp @@ -31,10 +31,6 @@ struct Lmtr : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - struct Engine { float thresholdDb = 0.0f; float outGain = -1.0f; @@ -55,7 +51,7 @@ struct Lmtr : BGModule { bool _softKnee = true; Lmtr() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(THRESHOLD_PARAM, 0.0f, 1.0f, 0.8f, "Threshold", " dB", 0.0f, 30.0f, -24.0f); configParam(OUTPUT_GAIN_PARAM, 0.0f, 1.0f, 0.0f, "Output gain", " dB", 0.0f, 24.0f); configParam(KNEE_PARAM, 0.0f, 1.0f, 0.0f, "Knee"); diff --git a/src/Manual.hpp b/src/Manual.hpp @@ -29,16 +29,12 @@ struct Manual : TriggerOnLoadModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Trigger _trigger; rack::dsp::PulseGenerator _pulse; bogaudio::dsp::Timer* _initialDelay = NULL; Manual() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(TRIGGER_PARAM, 0.0f, 1.0f, 0.0f, "Trigger"); _triggerOnLoad = false; _initialDelay = new bogaudio::dsp::Timer(APP->engine->getSampleRate(), 0.01f); diff --git a/src/Matrix88.hpp b/src/Matrix88.hpp @@ -103,14 +103,10 @@ struct Matrix88 : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Saturator _saturators[maxChannels][8]; Matrix88() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(MIX11_PARAM, -1.0f, 1.0f, 0.0f, "Mix 1 1", "%", 0.0f, 100.0f); configParam(MIX21_PARAM, -1.0f, 1.0f, 0.0f, "Mix 2 1", "%", 0.0f, 100.0f); configParam(MIX31_PARAM, -1.0f, 1.0f, 0.0f, "Mix 3 1", "%", 0.0f, 100.0f); diff --git a/src/Mix1.hpp b/src/Mix1.hpp @@ -29,16 +29,12 @@ struct Mix1 : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - MixerChannel* _engines[maxChannels] {}; float _rmsSum = 0.0f; float _rms = 0.0f; Mix1() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(LEVEL_PARAM, 0.0f, 1.0f, fabsf(MixerChannel::minDecibels) / (MixerChannel::maxDecibels - MixerChannel::minDecibels), "Level", "dB", 0.0f, MixerChannel::maxDecibels - MixerChannel::minDecibels, MixerChannel::minDecibels); configParam(MUTE_PARAM, 0.0f, 1.0f, 0.0f, "Mute"); } diff --git a/src/Mix4.hpp b/src/Mix4.hpp @@ -52,10 +52,6 @@ struct Mix4 : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - int _polyChannelOffset = -1; MixerChannel* _channels[4] {}; Amplifier _amplifier; @@ -65,7 +61,7 @@ struct Mix4 : BGModule { float _rmsLevel = 0.0f; Mix4() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); float levelDefault = fabsf(MixerChannel::minDecibels) / (MixerChannel::maxDecibels - MixerChannel::minDecibels); configParam(LEVEL1_PARAM, 0.0f, 1.0f, levelDefault, "Channel 1 level", " dB", 0.0f, MixerChannel::maxDecibels - MixerChannel::minDecibels, MixerChannel::minDecibels); configParam(PAN1_PARAM, -1.0f, 1.0f, 0.0f, "Channel 1 panning", "%", 0.0f, 100.0f); diff --git a/src/Mix8.hpp b/src/Mix8.hpp @@ -76,10 +76,6 @@ struct Mix8 : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - int _polyChannelOffset = -1; MixerChannel* _channels[8] {}; Amplifier _amplifier; @@ -89,7 +85,7 @@ struct Mix8 : BGModule { float _rmsLevel = 0.0f; Mix8() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); float levelDefault = fabsf(MixerChannel::minDecibels) / (MixerChannel::maxDecibels - MixerChannel::minDecibels); configParam(LEVEL1_PARAM, 0.0f, 1.0f, levelDefault, "Channel 1 level", " dB", 0.0f, MixerChannel::maxDecibels - MixerChannel::minDecibels, MixerChannel::minDecibels); configParam(PAN1_PARAM, -1.0f, 1.0f, 0.0f, "Channel 1 panning", "%", 0.0f, 100.0f); diff --git a/src/Mono.hpp b/src/Mono.hpp @@ -26,10 +26,6 @@ struct Mono : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - RootMeanSquare _channelRMSs[maxChannels]; float _channelLevels[maxChannels] {}; RootMeanSquare _detectorRMS; @@ -44,7 +40,7 @@ struct Mono : BGModule { float _compressionDb = 0.0f; Mono() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(COMPRESSION_PARAM, 0.0f, 1.0f, 0.2f, "Compression", "", 0.0f, 10.0f); configParam<AmpliferParamQuantity>(LEVEL_PARAM, 0.0f, 1.0f, 1.0f, "Output level"); } diff --git a/src/Mult.hpp b/src/Mult.hpp @@ -27,12 +27,8 @@ struct Mult : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Mult() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); } void processChannel(const ProcessArgs& args, int _c) override; diff --git a/src/Noise.hpp b/src/Noise.hpp @@ -29,10 +29,6 @@ struct Noise : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - int _noiseChannels = 1; BlueNoiseGenerator _blue; WhiteNoiseGenerator _white; @@ -41,7 +37,7 @@ struct Noise : BGModule { GaussianNoiseGenerator _gauss; Noise() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); } json_t* dataToJson() override; diff --git a/src/Nsgt.hpp b/src/Nsgt.hpp @@ -31,10 +31,6 @@ struct Nsgt : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - struct Engine { float thresholdDb = 0.0f; float ratio = 0.0f; @@ -55,7 +51,7 @@ struct Nsgt : BGModule { bool _softKnee = true; Nsgt() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(THRESHOLD_PARAM, 0.0f, 1.0f, 0.8f, "Threshold", " dB", 0.0f, 30.0f, -24.0f); configParam<DynamicsRatioParamQuantity>(RATIO_PARAM, 0.0f, 1.0f, 0.55159f, "Ratio"); configParam(KNEE_PARAM, 0.0f, 1.0f, 1.0f, "Knee"); diff --git a/src/Pan.hpp b/src/Pan.hpp @@ -30,10 +30,6 @@ struct Pan : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Panner _panner1[maxChannels]; Panner _panner2[maxChannels]; bogaudio::dsp::SlewLimiter _slew1[maxChannels]; @@ -42,7 +38,7 @@ struct Pan : BGModule { Saturator _saturatorRight[maxChannels]; Pan() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(PAN1_PARAM, -1.0f, 1.0f, 0.0f, "Panning 1", "%", 0.0f, 100.0f); configParam(PAN2_PARAM, -1.0f, 1.0f, 0.0f, "Panning 2", "%", 0.0f, 100.0f); diff --git a/src/Pressor.hpp b/src/Pressor.hpp @@ -44,10 +44,6 @@ struct Pressor : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - struct Engine { float thresholdDb = 0.0f; float ratio = 0.0f; @@ -79,7 +75,7 @@ struct Pressor : BGModule { bool _softKnee = true; Pressor() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(THRESHOLD_PARAM, 0.0f, 1.0f, 0.8f, "Threshold", " dB", 0.0f, 30.0f, -24.0f); configParam<DynamicsRatioParamQuantity>(RATIO_PARAM, 0.0f, 1.0f, 0.55159f, "Ratio"); configParam<ScaledSquaringParamQuantity<500>>(ATTACK_PARAM, 0.0f, 1.0f, 0.31623f, "Attack", " ms"); diff --git a/src/Reftone.hpp b/src/Reftone.hpp @@ -28,10 +28,6 @@ struct Reftone : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - int _pitch = 9; int _octave = 4; float _fine = 0.0f; @@ -40,7 +36,7 @@ struct Reftone : BGModule { SineOscillator _sine; Reftone() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(PITCH_PARAM, 0.0f, 11.0f, 9.0f, "Pitch"); configParam(OCTAVE_PARAM, 1.0f, 8.0f, 4.0f, "Octave"); configParam(FINE_PARAM, -0.99f, 0.99f, 0.0f, "Fine tune", " cents", 0.0f, 100.0f); diff --git a/src/SampleHold.hpp b/src/SampleHold.hpp @@ -34,10 +34,6 @@ struct SampleHold : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - enum NoiseType { WHITE_NOISE_TYPE, BLUE_NOISE_TYPE, @@ -58,7 +54,7 @@ struct SampleHold : BGModule { float _rangeScale = 5.0f; SampleHold() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(TRIGGER1_PARAM, 0.0f, 10.0f, 0.0f, "Trigger 1"); configParam(TRIGGER2_PARAM, 0.0f, 10.0f, 0.0f, "Trigger 2"); configParam(TRACK1_PARAM, 0.0f, 1.0f, 0.0f, "Track 1"); diff --git a/src/Slew.hpp b/src/Slew.hpp @@ -30,10 +30,6 @@ struct Slew : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - float _riseShape = 0.0f; float _fallShape = 0.0f; bool _rising[maxChannels]; @@ -42,7 +38,7 @@ struct Slew : BGModule { ShapedSlewLimiter _fall[maxChannels]; Slew() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam<EnvelopeSegmentParamQuantity>(RISE_PARAM, 0.0f, 1.0f, 0.31623f, "Rise", " s"); configParam(RISE_SHAPE_PARAM, -1.0f, 1.0f, 0.0f, "Rise shape"); configParam<EnvelopeSegmentParamQuantity>(FALL_PARAM, 0.0f, 1.0f, 0.31623f, "Fall", " s"); diff --git a/src/Stack.hpp b/src/Stack.hpp @@ -30,10 +30,6 @@ struct Stack : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - const float _minCVOut = semitoneToCV(24.0); // C1 const float _maxCVOut = semitoneToCV(120.0); // C9 @@ -44,7 +40,7 @@ struct Stack : BGModule { float _outCV[maxChannels] {}; Stack() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(SEMIS_PARAM, 0.0f, 11.0f, 0.0f, "Semitones"); configParam(OCTAVE_PARAM, -3.0f, 3.0f, 0.0f, "Octaves"); configParam(FINE_PARAM, -0.99f, 0.99f, 0.0f, "Fine tune", " cents", 0.0f, 100.0f); diff --git a/src/Sums.hpp b/src/Sums.hpp @@ -28,12 +28,8 @@ struct Sums : DisableOutputLimitModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Sums() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); } void processChannel(const ProcessArgs& args, int c) override; diff --git a/src/Switch.hpp b/src/Switch.hpp @@ -28,16 +28,12 @@ struct Switch : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Trigger _trigger[maxChannels]; bool _latchedHigh[maxChannels] {}; bool _latch = false; Switch() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(GATE_PARAM, 0.0f, 10.0f, 0.0f, "Gate"); configParam(LATCH_PARAM, 0.0f, 1.0f, 0.0f, "Latch"); reset(); diff --git a/src/Test.hpp b/src/Test.hpp @@ -122,10 +122,6 @@ struct Test : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - #ifdef LPF LowPassFilter _lpf; #elif LPFNOISE @@ -248,7 +244,7 @@ struct Test : BGModule { : _average(APP->engine->getSampleRate(), 1.0f, 1000.0f) #endif { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(PARAM1_PARAM, 0.0f, 1.0f, 0.5f, "param1"); configParam(PARAM2_PARAM, 0.0f, 1.0f, 0.5f, "param2"); configParam(PARAM3_PARAM, 0.0f, 1.0f, 0.5f, "param3"); diff --git a/src/Test2.hpp b/src/Test2.hpp @@ -52,10 +52,6 @@ struct Test2 : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - #ifdef COMPLEX_BIQUAD ComplexBiquadFilter _complexBiquad; #elif MULTIPOLE @@ -70,7 +66,7 @@ struct Test2 : BGModule { #endif Test2() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(PARAM1A_PARAM, 0.0f, 1.0f, 0.0f, "param1a"); configParam(PARAM2A_PARAM, 0.0f, 1.0f, 0.0f, "param2a"); configParam(PARAM3A_PARAM, 0.0f, 1.0f, 0.0f, "param3a"); diff --git a/src/UMix.hpp b/src/UMix.hpp @@ -32,16 +32,12 @@ struct UMix : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - bool _sum = true; bool _cvMode = false; Saturator _saturator[maxChannels]; UMix() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(LEVEL_PARAM, 0.0f, 1.0f, 1.0f, "Level", "%", 0.0f, 100.0f); } diff --git a/src/Unison.hpp b/src/Unison.hpp @@ -26,16 +26,12 @@ struct Unison : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - const float maxDetuneCents = 50.0f; int _channels = 0; float _cents = 0.0f; Unison() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(CHANNELS_PARAM, 1.0f, 16.0f, 1.0f, "Channels"); configParam(DETUNE_PARAM, 0.0f, maxDetuneCents, 0.0f, "Detune"); } diff --git a/src/VCA.hpp b/src/VCA.hpp @@ -31,10 +31,6 @@ struct VCA : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Amplifier _amplifier1[maxChannels]; bogaudio::dsp::SlewLimiter _levelSL1[maxChannels]; Amplifier _amplifier2[maxChannels]; @@ -45,7 +41,7 @@ struct VCA : BGModule { }; VCA() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam<LevelParamQuantity>(LEVEL1_PARAM, 0.0f, 1.0f, 0.8f, "Level 1"); configParam<LevelParamQuantity>(LEVEL2_PARAM, 0.0f, 1.0f, 0.8f, "Level 2"); configParam(LINEAR_PARAM, 0.0f, 1.0f, 0.0f, "Linear"); diff --git a/src/VCAmp.hpp b/src/VCAmp.hpp @@ -26,10 +26,6 @@ struct VCAmp : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - const float maxDecibels = 12.0f; const float minDecibels = Amplifier::minDecibels; Amplifier _amplifier[maxChannels]; @@ -39,7 +35,7 @@ struct VCAmp : BGModule { float _rmsLevel = 0.0f; VCAmp() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(LEVEL_PARAM, 0.0f, 1.0f, fabs(minDecibels) / (maxDecibels - minDecibels), "Level", " dB", 0.0f, maxDecibels - minDecibels, minDecibels); sampleRateChange(); diff --git a/src/VCM.hpp b/src/VCM.hpp @@ -39,10 +39,6 @@ struct VCM : DisableOutputLimitModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - Amplifier _amplifier1[maxChannels]; Amplifier _amplifier2[maxChannels]; Amplifier _amplifier3[maxChannels]; @@ -53,7 +49,7 @@ struct VCM : DisableOutputLimitModule { }; VCM() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam<LevelParamQuantity>(LEVEL1_PARAM, 0.0f, 1.0f, 0.8f, "Level 1"); configParam<LevelParamQuantity>(LEVEL2_PARAM, 0.0f, 1.0f, 0.8f, "Level 2"); configParam<LevelParamQuantity>(LEVEL3_PARAM, 0.0f, 1.0f, 0.8f, "Level 3"); diff --git a/src/VCO.hpp b/src/VCO.hpp @@ -39,10 +39,6 @@ struct VCO : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - struct Engine { static constexpr int oversample = 8; @@ -89,7 +85,7 @@ struct VCO : BGModule { }; VCO() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam<VCOFrequencyParamQuantity>(FREQUENCY_PARAM, -3.0f, 6.0f, 0.0f, "Frequency", " Hz"); configParam(FINE_PARAM, -1.0f, 1.0f, 0.0f, "Fine tune", " cents", 0.0f, 100.0f); configParam(SLOW_PARAM, 0.0f, 1.0f, 0.0f, "Slow mode"); diff --git a/src/VU.hpp b/src/VU.hpp @@ -26,10 +26,6 @@ struct VU : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - RootMeanSquare _lRms; RootMeanSquare _rRms; float _lLevel = 0.0f; @@ -45,7 +41,7 @@ struct VU : BGModule { float _rPeakLevel = 0.0f; VU() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); sampleRateChange(); _lRms.setSensitivity(1.0f); _rRms.setSensitivity(1.0f); diff --git a/src/Walk.hpp b/src/Walk.hpp @@ -31,10 +31,6 @@ struct Walk : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - float _offset[maxChannels] {}; float _scale[maxChannels] {}; Trigger _jumpTrigger[maxChannels]; @@ -42,7 +38,7 @@ struct Walk : BGModule { bogaudio::dsp::SlewLimiter _slew[maxChannels]; Walk() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(RATE_PARAM, 0.0f, 1.0f, 0.1f, "Rate", "%", 0.0f, 100.0f); configParam(OFFSET_PARAM, -1.0f, 1.0f, 0.0f, "Offset", " V", 0.0f, 5.0f); configParam(SCALE_PARAM, 0.0f, 1.0f, 1.0f, "Scale", "%", 0.0f, 100.0f); diff --git a/src/Walk2.hpp b/src/Walk2.hpp @@ -42,10 +42,6 @@ struct Walk2 : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - const float historySeconds = 1.0f; const int historyPoints = 100; int _historySteps; @@ -74,7 +70,7 @@ struct Walk2 : BGModule { , _outsY(historyPoints, 0.0f) , _jumpTo(NULL) { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(RATE_X_PARAM, 0.0f, 1.0f, 0.1f, "Rate X", "%", 0.0f, 100.0f); configParam(RATE_Y_PARAM, 0.0f, 1.0f, 0.1f, "Rate Y", "%", 0.0f, 100.0f); configParam(OFFSET_X_PARAM, -1.0f, 1.0f, 0.0f, "Offset X", " V", 0.0f, 5.0f); diff --git a/src/XCO.hpp b/src/XCO.hpp @@ -62,10 +62,6 @@ struct XCO : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - struct Engine { static constexpr int oversample = 8; @@ -134,7 +130,7 @@ struct XCO : BGModule { }; XCO() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam<XCOFrequencyParamQuantity>(FREQUENCY_PARAM, -3.0f, 6.0f, 0.0f, "Frequency", " Hz"); configParam(FINE_PARAM, -1.0f, 1.0f, 0.0f, "Fine tune", " cents", 0.0f, 100.0f); configParam(SLOW_PARAM, 0.0f, 1.0f, 0.0f, "Slow mode"); diff --git a/src/XFade.hpp b/src/XFade.hpp @@ -29,10 +29,6 @@ struct XFade : BGModule { NUM_OUTPUTS }; - enum LightsIds { - NUM_LIGHTS - }; - bool _linear = false; float _mix[maxChannels] {}; float _curveIn[maxChannels]; @@ -40,7 +36,7 @@ struct XFade : BGModule { CrossFader _mixer[maxChannels]; XFade() { - config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS); configParam(MIX_PARAM, -1.0f, 1.0f, 0.0f, "Mix", "%", 0.0f, 100.0f); configParam(CURVE_PARAM, 0.0f, 1.0f, 0.5f, "Curve"); configParam(LINEAR_PARAM, 0.0f, 1.0f, 0.0f, "Linear"); diff --git a/src/analyzer_base.hpp b/src/analyzer_base.hpp @@ -128,7 +128,7 @@ struct AnalyzerBase : BGModule { float _rangeDb = 80.0f; AnalyzerCore _core; - AnalyzerBase(int nChannels, int np, int ni, int no, int nl) : _core(nChannels) { + AnalyzerBase(int nChannels, int np, int ni, int no, int nl = 0) : _core(nChannels) { config(np, ni, no, nl); } }; diff --git a/src/lfo_base.hpp b/src/lfo_base.hpp @@ -21,7 +21,7 @@ struct LFOBase : BGModule { float offset() override; }; - LFOBase(int np, int ni, int no, int nl) { + LFOBase(int np, int ni, int no, int nl = 0) { config(np, ni, no, nl); }