commit 8b5a6ce87fdebce9a3d0552ff91a433df12c4cdb parent 5784583458366edad1e8bbd3a87dea41d367a19d Author: Matt Demanett <matt@demanett.net> Date: Wed, 22 May 2019 19:54:47 -0400 v1: fix tags; add module declarations to plugin.json; script for module declarations. Diffstat:
59 files changed, 556 insertions(+), 132 deletions(-)
diff --git a/plugin.json b/plugin.json @@ -12,13 +12,466 @@ "donateUrl": "", "modules": [ { + "slug": "Bogaudio-VCO", + "name": "VCO", + "description": "oscillator", + "tags": [ + "Oscillator" + ] + }, + { + "slug": "Bogaudio-XCO", + "name": "XCO", + "description": "oscillator with wave mixer", + "tags": [ + "Oscillator" + ] + }, + { + "slug": "Bogaudio-Additator", + "name": "Additator", + "description": "additive oscillator", + "tags": [ + "Oscillator" + ] + }, + { + "slug": "Bogaudio-FMOp", + "name": "FM-OP", + "description": "FM oscillator", + "tags": [ + "Oscillator", + "Synth voice" + ] + }, + { + "slug": "Bogaudio-LFO", + "name": "LFO", + "description": "low-frequency oscillator", + "tags": [ + "LFO" + ] + }, + { + "slug": "Bogaudio-EightFO", + "name": "8FO", + "description": "LFO with 8 phased outputs", + "tags": [ + "LFO" + ] + }, + { + "slug": "Bogaudio-LLFO", + "name": "LLFO", + "description": "compact LFO", + "tags": [ + "LFO" + ] + }, + { + "slug": "Bogaudio-DADSRH", + "name": "DADSR(H)", + "description": "advanced envelope", + "tags": [ + "Envelope generator" + ] + }, + { + "slug": "Bogaudio-DADSRHPlus", + "name": "DADSR(H)+", + "description": "advanced envelope", + "tags": [ + "Envelope generator" + ] + }, + { + "slug": "Bogaudio-DGate", + "name": "DGate", + "description": "trigger-to-gate with delay", + "tags": [ + + ] + }, + { + "slug": "Bogaudio-Shaper", + "name": "Shaper", + "description": "envelope and amplifier", + "tags": [ + "Envelope generator", + "VCA" + ] + }, + { + "slug": "Bogaudio-ShaperPlus", + "name": "Shaper+", + "description": "envelope and amplifier", + "tags": [ + "Envelope generator", + "VCA" + ] + }, + { + "slug": "Bogaudio-AD", + "name": "AD", + "description": "utility envelope", + "tags": [ + "Envelope generator" + ] + }, + { + "slug": "Bogaudio-ADSR", + "name": "ADSR", + "description": "utility envelope", + "tags": [ + "Envelope generator" + ] + }, + { + "slug": "Bogaudio-Follow", + "name": "Follow", + "description": "envelope follower", + "tags": [ + "Envelope follower" + ] + }, + { + "slug": "Bogaudio-Noise", + "name": "Noise", + "description": "noise source", + "tags": [ + "Noise", + "Random" + ] + }, + { "slug": "Bogaudio-SampleHold", "name": "S&H", "description": "dual sample (or track) and hold", "tags": [ - "sample and hold", - "dual" + "Sample and hold", + "Dual" + ] + }, + { + "slug": "Bogaudio-Walk2", + "name": "Walk2", + "description": "random-walk CV source", + "tags": [ + "Random" + ] + }, + { + "slug": "Bogaudio-Walk", + "name": "Walk", + "description": "random-walk CV source", + "tags": [ + "Random" + ] + }, + { + "slug": "Bogaudio-Mix8", + "name": "Mix8", + "description": "8-channel mixer and panner", + "tags": [ + "Mixer", + "Panning" + ] + }, + { + "slug": "Bogaudio-Mix4", + "name": "Mix4", + "description": "4-channel mixer and panner", + "tags": [ + "Mixer", + "Panning" + ] + }, + { + "slug": "Bogaudio-Mix1", + "name": "MIX1", + "description": "fader/amplifier with mute", + "tags": [ + "VCA" + ] + }, + { + "slug": "Bogaudio-VCM", + "name": "VCM", + "description": "4-channel mixer", + "tags": [ + "Mixer" + ] + }, + { + "slug": "Bogaudio-UMix", + "name": "UMix", + "description": "unity mixer", + "tags": [ + "Mixer" + ] + }, + { + "slug": "Bogaudio-Matrix88", + "name": "Matrix88", + "description": "8x8 matrix mixer", + "tags": [ + "Mixer" + ] + }, + { + "slug": "Bogaudio-Mute8", + "name": "Mute8", + "description": "eight mutes with CV", + "tags": [ + "Utility" + ] + }, + { + "slug": "Bogaudio-Pan", + "name": "Pan", + "description": "dual panner", + "tags": [ + "Panning", + "Dual" + ] + }, + { + "slug": "Bogaudio-XFade", + "name": "XFade", + "description": "crossfader", + "tags": [ + "Mixer" + ] + }, + { + "slug": "Bogaudio-VCA", + "name": "VCA", + "description": "dual attenuator", + "tags": [ + "VCA", + "Dual" + ] + }, + { + "slug": "Bogaudio-VCAmp", + "name": "VCAmp", + "description": "amplifier", + "tags": [ + "VCA" + ] + }, + { + "slug": "Bogaudio-AMRM", + "name": "AM/RM", + "description": "ring modulator", + "tags": [ + "Ring modulator", + "Effect" + ] + }, + { + "slug": "Bogaudio-Pressor", + "name": "Pressor", + "description": "stereo compressor", + "tags": [ + "Compressor", + "Dynamics" + ] + }, + { + "slug": "Bogaudio-Clpr", + "name": "CLPR", + "description": "clipper", + "tags": [ + "Dynamics", + "Distortion" + ] + }, + { + "slug": "Bogaudio-Lmtr", + "name": "LMTR", + "description": "limiter", + "tags": [ + "Dynamics" + ] + }, + { + "slug": "Bogaudio-Nsgt", + "name": "Nsgt", + "description": "noise gate", + "tags": [ + "Dynamics" + ] + }, + { + "slug": "Bogaudio-OneEight", + "name": "1:8", + "description": "mux & sequential switch", + "tags": [ + "Switch" + ] + }, + { + "slug": "Bogaudio-EightOne", + "name": "8:1", + "description": "demux & sequential switch", + "tags": [ + "Switch" + ] + }, + { + "slug": "Bogaudio-AddrSeq", + "name": "ADDR-SEQ", + "description": "voltage-addressable sequencer", + "tags": [ + "Sequencery" + ] + }, + { + "slug": "Bogaudio-Analyzer", + "name": "Analyzer", + "description": "spectrum analyzer", + "tags": [ + "Visual" + ] + }, + { + "slug": "Bogaudio-AnalyzerXL", + "name": "Analyzer-XL", + "description": "spectrum analyzer", + "tags": [ + "Visual" + ] + }, + { + "slug": "Bogaudio-VU", + "name": "VU", + "description": "stereo signal meter", + "tags": [ + "Visual", + "Dual" + ] + }, + { + "slug": "Bogaudio-Detune", + "name": "Detune", + "description": "pitch CV processor", + "tags": [ + "Tuner" + ] + }, + { + "slug": "Bogaudio-Stack", + "name": "Stack", + "description": "pitch CV processor", + "tags": [ + "Tuner" + ] + }, + { + "slug": "Bogaudio-Reftone", + "name": "Reftone", + "description": "precision pitch CV generator", + "tags": [ + "Tuner" + ] + }, + { + "slug": "Bogaudio-Bool", + "name": "Bool", + "description": "boolean logic", + "tags": [ + "Logic" + ] + }, + { + "slug": "Bogaudio-Cmp", + "name": "CMP", + "description": "comparator", + "tags": [ + "Logic" + ] + }, + { + "slug": "Bogaudio-CVD", + "name": "CVD", + "description": "CV delay", + "tags": [ + "Delay" + ] + }, + { + "slug": "Bogaudio-FlipFlop", + "name": "FlipFlop", + "description": "dual stateful logic", + "tags": [ + "Logic", + "Dual" + ] + }, + { + "slug": "Bogaudio-Manual", + "name": "Manual", + "description": "manual gates / triggers", + "tags": [ + + ] + }, + { + "slug": "Bogaudio-Mult", + "name": "Mult", + "description": "multiple", + "tags": [ + "Multiple" + ] + }, + { + "slug": "Bogaudio-Offset", + "name": "Offset", + "description": "CV offset and scaler", + "tags": [ + "Attenuator" + ] + }, + { + "slug": "Bogaudio-Slew", + "name": "Slew", + "description": "slew / lag / glide", + "tags": [ + "Slew limiter" + ] + }, + { + "slug": "Bogaudio-Sums", + "name": "Sums", + "description": "arithmetic logic", + "tags": [ + "Logic" + ] + }, + { + "slug": "Bogaudio-Switch", + "name": "Switch", + "description": "signal router", + "tags": [ + "Switch" + ] + }, + { + "slug": "Bogaudio-Blank3", + "name": "Blank3", + "description": "blank panel", + "tags": [ + "Blank" + ] + }, + { + "slug": "Bogaudio-Blank6", + "name": "Blank6", + "description": "blank panel", + "tags": [ + "Blank" ] } ] -} +} +\ No newline at end of file diff --git a/scripts/modules_to_plugin_json.rb b/scripts/modules_to_plugin_json.rb @@ -0,0 +1,43 @@ +#!/usr/bin/ruby + +require 'JSON' + +plugin_json = File.read("plugin.json") +plugin = JSON.parse(plugin_json) + +models = `c++ -E src/bogaudio.cpp 2>&1 | grep addModel` +models = models.split.map do |s| + s.sub(/^\s*p->addModel\(([^)]+)\);\s*$/, '\1') +end + +modules = [] +models.each do |model| + create = `git grep -in #{model} | grep createModel` + if create =~ /createModel.*?\("([^",]+)",\s*"([^",]+)",\s*"([^",]+)"(?:,\s*([^)]*))?\);/ + slug = $1 + name = $2 + description = $3 + tags = $4 + if tags + tags = tags.split(/,\s+/).map { |t| t.sub(/^\s*"([^"]+)"\s*$/, '\1') } + else + tags = [] + end + + modules << { + slug: slug, + name: name, + description: description, + tags: tags + } + else + STDERR.puts "Failed to get create line for #{model}" + exit 1 + end +end + +plugin['modules'] = modules +File.write('plugin.json.bak', plugin_json) +puts 'wrote plugin.json.bak' +File.write('plugin.json', JSON.pretty_generate(plugin)) +puts "wrote plugin.json" diff --git a/src/AD.cpp b/src/AD.cpp @@ -115,4 +115,4 @@ struct ADWidget : ModuleWidget { } }; -Model* modelAD = bogaudio::createModel<AD, ADWidget>("Bogaudio-AD", "AD", "utility envelope", ENVELOPE_GENERATOR_TAG); +Model* modelAD = bogaudio::createModel<AD, ADWidget>("Bogaudio-AD", "AD", "utility envelope", "Envelope generator"); diff --git a/src/ADSR.cpp b/src/ADSR.cpp @@ -92,4 +92,4 @@ struct ADSRWidget : ModuleWidget { } }; -Model* modelADSR = bogaudio::createModel<ADSR, ADSRWidget>("Bogaudio-ADSR", "ADSR", "utility envelope", ENVELOPE_GENERATOR_TAG); +Model* modelADSR = bogaudio::createModel<ADSR, ADSRWidget>("Bogaudio-ADSR", "ADSR", "utility envelope", "Envelope generator"); diff --git a/src/AMRM.cpp b/src/AMRM.cpp @@ -74,4 +74,4 @@ struct AMRMWidget : ModuleWidget { } }; -Model* modelAMRM = bogaudio::createModel<AMRM, AMRMWidget>("Bogaudio-AMRM", "AM/RM", "ring modulator", RING_MODULATOR_TAG, EFFECT_TAG); +Model* modelAMRM = bogaudio::createModel<AMRM, AMRMWidget>("Bogaudio-AMRM", "AM/RM", "ring modulator", "Ring modulator", "Effect"); diff --git a/src/Additator.cpp b/src/Additator.cpp @@ -228,4 +228,4 @@ struct AdditatorWidget : ModuleWidget { } }; -Model* modelAdditator = bogaudio::createModel<Additator, AdditatorWidget>("Bogaudio-Additator", "Additator", "additive oscillator", OSCILLATOR_TAG); +Model* modelAdditator = bogaudio::createModel<Additator, AdditatorWidget>("Bogaudio-Additator", "Additator", "additive oscillator", "Oscillator"); diff --git a/src/AddrSeq.cpp b/src/AddrSeq.cpp @@ -163,4 +163,4 @@ struct AddrSeqWidget : ModuleWidget { } }; -Model* modelAddrSeq = bogaudio::createModel<AddrSeq, AddrSeqWidget>("Bogaudio-AddrSeq", "ADDR-SEQ", "voltage-addressable sequencer", SEQUENCER_TAG); +Model* modelAddrSeq = bogaudio::createModel<AddrSeq, AddrSeqWidget>("Bogaudio-AddrSeq", "ADDR-SEQ", "voltage-addressable sequencer", "Sequencery"); diff --git a/src/Analyzer.cpp b/src/Analyzer.cpp @@ -186,4 +186,4 @@ struct AnalyzerWidget : ModuleWidget { } }; -Model* modelAnalyzer = bogaudio::createModel<Analyzer, AnalyzerWidget>("Bogaudio-Analyzer", "Analyzer", "spectrum analyzer", VISUAL_TAG); +Model* modelAnalyzer = bogaudio::createModel<Analyzer, AnalyzerWidget>("Bogaudio-Analyzer", "Analyzer", "spectrum analyzer", "Visual"); diff --git a/src/AnalyzerXL.cpp b/src/AnalyzerXL.cpp @@ -318,4 +318,4 @@ struct AnalyzerXLWidget : ModuleWidget { } }; -Model* modelAnalyzerXL = bogaudio::createModel<AnalyzerXL, AnalyzerXLWidget>("Bogaudio-AnalyzerXL", "Analyzer-XL", "spectrum analyzer", VISUAL_TAG); +Model* modelAnalyzerXL = bogaudio::createModel<AnalyzerXL, AnalyzerXLWidget>("Bogaudio-AnalyzerXL", "Analyzer-XL", "spectrum analyzer", "Visual"); diff --git a/src/Blank3.cpp b/src/Blank3.cpp @@ -92,4 +92,4 @@ struct Blank3Widget : ModuleWidget { } }; -Model* modelBlank3 = bogaudio::createModel<Blank3, Blank3Widget>("Bogaudio-Blank3", "Blank3", "blank panel", BLANK_TAG); +Model* modelBlank3 = bogaudio::createModel<Blank3, Blank3Widget>("Bogaudio-Blank3", "Blank3", "blank panel", "Blank"); diff --git a/src/Blank6.cpp b/src/Blank6.cpp @@ -92,4 +92,4 @@ struct Blank6Widget : ModuleWidget { } }; -Model* modelBlank6 = bogaudio::createModel<Blank6, Blank6Widget>("Bogaudio-Blank6", "Blank6", "blank panel", BLANK_TAG); +Model* modelBlank6 = bogaudio::createModel<Blank6, Blank6Widget>("Bogaudio-Blank6", "Blank6", "blank panel", "Blank"); diff --git a/src/Bool.cpp b/src/Bool.cpp @@ -50,4 +50,4 @@ struct BoolWidget : ModuleWidget { } }; -Model* modelBool = bogaudio::createModel<Bool, BoolWidget>("Bogaudio-Bool", "Bool", "boolean logic", LOGIC_TAG); +Model* modelBool = bogaudio::createModel<Bool, BoolWidget>("Bogaudio-Bool", "Bool", "boolean logic", "Logic"); diff --git a/src/CVD.cpp b/src/CVD.cpp @@ -82,4 +82,4 @@ struct CVDWidget : ModuleWidget { } }; -Model* modelCVD = bogaudio::createModel<CVD, CVDWidget>("Bogaudio-CVD", "CVD", "CV delay", DELAY_TAG); +Model* modelCVD = bogaudio::createModel<CVD, CVDWidget>("Bogaudio-CVD", "CVD", "CV delay", "Delay"); diff --git a/src/Clpr.cpp b/src/Clpr.cpp @@ -93,4 +93,4 @@ struct ClprWidget : ModuleWidget { } }; -Model* modelClpr = bogaudio::createModel<Clpr, ClprWidget>("Bogaudio-Clpr", "CLPR", "clipper", DYNAMICS_TAG, DISTORTION_TAG); +Model* modelClpr = bogaudio::createModel<Clpr, ClprWidget>("Bogaudio-Clpr", "CLPR", "clipper", "Dynamics", "Distortion"); diff --git a/src/Cmp.cpp b/src/Cmp.cpp @@ -214,4 +214,4 @@ struct CmpWidget : ModuleWidget { } }; -Model* modelCmp = bogaudio::createModel<Cmp, CmpWidget>("Bogaudio-Cmp", "CMP", "comparator", LOGIC_TAG); +Model* modelCmp = bogaudio::createModel<Cmp, CmpWidget>("Bogaudio-Cmp", "CMP", "comparator", "Logic"); diff --git a/src/DADSRH.cpp b/src/DADSRH.cpp @@ -103,4 +103,4 @@ struct DADSRHWidget : ModuleWidget { } }; -Model* modelDADSRH = bogaudio::createModel<DADSRH, DADSRHWidget>("Bogaudio-DADSRH", "DADSR(H)", "advanced envelope", ENVELOPE_GENERATOR_TAG); +Model* modelDADSRH = bogaudio::createModel<DADSRH, DADSRHWidget>("Bogaudio-DADSRH", "DADSR(H)", "advanced envelope", "Envelope generator"); diff --git a/src/DADSRHPlus.cpp b/src/DADSRHPlus.cpp @@ -125,4 +125,4 @@ struct DADSRHPlusWidget : ModuleWidget { } }; -Model* modelDADSRHPlus = bogaudio::createModel<DADSRHPlus, DADSRHPlusWidget>("Bogaudio-DADSRHPlus", "DADSR(H)+", "advanced envelope", ENVELOPE_GENERATOR_TAG); +Model* modelDADSRHPlus = bogaudio::createModel<DADSRHPlus, DADSRHPlusWidget>("Bogaudio-DADSRHPlus", "DADSR(H)+", "advanced envelope", "Envelope generator"); diff --git a/src/Detune.cpp b/src/Detune.cpp @@ -80,4 +80,4 @@ struct DetuneWidget : ModuleWidget { } }; -Model* modelDetune = bogaudio::createModel<Detune, DetuneWidget>("Bogaudio-Detune", "Detune", "pitch CV processor", TUNER_TAG); +Model* modelDetune = bogaudio::createModel<Detune, DetuneWidget>("Bogaudio-Detune", "Detune", "pitch CV processor", "Tuner"); diff --git a/src/EightFO.cpp b/src/EightFO.cpp @@ -276,4 +276,4 @@ struct EightFOWidget : LFOBaseWidget { } }; -Model* modelEightFO = bogaudio::createModel<EightFO, EightFOWidget>("Bogaudio-EightFO", "8FO", "LFO with 8 phased outputs", LFO_TAG); +Model* modelEightFO = bogaudio::createModel<EightFO, EightFOWidget>("Bogaudio-EightFO", "8FO", "LFO with 8 phased outputs", "LFO"); diff --git a/src/EightOne.cpp b/src/EightOne.cpp @@ -163,4 +163,4 @@ struct EightOneWidget : ModuleWidget { } }; -Model* modelEightOne = bogaudio::createModel<EightOne, EightOneWidget>("Bogaudio-EightOne", "8:1", "demux & sequential switch", SWITCH_TAG); +Model* modelEightOne = bogaudio::createModel<EightOne, EightOneWidget>("Bogaudio-EightOne", "8:1", "demux & sequential switch", "Switch"); diff --git a/src/FMOp.cpp b/src/FMOp.cpp @@ -290,4 +290,4 @@ struct FMOpWidget : ModuleWidget { } }; -Model* modelFMOp = bogaudio::createModel<FMOp, FMOpWidget>("Bogaudio-FMOp", "FM-OP", "FM oscillator", OSCILLATOR_TAG, SYNTH_VOICE_TAG); +Model* modelFMOp = bogaudio::createModel<FMOp, FMOpWidget>("Bogaudio-FMOp", "FM-OP", "FM oscillator", "Oscillator", "Synth voice"); diff --git a/src/FlipFlop.cpp b/src/FlipFlop.cpp @@ -100,4 +100,4 @@ struct FlipFlopWidget : ModuleWidget { } }; -Model* modelFlipFlop = bogaudio::createModel<FlipFlop, FlipFlopWidget>("Bogaudio-FlipFlop", "FlipFlop", "dual stateful logic", LOGIC_TAG, DUAL_TAG); +Model* modelFlipFlop = bogaudio::createModel<FlipFlop, FlipFlopWidget>("Bogaudio-FlipFlop", "FlipFlop", "dual stateful logic", "Logic", "Dual"); diff --git a/src/Follow.cpp b/src/Follow.cpp @@ -61,4 +61,4 @@ struct FollowWidget : ModuleWidget { } }; -Model* modelFollow = bogaudio::createModel<Follow, FollowWidget>("Bogaudio-Follow", "Follow", "envelope follower", ENVELOPE_FOLLOWER_TAG); +Model* modelFollow = bogaudio::createModel<Follow, FollowWidget>("Bogaudio-Follow", "Follow", "envelope follower", "Envelope follower"); diff --git a/src/LFO.cpp b/src/LFO.cpp @@ -165,4 +165,4 @@ struct LFOWidget : LFOBaseWidget { } }; -Model* modelLFO = bogaudio::createModel<LFO, LFOWidget>("Bogaudio-LFO", "LFO", "low-frequency oscillator", LFO_TAG); +Model* modelLFO = bogaudio::createModel<LFO, LFOWidget>("Bogaudio-LFO", "LFO", "low-frequency oscillator", "LFO"); diff --git a/src/LLFO.cpp b/src/LLFO.cpp @@ -88,10 +88,6 @@ struct LLFOWidget : LFOBaseWidget { "res/LLFO-classic.svg", "res/LLFO.svg" ) { - // box.size = - // _panel->box.size = box.size; - // addChild(_panel); - addChild(createWidget<ScrewSilver>(Vec(0, 0))); addChild(createWidget<ScrewSilver>(Vec(box.size.x - 15, 365))); @@ -138,4 +134,4 @@ struct LLFOWidget : LFOBaseWidget { } }; -Model* modelLLFO = bogaudio::createModel<LLFO, LLFOWidget>("Bogaudio-LLFO", "LLFO", "compact LFO", LFO_TAG); +Model* modelLLFO = bogaudio::createModel<LLFO, LLFOWidget>("Bogaudio-LLFO", "LLFO", "compact LFO", "LFO"); diff --git a/src/Lag.cpp b/src/Lag.cpp @@ -98,4 +98,4 @@ struct LagWidget : ModuleWidget { } }; -Model* modelLag = bogaudio::createModel<Lag, LagWidget>("Bogaudio-Lag", "Lag", "slew limiter / lag processor", SLEW_LIMITER_TAG); +Model* modelLag = bogaudio::createModel<Lag, LagWidget>("Bogaudio-Lag", "Lag", "slew limiter / lag processor", "Slew limiter"); diff --git a/src/Lmtr.cpp b/src/Lmtr.cpp @@ -109,4 +109,4 @@ struct LmtrWidget : ModuleWidget { } }; -Model* modelLmtr = bogaudio::createModel<Lmtr, LmtrWidget>("Bogaudio-Lmtr", "LMTR", "limiter", DYNAMICS_TAG); +Model* modelLmtr = bogaudio::createModel<Lmtr, LmtrWidget>("Bogaudio-Lmtr", "LMTR", "limiter", "Dynamics"); diff --git a/src/Matrix88.cpp b/src/Matrix88.cpp @@ -203,4 +203,4 @@ struct Matrix88Widget : ModuleWidget { } }; -Model* modelMatrix88 = bogaudio::createModel<Matrix88, Matrix88Widget>("Bogaudio-Matrix88", "Matrix88", "8x8 matrix mixer", MIXER_TAG); +Model* modelMatrix88 = bogaudio::createModel<Matrix88, Matrix88Widget>("Bogaudio-Matrix88", "Matrix88", "8x8 matrix mixer", "Mixer"); diff --git a/src/Mix1.cpp b/src/Mix1.cpp @@ -55,4 +55,4 @@ struct Mix1Widget : ModuleWidget { } }; -Model* modelMix1 = bogaudio::createModel<Mix1, Mix1Widget>("Bogaudio-Mix1", "MIX1", "fader/amplifier with mute", AMPLIFIER_TAG); +Model* modelMix1 = bogaudio::createModel<Mix1, Mix1Widget>("Bogaudio-Mix1", "MIX1", "fader/amplifier with mute", "VCA"); diff --git a/src/Mix4.cpp b/src/Mix4.cpp @@ -162,4 +162,4 @@ struct Mix4Widget : ModuleWidget { } }; -Model* modelMix4 = bogaudio::createModel<Mix4, Mix4Widget>("Bogaudio-Mix4", "Mix4", "4-channel mixer and panner", MIXER_TAG, PANNING_TAG); +Model* modelMix4 = bogaudio::createModel<Mix4, Mix4Widget>("Bogaudio-Mix4", "Mix4", "4-channel mixer and panner", "Mixer", "Panning"); diff --git a/src/Mix8.cpp b/src/Mix8.cpp @@ -234,4 +234,4 @@ struct Mix8Widget : ModuleWidget { } }; -Model* modelMix8 = bogaudio::createModel<Mix8, Mix8Widget>("Bogaudio-Mix8", "Mix8", "8-channel mixer and panner", MIXER_TAG, PANNING_TAG); +Model* modelMix8 = bogaudio::createModel<Mix8, Mix8Widget>("Bogaudio-Mix8", "Mix8", "8-channel mixer and panner", "Mixer", "Panning"); diff --git a/src/Mult.cpp b/src/Mult.cpp @@ -56,4 +56,4 @@ struct MultWidget : ModuleWidget { } }; -Model* modelMult = bogaudio::createModel<Mult, MultWidget>("Bogaudio-Mult", "Mult", "multiple", MULTIPLE_TAG); +Model* modelMult = bogaudio::createModel<Mult, MultWidget>("Bogaudio-Mult", "Mult", "multiple", "Multiple"); diff --git a/src/Mute8.cpp b/src/Mute8.cpp @@ -154,4 +154,4 @@ struct Mute8Widget : ModuleWidget { } }; -Model* modelMute8 = bogaudio::createModel<Mute8, Mute8Widget>("Bogaudio-Mute8", "Mute8", "eight mutes with CV", UTILITY_TAG); +Model* modelMute8 = bogaudio::createModel<Mute8, Mute8Widget>("Bogaudio-Mute8", "Mute8", "eight mutes with CV", "Utility"); diff --git a/src/Noise.cpp b/src/Noise.cpp @@ -67,4 +67,4 @@ struct NoiseWidget : ModuleWidget { } }; -Model* modelNoise = bogaudio::createModel<Noise, NoiseWidget>("Bogaudio-Noise", "Noise", "noise source", NOISE_TAG, RANDOM_TAG); +Model* modelNoise = bogaudio::createModel<Noise, NoiseWidget>("Bogaudio-Noise", "Noise", "noise source", "Noise", "Random"); diff --git a/src/Nsgt.cpp b/src/Nsgt.cpp @@ -113,4 +113,4 @@ struct NsgtWidget : ModuleWidget { } }; -Model* modelNsgt = bogaudio::createModel<Nsgt, NsgtWidget>("Bogaudio-Nsgt", "Nsgt", "noise gate", DYNAMICS_TAG); +Model* modelNsgt = bogaudio::createModel<Nsgt, NsgtWidget>("Bogaudio-Nsgt", "Nsgt", "noise gate", "Dynamics"); diff --git a/src/Offset.cpp b/src/Offset.cpp @@ -62,4 +62,4 @@ struct OffsetWidget : DisableOutputLimitModuleWidget { } }; -Model* modelOffset = bogaudio::createModel<Offset, OffsetWidget>("Bogaudio-Offset", "Offset", "CV offset and scaler", ATTENUATOR_TAG); +Model* modelOffset = bogaudio::createModel<Offset, OffsetWidget>("Bogaudio-Offset", "Offset", "CV offset and scaler", "Attenuator"); diff --git a/src/OneEight.cpp b/src/OneEight.cpp @@ -162,4 +162,4 @@ struct OneEightWidget : ModuleWidget { } }; -Model* modelOneEight = bogaudio::createModel<OneEight, OneEightWidget>("Bogaudio-OneEight", "1:8", "mux & sequential switch", SWITCH_TAG); +Model* modelOneEight = bogaudio::createModel<OneEight, OneEightWidget>("Bogaudio-OneEight", "1:8", "mux & sequential switch", "Switch"); diff --git a/src/Pan.cpp b/src/Pan.cpp @@ -75,4 +75,4 @@ struct PanWidget : ModuleWidget { } }; -Model* modelPan = bogaudio::createModel<Pan, PanWidget>("Bogaudio-Pan", "Pan", "dual panner", PANNING_TAG, DUAL_TAG); +Model* modelPan = bogaudio::createModel<Pan, PanWidget>("Bogaudio-Pan", "Pan", "dual panner", "Panning", "Dual"); diff --git a/src/Pressor.cpp b/src/Pressor.cpp @@ -249,4 +249,4 @@ struct PressorWidget : ModuleWidget { } }; -Model* modelPressor = bogaudio::createModel<Pressor, PressorWidget>("Bogaudio-Pressor", "Pressor", "stereo compressor", COMPRESSOR_TAG, DYNAMICS_TAG); +Model* modelPressor = bogaudio::createModel<Pressor, PressorWidget>("Bogaudio-Pressor", "Pressor", "stereo compressor", "Compressor", "Dynamics"); diff --git a/src/Reftone.cpp b/src/Reftone.cpp @@ -241,4 +241,4 @@ struct ReftoneWidget : ModuleWidget { } }; -Model* modelReftone = bogaudio::createModel<Reftone, ReftoneWidget>("Bogaudio-Reftone", "Reftone", "precision pitch CV generator", TUNER_TAG); +Model* modelReftone = bogaudio::createModel<Reftone, ReftoneWidget>("Bogaudio-Reftone", "Reftone", "precision pitch CV generator", "Tuner"); diff --git a/src/SampleHold.cpp b/src/SampleHold.cpp @@ -91,4 +91,4 @@ struct SampleHoldWidget : ModuleWidget { } }; -Model* modelSampleHold = bogaudio::createModel<SampleHold, SampleHoldWidget>("Bogaudio-SampleHold", "S&H", "dual sample (or track) and hold", SAMPLE_AND_HOLD_TAG, DUAL_TAG); +Model* modelSampleHold = bogaudio::createModel<SampleHold, SampleHoldWidget>("Bogaudio-SampleHold", "S&H", "dual sample (or track) and hold", "Sample and hold", "Dual"); diff --git a/src/Shaper.cpp b/src/Shaper.cpp @@ -79,4 +79,4 @@ struct ShaperWidget : ModuleWidget { } }; -Model* modelShaper = bogaudio::createModel<Shaper, ShaperWidget>("Bogaudio-Shaper", "Shaper", "envelope and amplifier", ENVELOPE_GENERATOR_TAG, AMPLIFIER_TAG); +Model* modelShaper = bogaudio::createModel<Shaper, ShaperWidget>("Bogaudio-Shaper", "Shaper", "envelope and amplifier", "Envelope generator", "VCA"); diff --git a/src/ShaperPlus.cpp b/src/ShaperPlus.cpp @@ -101,4 +101,4 @@ struct ShaperPlusWidget : ModuleWidget { } }; -Model* modelShaperPlus = bogaudio::createModel<ShaperPlus, ShaperPlusWidget>("Bogaudio-ShaperPlus", "Shaper+", "envelope and amplifier", ENVELOPE_GENERATOR_TAG, AMPLIFIER_TAG); +Model* modelShaperPlus = bogaudio::createModel<ShaperPlus, ShaperPlusWidget>("Bogaudio-ShaperPlus", "Shaper+", "envelope and amplifier", "Envelope generator", "VCA"); diff --git a/src/Slew.cpp b/src/Slew.cpp @@ -103,4 +103,4 @@ struct SlewWidget : ModuleWidget { } }; -Model* modelSlew = bogaudio::createModel<Slew, SlewWidget>("Bogaudio-Slew", "Slew", "slew / lag / glide", SLEW_LIMITER_TAG); +Model* modelSlew = bogaudio::createModel<Slew, SlewWidget>("Bogaudio-Slew", "Slew", "slew / lag / glide", "Slew limiter"); diff --git a/src/Stack.cpp b/src/Stack.cpp @@ -97,4 +97,4 @@ struct StackWidget : ModuleWidget { } }; -Model* modelStack = bogaudio::createModel<Stack, StackWidget>("Bogaudio-Stack", "Stack", "pitch CV processor", TUNER_TAG); +Model* modelStack = bogaudio::createModel<Stack, StackWidget>("Bogaudio-Stack", "Stack", "pitch CV processor", "Tuner"); diff --git a/src/Sums.cpp b/src/Sums.cpp @@ -72,4 +72,4 @@ struct SumsWidget : DisableOutputLimitModuleWidget { } }; -Model* modelSums = bogaudio::createModel<Sums, SumsWidget>("Bogaudio-Sums", "Sums", "arithmetic logic", LOGIC_TAG); +Model* modelSums = bogaudio::createModel<Sums, SumsWidget>("Bogaudio-Sums", "Sums", "arithmetic logic", "Logic"); diff --git a/src/Switch.cpp b/src/Switch.cpp @@ -78,4 +78,4 @@ struct SwitchWidget : ModuleWidget { } }; -Model* modelSwitch = bogaudio::createModel<bogaudio::Switch, SwitchWidget>("Bogaudio-Switch", "Switch", "signal router", SWITCH_TAG); +Model* modelSwitch = bogaudio::createModel<bogaudio::Switch, SwitchWidget>("Bogaudio-Switch", "Switch", "signal router", "Switch"); diff --git a/src/UMix.cpp b/src/UMix.cpp @@ -156,4 +156,4 @@ struct UMixWidget : ModuleWidget { } }; -Model* modelUMix = bogaudio::createModel<UMix, UMixWidget>("Bogaudio-UMix", "UMix", "unity mixer", MIXER_TAG); +Model* modelUMix = bogaudio::createModel<UMix, UMixWidget>("Bogaudio-UMix", "UMix", "unity mixer", "Mixer"); diff --git a/src/VCA.cpp b/src/VCA.cpp @@ -82,4 +82,4 @@ struct VCAWidget : ModuleWidget { } }; -Model* modelVCA = bogaudio::createModel<VCA, VCAWidget>("Bogaudio-VCA", "VCA", "dual attenuator", ATTENUATOR_TAG, DUAL_TAG); +Model* modelVCA = bogaudio::createModel<VCA, VCAWidget>("Bogaudio-VCA", "VCA", "dual attenuator", "VCA", "Dual"); diff --git a/src/VCAmp.cpp b/src/VCAmp.cpp @@ -64,4 +64,4 @@ struct VCAmpWidget : ModuleWidget { } }; -Model* modelVCAmp = bogaudio::createModel<VCAmp, VCAmpWidget>("Bogaudio-VCAmp", "VCAmp", "amplifier", AMPLIFIER_TAG); +Model* modelVCAmp = bogaudio::createModel<VCAmp, VCAmpWidget>("Bogaudio-VCAmp", "VCAmp", "amplifier", "VCA"); diff --git a/src/VCM.cpp b/src/VCM.cpp @@ -102,4 +102,4 @@ struct VCMWidget : DisableOutputLimitModuleWidget { } }; -Model* modelVCM = bogaudio::createModel<VCM, VCMWidget>("Bogaudio-VCM", "VCM", "4-channel mixer", MIXER_TAG); +Model* modelVCM = bogaudio::createModel<VCM, VCMWidget>("Bogaudio-VCM", "VCM", "4-channel mixer", "Mixer"); diff --git a/src/VCO.cpp b/src/VCO.cpp @@ -213,4 +213,4 @@ struct VCOWidget : ModuleWidget { } }; -Model* modelVCO = bogaudio::createModel<VCO, VCOWidget>("Bogaudio-VCO", "VCO", "oscillator", OSCILLATOR_TAG); +Model* modelVCO = bogaudio::createModel<VCO, VCOWidget>("Bogaudio-VCO", "VCO", "oscillator", "Oscillator"); diff --git a/src/VU.cpp b/src/VU.cpp @@ -130,4 +130,4 @@ struct VUWidget : ModuleWidget { } }; -Model* modelVU = bogaudio::createModel<VU, VUWidget>("Bogaudio-VU", "VU", "stereo signal meter", VISUAL_TAG, DUAL_TAG); +Model* modelVU = bogaudio::createModel<VU, VUWidget>("Bogaudio-VU", "VU", "stereo signal meter", "Visual", "Dual"); diff --git a/src/Walk.cpp b/src/Walk.cpp @@ -88,4 +88,4 @@ struct WalkWidget : ModuleWidget { } }; -Model* modelWalk = bogaudio::createModel<Walk, WalkWidget>("Bogaudio-Walk", "Walk", "random-walk CV source", RANDOM_TAG); +Model* modelWalk = bogaudio::createModel<Walk, WalkWidget>("Bogaudio-Walk", "Walk", "random-walk CV source", "Random"); diff --git a/src/Walk2.cpp b/src/Walk2.cpp @@ -562,4 +562,4 @@ struct Walk2Widget : ModuleWidget { } }; -Model* modelWalk2 = bogaudio::createModel<Walk2, Walk2Widget>("Bogaudio-Walk2", "Walk2", ""); +Model* modelWalk2 = bogaudio::createModel<Walk2, Walk2Widget>("Bogaudio-Walk2", "Walk2", "random-walk CV source", "Random"); diff --git a/src/XCO.cpp b/src/XCO.cpp @@ -363,4 +363,4 @@ struct XCOWidget : ModuleWidget { } }; -Model* modelXCO = bogaudio::createModel<XCO, XCOWidget>("Bogaudio-XCO", "XCO", "oscillator with wave mixer", OSCILLATOR_TAG); +Model* modelXCO = bogaudio::createModel<XCO, XCOWidget>("Bogaudio-XCO", "XCO", "oscillator with wave mixer", "Oscillator"); diff --git a/src/XFade.cpp b/src/XFade.cpp @@ -87,4 +87,4 @@ struct XFadeWidget : ModuleWidget { } }; -Model* modelXFade = bogaudio::createModel<XFade, XFadeWidget>("Bogaudio-XFade", "XFade", "crossfader", MIXER_TAG); +Model* modelXFade = bogaudio::createModel<XFade, XFadeWidget>("Bogaudio-XFade", "XFade", "crossfader", "Mixer"); diff --git a/src/bogaudio.hpp b/src/bogaudio.hpp @@ -18,62 +18,3 @@ using namespace rack; using namespace bogaudio; extern Plugin *pluginInstance; - -// FIXME.v1: remove this -enum ModelTag { - NO_TAG, // Don't use this in `Model::create(...)`. Instead, just omit the tags entirely. - AMPLIFIER_TAG, - ARPEGGIATOR_TAG, - ATTENUATOR_TAG, - BLANK_TAG, - CHORUS_TAG, - CLOCK_MODULATOR_TAG, // Clock dividers, multipliers, etc. - CLOCK_TAG, - COMPRESSOR_TAG, - CONTROLLER_TAG, // Use only if the artist "performs" with this module. Knobs are not sufficient. Examples: on-screen keyboard, XY pad. - DELAY_TAG, - DIGITAL_TAG, - DISTORTION_TAG, - DRUM_TAG, - DUAL_TAG, // The core functionality times two. If multiple channels are a requirement for the module to exist (ring modulator, mixer, etc), it is not a Dual module. - DYNAMICS_TAG, - EFFECT_TAG, - ENVELOPE_FOLLOWER_TAG, - ENVELOPE_GENERATOR_TAG, - EQUALIZER_TAG, - EXTERNAL_TAG, - FILTER_TAG, - FLANGER_TAG, - FUNCTION_GENERATOR_TAG, - GRANULAR_TAG, - LFO_TAG, - LIMITER_TAG, - LOGIC_TAG, - LOW_PASS_GATE_TAG, - MIDI_TAG, - MIXER_TAG, - MULTIPLE_TAG, - NOISE_TAG, - OSCILLATOR_TAG, - PANNING_TAG, - PHASER_TAG, - PHYSICAL_MODELING_TAG, - QUAD_TAG, // The core functionality times four. If multiple channels are a requirement for the module to exist (ring modulator, mixer, etc), it is not a Quad module. - QUANTIZER_TAG, - RANDOM_TAG, - RECORDING_TAG, - REVERB_TAG, - RING_MODULATOR_TAG, - SAMPLE_AND_HOLD_TAG, - SAMPLER_TAG, - SEQUENCER_TAG, - SLEW_LIMITER_TAG, - SWITCH_TAG, - SYNTH_VOICE_TAG, // A synth voice must have an envelope built-in. - TUNER_TAG, - UTILITY_TAG, // Serves only extremely basic functions, like inverting, max, min, multiplying by 2, etc. - VISUAL_TAG, - VOCODER_TAG, - WAVESHAPER_TAG, - NUM_TAGS -}; diff --git a/src/utils.hpp b/src/utils.hpp @@ -1,8 +1,5 @@ #pragma once -// #include <string.h> -// #include <algorithm> - #include "rack.hpp" using namespace rack; @@ -16,14 +13,7 @@ Model* createModel( const char* description, Tags... tags ) { - // FIXME.v1 - // const int n = 256; - // char buf[n]; - // std::string uName = name; - // for (auto& c: uName) { - // c = toupper(c); - // } - // snprintf(buf, n, "%s - %s - %dHP", uName.c_str(), description, TModuleWidget::hp); + // params besides slug are obsolete here, but see scripts/modules_to_plugin_json.rb return rack::createModel<TModule, TModuleWidget>(slug); }