diff --git a/plugin.json b/plugin.json index 1d04d17..072154c 100644 --- a/plugin.json +++ b/plugin.json @@ -198,6 +198,17 @@ "Random", "Hardware clone" ] + }, + { + "slug": "Ripples", + "name": "Liquid Filter", + "description": "Based on Mutable Instruments Ripples", + "modularGridUrl": "https://www.modulargrid.net/e/mutable-instruments-ripples", + "tags": [ + "Filter", + "Voltage-controlled amplifier", + "Hardware clone" + ] } ] } \ No newline at end of file diff --git a/res/Ripples.svg b/res/Ripples.svg new file mode 100644 index 0000000..64a956d --- /dev/null +++ b/res/Ripples.svg @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Ripples.cpp b/src/Ripples.cpp new file mode 100644 index 0000000..61110c6 --- /dev/null +++ b/src/Ripples.cpp @@ -0,0 +1,68 @@ +#include "plugin.hpp" + + +struct Ripples : Module { + enum ParamIds { + RES_PARAM, + FREQ_PARAM, + FM_PARAM, + NUM_PARAMS + }; + enum InputIds { + RES_INPUT, + FREQ_INPUT, + FM_INPUT, + IN_INPUT, + GAIN_INPUT, + NUM_INPUTS + }; + enum OutputIds { + BP2_OUTPUT, + LP2_OUTPUT, + LP4_OUTPUT, + LP4VCA_OUTPUT, + NUM_OUTPUTS + }; + enum LightIds { + NUM_LIGHTS + }; + + Ripples() { + config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); + configParam(RES_PARAM, 0.f, 1.f, 0.5f, "Resonance"); + configParam(FREQ_PARAM, 0.f, 1.f, 0.5f, "Frequency"); + configParam(FM_PARAM, 0.f, 1.f, 0.5f, "Frequency modulation"); + } + + void process(const ProcessArgs& args) override { + } +}; + + +struct RipplesWidget : ModuleWidget { + RipplesWidget(Ripples* module) { + setModule(module); + setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/Ripples.svg"))); + + addChild(createWidget(Vec(RACK_GRID_WIDTH, 0))); + addChild(createWidget(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); + + addParam(createParamCentered(mm2px(Vec(8.872, 20.877)), module, Ripples::RES_PARAM)); + addParam(createParamCentered(mm2px(Vec(20.307, 42.468)), module, Ripples::FREQ_PARAM)); + addParam(createParamCentered(mm2px(Vec(31.732 + 0.1, 64.059)), module, Ripples::FM_PARAM)); + + addInput(createInputCentered(mm2px(Vec(8.227, 86.909)), module, Ripples::RES_INPUT)); + addInput(createInputCentered(mm2px(Vec(20.297, 86.909)), module, Ripples::FREQ_INPUT)); + addInput(createInputCentered(mm2px(Vec(32.367, 86.909)), module, Ripples::FM_INPUT)); + addInput(createInputCentered(mm2px(Vec(8.227, 98.979)), module, Ripples::IN_INPUT)); + addInput(createInputCentered(mm2px(Vec(8.227, 111.05)), module, Ripples::GAIN_INPUT)); + + addOutput(createOutputCentered(mm2px(Vec(20.297, 98.979)), module, Ripples::BP2_OUTPUT)); + addOutput(createOutputCentered(mm2px(Vec(32.367, 98.979)), module, Ripples::LP2_OUTPUT)); + addOutput(createOutputCentered(mm2px(Vec(20.297, 111.05)), module, Ripples::LP4_OUTPUT)); + addOutput(createOutputCentered(mm2px(Vec(32.367, 111.05)), module, Ripples::LP4VCA_OUTPUT)); + } +}; + + +Model* modelRipples = createModel("Ripples"); \ No newline at end of file diff --git a/src/plugin.cpp b/src/plugin.cpp index a522ee4..b4b367e 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -23,4 +23,5 @@ void init(rack::Plugin *p) { p->addModel(modelFrames); p->addModel(modelMarbles); p->addModel(modelStages); + p->addModel(modelRipples); } diff --git a/src/plugin.hpp b/src/plugin.hpp index aa55277..0b8977c 100644 --- a/src/plugin.hpp +++ b/src/plugin.hpp @@ -23,3 +23,4 @@ extern Model *modelVeils; extern Model *modelFrames; extern Model *modelStages; extern Model *modelMarbles; +extern Model* modelRipples;