From 387b93ab99ee215f2d50c4b135a50de531dea6d6 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 2 Oct 2021 21:58:16 -0400 Subject: [PATCH 1/3] gates back to 1 ms, fixed slider bug of neg probs --- src/Photron.cpp | 2 +- src/StochSeq.cpp | 7 ++++--- src/StochSeq4.cpp | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Photron.cpp b/src/Photron.cpp index 03ba27e..897172d 100644 --- a/src/Photron.cpp +++ b/src/Photron.cpp @@ -505,7 +505,7 @@ struct PhotronDisplay : Widget { // X if (module->inputs[Photron::X_INPUT].active) { - Vec3 rgb = module->blocks[12][12].rgb; + Vec3 rgb = module->blocks[module->rows-1][module->cols-1].rgb; nvgStrokeColor(args.vg, nvgRGB(rgb.x, rgb.y, rgb.z)); // nvgStrokeColor(args.vg, nvgRGBA(0x28, 0xb0, 0xf3, 0xc0)); drawWaveform(args.vg, valuesX, NULL); diff --git a/src/StochSeq.cpp b/src/StochSeq.cpp index eed0735..353de0b 100644 --- a/src/StochSeq.cpp +++ b/src/StochSeq.cpp @@ -173,12 +173,12 @@ struct StochSeq : Module, Quantize { float prob = gateProbabilities[gateIndex]; if (random::uniform() < prob) { - gatePulse.trigger(1e-1); + gatePulse.trigger(1e-3); currentGateOut = gateIndex; lightBlink = true; randLight = static_cast(random::uniform() * NUM_OF_LIGHTS); } else { - notGatePulse.trigger(1e-1); + notGatePulse.trigger(1e-3); } float spread = params[SPREAD_PARAM].getValue(); @@ -388,7 +388,8 @@ struct StochSeqDisplay : Widget { if (index >= NUM_OF_SLIDERS) index = NUM_OF_SLIDERS - 1; if (dragY < 0) dragY = 0; else if (dragY > box.size.y) dragY = box.size.y - SLIDER_TOP; - module->gateProbabilities[index] = 1.0 - dragY / (box.size.y - SLIDER_TOP); + float prob = 1.0 - dragY / (box.size.y - SLIDER_TOP); + module->gateProbabilities[index] = clamp(prob, 0.0, 1.0); } float getSliderHeight(int index) { diff --git a/src/StochSeq4.cpp b/src/StochSeq4.cpp index ac5bfba..959944a 100644 --- a/src/StochSeq4.cpp +++ b/src/StochSeq4.cpp @@ -32,9 +32,9 @@ struct Sequencer { // gate float prob = gateProbabilities[gateIndex]; if (random::uniform() < prob) { - gatePulse.trigger(1e-1); + gatePulse.trigger(1e-3); } else { - notGatePulse.trigger(1e-1); + notGatePulse.trigger(1e-3); } // pitch @@ -483,7 +483,8 @@ struct StochSeq4Display : Widget { if (index >= NUM_OF_SLIDERS) index = NUM_OF_SLIDERS - 1; if (dragY < 0) dragY = 0; else if (dragY > box.size.y) dragY = box.size.y - SLIDER_TOP; - module->seqs[seqId].gateProbabilities[index] = 1.0 - dragY / (box.size.y - SLIDER_TOP); + float prob = 1.0 - dragY / (box.size.y - SLIDER_TOP); + module->seqs[seqId].gateProbabilities[index] = clamp(prob, 0.0, 1.0); } float getSliderHeight(int index) { From fd2622c11ec61647b7c50d6293f4d05f10af9f8c Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 2 Oct 2021 22:08:02 -0400 Subject: [PATCH 2/3] Update plugin.json --- plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.json b/plugin.json index 2ec8d6b..5d850ef 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "slug": "Sha-Bang-Modules", "name": "Sha#Bang! Modules", - "version": "1.3.5", + "version": "1.3.6", "license": "GPL-3.0-only", "author": "Jeremy Muller", "authorEmail": "jeremy@jeremymuller.com", From 1c5737e4de0d538af4edd7a823a4a3863eb30629 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 2 Oct 2021 22:09:23 -0400 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be76123..8e9a3b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v1.3.6 (10-02-2021) +- Put gates back to 1e-3 on StochSeq and StochSeq4 +- Fixed UI bug in sliders that would allow for < 0% + v1.3.5 (9-30-2021) - Added NOT gate and INV v/oct to StochSeq and all StochSeq4 patterns - Added OR and XOR gates to StochSeq4 patterns