diff --git a/README.md b/README.md index b91d4cb..776de99 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,14 @@ Thomas René Sidor ## Changelog +Version 1.1.1 +* Fixed: RM8Base.svg missing or not needed ? (#4) +* Fixed: Oscillators not oscillating until you change frequency +* Fixed: Author name formatting in plugin.json +* Fixed: Proper saving and restoring of hardsync states in oscillator modules +* Fixed: Naming of modules to not include Tiny Tricks +* Changed: Name from Tiny Trick Modules to Tiny Tricks + Version 1.1.0 * Added: Simple Sine Oscillator (TT-SINE) * Added: Simple Sawtooth Oscillator (TT-SAW) diff --git a/plugin.json b/plugin.json index c013064..95c4e46 100644 --- a/plugin.json +++ b/plugin.json @@ -1,10 +1,10 @@ { "slug": "TinyTricks", - "name": "Tiny Trick Modules", + "name": "Tiny Tricks", "brand": "Tiny Tricks", - "version": "1.1.0", + "version": "1.1.1", "license": "MIT", - "author": "Thomas Ren\u00c3\u00a9 Sidor", + "author": "Thomas René Sidor", "authorEmail": "mail@thomassidor.com", "authorUrl": "https://thomassidor.com", "pluginUrl": "https://github.com/thomassidor/tinytricks", @@ -85,7 +85,7 @@ }, { "slug": "TT-A", - "name": "Tiny Tricks Arithmetic", + "name": "Arithmetic", "description": "A bunch of arithmetic tricks on two inputs.", "tags": [ "utility" @@ -93,7 +93,7 @@ }, { "slug": "TT-L", - "name": "Tiny Tricks Logic", + "name": "Logic", "description": "A bunch of logic tricks on two inputs.", "tags": [ "utility", @@ -102,7 +102,7 @@ }, { "slug": "TTSIN", - "name": "Tiny Tricks Sine Oscillator", + "name": "Sine Oscillator", "description": "A tiny sine based oscillator.", "tags": [ "oscillator" @@ -110,7 +110,7 @@ }, { "slug": "TTSAW", - "name": "Tiny Tricks Saw Oscillator", + "name": "Saw Oscillator", "description": "A tiny saw based oscillator.", "tags": [ "oscillator" @@ -118,7 +118,7 @@ }, { "slug": "TTSQR", - "name": "Tiny Tricks Square Oscillator", + "name": "Square Oscillator", "description": "A tiny square based oscillator.", "tags": [ "oscillator" @@ -126,7 +126,7 @@ }, { "slug": "TTTRI", - "name": "Tiny Tricks Triangle Oscillator", + "name": "Triangle Oscillator", "description": "A tiny triangle based oscillator.", "tags": [ "oscillator" @@ -134,7 +134,7 @@ }, { "slug": "TTSINPLUS", - "name": "Tiny Tricks Sine+ Oscillator", + "name": "Sine+ Oscillator", "description": "Three sine based oscillators with detune and sync.", "tags": [ "oscillator" @@ -142,7 +142,7 @@ }, { "slug": "TTSAWPLUS", - "name": "Tiny Tricks Sawtooth+ Oscillator", + "name": "Sawtooth+ Oscillator", "description": "Three sawtooth based oscillators with detune and sync.", "tags": [ "oscillator" @@ -150,7 +150,7 @@ }, { "slug": "TTSQRPLUS", - "name": "Tiny Tricks Square+ Oscillator", + "name": "Square+ Oscillator", "description": "Three square based oscillators with detune and sync.", "tags": [ "oscillator" @@ -158,11 +158,11 @@ }, { "slug": "TTTRIPLUS", - "name": "Tiny Tricks Triangle+ Oscillator", + "name": "Triangle+ Oscillator", "description": "Three triangle based oscillators with detune and sync.", "tags": [ "oscillator" ] } ] -} \ No newline at end of file +} diff --git a/src/randommute.cpp b/src/randommute.cpp index 6b6cb6a..ebe3e82 100644 --- a/src/randommute.cpp +++ b/src/randommute.cpp @@ -113,7 +113,6 @@ struct RM8Base : Module { struct RM8BaseWidget : ModuleWidget { RM8BaseWidget(RM8Base *module) { setModule(module); - setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/panels/RM8Base.svg"))); addInput(createInput(mm2px(Vec(3.847f, 12.003f)), module, RM8Base::TRIG_INPUT)); diff --git a/src/tt-plus-oscillators.cpp b/src/tt-plus-oscillators.cpp index 6e64ab7..f7f4221 100644 --- a/src/tt-plus-oscillators.cpp +++ b/src/tt-plus-oscillators.cpp @@ -36,9 +36,9 @@ struct TTOBasePlus : Module { dsp::SchmittTrigger hardsync3Trigger; bool hardsync2 = false; bool hardsync3 = false; - float prevPitch = 0.f; - float prevTheta = 0.f; - float prevDetune = 0.f; + float prevPitch = 900000.f; //Crude fix for making sure that oscillators oscillate upon module init + float prevTheta = 900000.f; //Crude fix for making sure that oscillators oscillate upon module init + float prevDetune = 900000.f; //Crude fix for making sure that oscillators oscillate upon module init void Initialize(){ @@ -61,6 +61,29 @@ struct TTOBasePlus : Module { Initialize(); } + //Got this approach from https://github.com/Miserlou/RJModules/blob/master/src/ChordSeq.cpp + json_t *dataToJson() override { + json_t *rootJ = json_object(); + + // Hardsync 2+3 + json_object_set_new(rootJ, "hardsync2", json_boolean(hardsync2)); + json_object_set_new(rootJ, "hardsync3", json_boolean(hardsync3)); + + return rootJ; + } + + void dataFromJson(json_t *rootJ) override { + // hardsync2 + json_t *hardsync2J = json_object_get(rootJ, "hardsync2"); + if (hardsync2J) + hardsync2 = json_is_true(hardsync2J); + // hardsync2 + json_t *hardsync3J = json_object_get(rootJ, "hardsync3"); + if (hardsync3J) + hardsync3 = json_is_true(hardsync3J); + } + + void process(const ProcessArgs &args) override{ //Setting the pitch diff --git a/src/tt-simple-oscillators.cpp b/src/tt-simple-oscillators.cpp index 3b27c35..acb654c 100644 --- a/src/tt-simple-oscillators.cpp +++ b/src/tt-simple-oscillators.cpp @@ -26,8 +26,8 @@ struct TTOBase : Module { TinyOscillator oscillator; TinyOscillator::OscillatorType oscType; - float prevPitch = 0.f; - float prevTheta = 0.f; + float prevPitch = 900000.f; //Crude fix for making sure that oscillators oscillate upon module init + float prevTheta = 900000.f; //Crude fix for making sure that oscillators oscillate upon module init dsp::SchmittTrigger syncTrigger; void Initialize(){ @@ -46,6 +46,7 @@ struct TTOBase : Module { Initialize(); } + void process(const ProcessArgs &args) override{ //Setting the pitch