From 974e315d1c53df5039267f0a203f9024fae1051b Mon Sep 17 00:00:00 2001 From: "Nicholas J. Michalek" Date: Mon, 16 Dec 2024 02:08:49 -0500 Subject: [PATCH] Revert "SequenceX: rework Randomize; unipolar vs. bipolar" --- software/src/applets/SequenceX.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/software/src/applets/SequenceX.h b/software/src/applets/SequenceX.h index 604dc527..8184f492 100644 --- a/software/src/applets/SequenceX.h +++ b/software/src/applets/SequenceX.h @@ -35,7 +35,7 @@ class SequenceX : public HemisphereApplet { const uint8_t* applet_icon() { return PhzIcons::sequenceX; } void Start() { - Randomize(true); + Randomize(); } void Reset() { @@ -43,20 +43,17 @@ class SequenceX : public HemisphereApplet { reset = true; } - void Randomize(bool unipolar = false) { - const int minval = unipolar? 0 : -SEQX_MIN_VALUE; - for (int s = 0; s < SEQX_STEPS; s++) { - note[s] = int8_t(Entropy.random(SEQX_MAX_VALUE + minval)) - minval; - } + void Randomize() { + for (int s = 0; s < SEQX_STEPS; s++) note[s] = random(SEQX_MIN_VALUE, SEQX_MAX_VALUE); } void Controller() { - if (abs(In(1)) > (24 << 7) ) // 24 semitones == 2V + if (In(1) > (24 << 7) ) // 24 semitones == 2V { // new random sequence if CV2 goes high if (!cv2_gate) { cv2_gate = 1; - Randomize(In(1) > 0); + Randomize(); } } else cv2_gate = 0;