Skip to content

Commit

Permalink
Dev bug fixes v1.1.1 (#5)
Browse files Browse the repository at this point in the history
* Fixed: RM8Base.svg missing or not needed ? (#4)
* Fixed: Oscillators not oscillating until you change frequency
* Fixed: Author name formatting in plugin.json
* Changed: Name from Tiny Trick Modules to Tiny Tricks
* Fixed: Proper saving and restoring of hardsync states in oscillator modules
* Fixed: Naming of modules to not include Tiny Tricks
  • Loading branch information
thomassidor authored Oct 20, 2019
1 parent 4b1a96b commit 30f4d12
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 20 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -85,15 +85,15 @@
},
{
"slug": "TT-A",
"name": "Tiny Tricks Arithmetic",
"name": "Arithmetic",
"description": "A bunch of arithmetic tricks on two inputs.",
"tags": [
"utility"
]
},
{
"slug": "TT-L",
"name": "Tiny Tricks Logic",
"name": "Logic",
"description": "A bunch of logic tricks on two inputs.",
"tags": [
"utility",
Expand All @@ -102,67 +102,67 @@
},
{
"slug": "TTSIN",
"name": "Tiny Tricks Sine Oscillator",
"name": "Sine Oscillator",
"description": "A tiny sine based oscillator.",
"tags": [
"oscillator"
]
},
{
"slug": "TTSAW",
"name": "Tiny Tricks Saw Oscillator",
"name": "Saw Oscillator",
"description": "A tiny saw based oscillator.",
"tags": [
"oscillator"
]
},
{
"slug": "TTSQR",
"name": "Tiny Tricks Square Oscillator",
"name": "Square Oscillator",
"description": "A tiny square based oscillator.",
"tags": [
"oscillator"
]
},
{
"slug": "TTTRI",
"name": "Tiny Tricks Triangle Oscillator",
"name": "Triangle Oscillator",
"description": "A tiny triangle based oscillator.",
"tags": [
"oscillator"
]
},
{
"slug": "TTSINPLUS",
"name": "Tiny Tricks Sine+ Oscillator",
"name": "Sine+ Oscillator",
"description": "Three sine based oscillators with detune and sync.",
"tags": [
"oscillator"
]
},
{
"slug": "TTSAWPLUS",
"name": "Tiny Tricks Sawtooth+ Oscillator",
"name": "Sawtooth+ Oscillator",
"description": "Three sawtooth based oscillators with detune and sync.",
"tags": [
"oscillator"
]
},
{
"slug": "TTSQRPLUS",
"name": "Tiny Tricks Square+ Oscillator",
"name": "Square+ Oscillator",
"description": "Three square based oscillators with detune and sync.",
"tags": [
"oscillator"
]
},
{
"slug": "TTTRIPLUS",
"name": "Tiny Tricks Triangle+ Oscillator",
"name": "Triangle+ Oscillator",
"description": "Three triangle based oscillators with detune and sync.",
"tags": [
"oscillator"
]
}
]
}
}
1 change: 0 additions & 1 deletion src/randommute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PJ301MPort>(mm2px(Vec(3.847f, 12.003f)), module, RM8Base::TRIG_INPUT));

Expand Down
29 changes: 26 additions & 3 deletions src/tt-plus-oscillators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/tt-simple-oscillators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand All @@ -46,6 +46,7 @@ struct TTOBase : Module {
Initialize();
}


void process(const ProcessArgs &args) override{

//Setting the pitch
Expand Down

0 comments on commit 30f4d12

Please sign in to comment.