From 66e71989bbb84358f938d304a17e27eeff47346a Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 2 Sep 2023 13:23:18 -0400 Subject: [PATCH] Change slug SHADR to SHASR. --- plugin.json | 2 +- res/{SHADR.svg => SHASR.svg} | 0 src/{SHADR.cpp => SHASR.cpp} | 70 ++++++++++++++++++------------------ src/plugin.cpp | 2 +- src/plugin.hpp | 2 +- 5 files changed, 38 insertions(+), 38 deletions(-) rename res/{SHADR.svg => SHASR.svg} (100%) rename src/{SHADR.cpp => SHASR.cpp} (75%) diff --git a/plugin.json b/plugin.json index a918419..3ff0761 100644 --- a/plugin.json +++ b/plugin.json @@ -394,7 +394,7 @@ ] }, { - "slug": "SHADR", + "slug": "SHASR", "name": "Sample & Hold Analog Shift Register", "description": "", "tags": [] diff --git a/res/SHADR.svg b/res/SHASR.svg similarity index 100% rename from res/SHADR.svg rename to res/SHASR.svg diff --git a/src/SHADR.cpp b/src/SHASR.cpp similarity index 75% rename from src/SHADR.cpp rename to src/SHASR.cpp index 6200122..9965864 100644 --- a/src/SHADR.cpp +++ b/src/SHASR.cpp @@ -1,7 +1,7 @@ #include "plugin.hpp" -struct SHADR : Module { +struct SHASR : Module { enum ParamId { RND_PARAM, PUSH_PARAM, @@ -27,7 +27,7 @@ struct SHADR : Module { dsp::SchmittTrigger triggers[8]; float values[8] = {}; - SHADR() { + SHASR() { config(PARAMS_LEN, INPUTS_LEN, OUTPUTS_LEN, LIGHTS_LEN); configButton(RND_PARAM, "Randomize"); configButton(PUSH_PARAM, "Push"); @@ -76,47 +76,47 @@ struct SHADR : Module { }; -struct SHADRWidget : ModuleWidget { - SHADRWidget(SHADR* module) { +struct SHASRWidget : ModuleWidget { + SHASRWidget(SHASR* module) { setModule(module); - setPanel(createPanel(asset::plugin(pluginInstance, "res/SHADR.svg"))); + setPanel(createPanel(asset::plugin(pluginInstance, "res/SHASR.svg"))); addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); addChild(createWidget(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addParam(createParamCentered(mm2px(Vec(6.96, 21.852)), module, SHADR::RND_PARAM)); - addParam(createParamCentered(mm2px(Vec(17.788, 21.852)), module, SHADR::PUSH_PARAM)); - addParam(createParamCentered(mm2px(Vec(28.6, 21.852)), module, SHADR::CLEAR_PARAM)); - - addInput(createInputCentered(mm2px(Vec(6.96, 42.113)), module, SHADR::IN_INPUTS + 0)); - addInput(createInputCentered(mm2px(Vec(17.788, 42.055)), module, SHADR::TRIG_INPUTS + 0)); - addInput(createInputCentered(mm2px(Vec(6.96, 52.241)), module, SHADR::IN_INPUTS + 1)); - addInput(createInputCentered(mm2px(Vec(17.788, 52.241)), module, SHADR::TRIG_INPUTS + 1)); - addInput(createInputCentered(mm2px(Vec(6.96, 62.368)), module, SHADR::IN_INPUTS + 2)); - addInput(createInputCentered(mm2px(Vec(17.788, 62.368)), module, SHADR::TRIG_INPUTS + 2)); - addInput(createInputCentered(mm2px(Vec(6.96, 72.496)), module, SHADR::IN_INPUTS + 3)); - addInput(createInputCentered(mm2px(Vec(17.788, 72.496)), module, SHADR::TRIG_INPUTS + 3)); - addInput(createInputCentered(mm2px(Vec(6.96, 82.623)), module, SHADR::IN_INPUTS + 4)); - addInput(createInputCentered(mm2px(Vec(17.788, 82.623)), module, SHADR::TRIG_INPUTS + 4)); - addInput(createInputCentered(mm2px(Vec(6.96, 92.75)), module, SHADR::IN_INPUTS + 5)); - addInput(createInputCentered(mm2px(Vec(17.788, 92.75)), module, SHADR::TRIG_INPUTS + 5)); - addInput(createInputCentered(mm2px(Vec(6.96, 102.878)), module, SHADR::IN_INPUTS + 6)); - addInput(createInputCentered(mm2px(Vec(17.788, 102.878)), module, SHADR::TRIG_INPUTS + 6)); - addInput(createInputCentered(mm2px(Vec(6.96, 113.005)), module, SHADR::IN_INPUTS + 7)); - addInput(createInputCentered(mm2px(Vec(17.788, 113.005)), module, SHADR::TRIG_INPUTS + 7)); - - addOutput(createOutputCentered(mm2px(Vec(28.6, 42.113)), module, SHADR::SH_OUTPUTS + 0)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 52.241)), module, SHADR::SH_OUTPUTS + 1)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 62.368)), module, SHADR::SH_OUTPUTS + 2)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 72.496)), module, SHADR::SH_OUTPUTS + 3)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 82.623)), module, SHADR::SH_OUTPUTS + 4)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 92.75)), module, SHADR::SH_OUTPUTS + 5)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 102.878)), module, SHADR::SH_OUTPUTS + 6)); - addOutput(createOutputCentered(mm2px(Vec(28.6, 113.005)), module, SHADR::SH_OUTPUTS + 7)); + addParam(createParamCentered(mm2px(Vec(6.96, 21.852)), module, SHASR::RND_PARAM)); + addParam(createParamCentered(mm2px(Vec(17.788, 21.852)), module, SHASR::PUSH_PARAM)); + addParam(createParamCentered(mm2px(Vec(28.6, 21.852)), module, SHASR::CLEAR_PARAM)); + + addInput(createInputCentered(mm2px(Vec(6.96, 42.113)), module, SHASR::IN_INPUTS + 0)); + addInput(createInputCentered(mm2px(Vec(17.788, 42.055)), module, SHASR::TRIG_INPUTS + 0)); + addInput(createInputCentered(mm2px(Vec(6.96, 52.241)), module, SHASR::IN_INPUTS + 1)); + addInput(createInputCentered(mm2px(Vec(17.788, 52.241)), module, SHASR::TRIG_INPUTS + 1)); + addInput(createInputCentered(mm2px(Vec(6.96, 62.368)), module, SHASR::IN_INPUTS + 2)); + addInput(createInputCentered(mm2px(Vec(17.788, 62.368)), module, SHASR::TRIG_INPUTS + 2)); + addInput(createInputCentered(mm2px(Vec(6.96, 72.496)), module, SHASR::IN_INPUTS + 3)); + addInput(createInputCentered(mm2px(Vec(17.788, 72.496)), module, SHASR::TRIG_INPUTS + 3)); + addInput(createInputCentered(mm2px(Vec(6.96, 82.623)), module, SHASR::IN_INPUTS + 4)); + addInput(createInputCentered(mm2px(Vec(17.788, 82.623)), module, SHASR::TRIG_INPUTS + 4)); + addInput(createInputCentered(mm2px(Vec(6.96, 92.75)), module, SHASR::IN_INPUTS + 5)); + addInput(createInputCentered(mm2px(Vec(17.788, 92.75)), module, SHASR::TRIG_INPUTS + 5)); + addInput(createInputCentered(mm2px(Vec(6.96, 102.878)), module, SHASR::IN_INPUTS + 6)); + addInput(createInputCentered(mm2px(Vec(17.788, 102.878)), module, SHASR::TRIG_INPUTS + 6)); + addInput(createInputCentered(mm2px(Vec(6.96, 113.005)), module, SHASR::IN_INPUTS + 7)); + addInput(createInputCentered(mm2px(Vec(17.788, 113.005)), module, SHASR::TRIG_INPUTS + 7)); + + addOutput(createOutputCentered(mm2px(Vec(28.6, 42.113)), module, SHASR::SH_OUTPUTS + 0)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 52.241)), module, SHASR::SH_OUTPUTS + 1)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 62.368)), module, SHASR::SH_OUTPUTS + 2)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 72.496)), module, SHASR::SH_OUTPUTS + 3)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 82.623)), module, SHASR::SH_OUTPUTS + 4)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 92.75)), module, SHASR::SH_OUTPUTS + 5)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 102.878)), module, SHASR::SH_OUTPUTS + 6)); + addOutput(createOutputCentered(mm2px(Vec(28.6, 113.005)), module, SHASR::SH_OUTPUTS + 7)); } }; -Model* modelSHADR = createModel("SHADR"); \ No newline at end of file +Model* modelSHASR = createModel("SHASR"); \ No newline at end of file diff --git a/src/plugin.cpp b/src/plugin.cpp index 312daee..6f74a3f 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -44,5 +44,5 @@ void init(Plugin* p) { p->addModel(modelRescale); p->addModel(modelRandomValues); p->addModel(modelPush); - p->addModel(modelSHADR); + p->addModel(modelSHASR); } diff --git a/src/plugin.hpp b/src/plugin.hpp index 00a0fd5..33a523b 100644 --- a/src/plugin.hpp +++ b/src/plugin.hpp @@ -44,7 +44,7 @@ extern Model* modelMult; extern Model* modelRescale; extern Model* modelRandomValues; extern Model* modelPush; -extern Model* modelSHADR; +extern Model* modelSHASR; struct DigitalDisplay : Widget {