diff --git a/CMakeLists.txt b/CMakeLists.txt index 884cadc..011d6a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required (VERSION 3.24.0 FATAL_ERROR) # Set for each plugin # set (PLUGIN_NAME Wavetable) -set (PLUGIN_VERSION 1.0.2) +set (PLUGIN_VERSION 1.0.3) set (BUNDLE_ID com.socalabs.wavetable) set (AU_ID WavetableAU) set (LV2_URI "https://socalabs.com/wavetable/") diff --git a/modules/gin b/modules/gin index 69cbdc6..850d96f 160000 --- a/modules/gin +++ b/modules/gin @@ -1 +1 @@ -Subproject commit 69cbdc6741e3a9efa1988407a3b4e5dcdf6aa1c4 +Subproject commit 850d96f45d0b5c006ffc7b36c364c6eae69ce00e diff --git a/plugin/Resources/layout.json b/plugin/Resources/layout.json index 793aaa7..44f2dd2 100644 --- a/plugin/Resources/layout.json +++ b/plugin/Resources/layout.json @@ -71,7 +71,8 @@ [ { "id": "step", "x": 0, "y": 23, "r": "parW()", "h": 83 }, { "id": "Beat", "x": 67, "y": 106, "w": 42, "h": 57 }, - { "id": "Length", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 } + { "id": "Length", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, + { "id": "Retrig", "r": "getR('step') - 3", "y": "getY('step') + 3", "w": 12, "h": 12 } ] }, { "id": "mod", "x": "prevR()+1", "y": "prevY()", "r": "parW()", "h": 163, "children": [ diff --git a/plugin/Source/Panels.h b/plugin/Source/Panels.h index a12bafc..9171c53 100644 --- a/plugin/Source/Panels.h +++ b/plugin/Source/Panels.h @@ -407,6 +407,8 @@ public: g->setParams (prs.beat, prs.length, prs.level, prs.enable); addControl (g, 0, 0, 4, 1); + addControl (new gin::SVGPluginButton (prs.retrig, gin::Assets::retrigger)); + setSize (112, 163); } diff --git a/plugin/Source/PluginProcessor.cpp b/plugin/Source/PluginProcessor.cpp index 8cb2384..c495dad 100644 --- a/plugin/Source/PluginProcessor.cpp +++ b/plugin/Source/PluginProcessor.cpp @@ -232,7 +232,8 @@ void WavetableAudioProcessor::StepLFOParams::setup (WavetableAudioProcessor& p) enable = p.addIntParam (id + "enable", nm + "Enable", "Enable", "", { 0.0, 1.0, 1.0, 1.0 }, 0.0f, 0.0f, enableTextFunction); beat = p.addIntParam (id + "beat", nm + "Beat", "Beat", "", { 0.0, float (notes.size() - 1), 1.0, 1.0 }, 13.0, 0.0f, durationTextFunction); - length = p.addIntParam (id + "length", nm + "Length", "Length", "", { 2.0, 32.0, 1.0, 1.0f }, 8.0f, 0.0f); + length = p.addIntParam (id + "length", nm + "Length", "Length", "", { 2.0, 32.0, 1.0, 1.0f }, 8.0f, 0.0f); + retrig = p.addIntParam (id + "retrig", nm + "Retrig", "Retrig", "", { 0.0, 1.0, 1.0, 1.0 }, 1.0, 0.0f, enableTextFunction); for (int i = 0; i < Cfg::numStepLFOSteps; i++) { diff --git a/plugin/Source/PluginProcessor.h b/plugin/Source/PluginProcessor.h index 3c408d9..0652a5b 100644 --- a/plugin/Source/PluginProcessor.h +++ b/plugin/Source/PluginProcessor.h @@ -119,7 +119,7 @@ public: { StepLFOParams() = default; - gin::Parameter::Ptr enable, beat, length; + gin::Parameter::Ptr enable, beat, length, retrig; gin::Parameter::Ptr level[Cfg::numStepLFOSteps] = { nullptr }; void setup (WavetableAudioProcessor& p); diff --git a/plugin/Source/WavetableVoice.cpp b/plugin/Source/WavetableVoice.cpp index 65e1f9a..73b3fa4 100644 --- a/plugin/Source/WavetableVoice.cpp +++ b/plugin/Source/WavetableVoice.cpp @@ -65,7 +65,7 @@ void WavetableVoice::noteStarted() l.noteOn (proc.lfoParams[idx++].retrig->getBoolValue() ? -1 : rng.nextFloat()); modStepLFO.reset(); - modStepLFO.noteOn(); + modStepLFO.noteOn (proc.stepLfoParams.retrig->getBoolValue() ? -1 : rng.nextFloat()); adsr.reset(); adsr.noteOn();