aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2024-02-09 09:58:30 +0100
committerBad Diode <bd@badd10de.dev>2024-02-09 09:58:30 +0100
commit56d69da83d1f004c79d2c3c5d27c28a5f3ec973e (patch)
tree7f71b780484a99978cc65a616aa6cf63df879279
parent40d22c55381f02053b8a076c633325f845db2ea2 (diff)
downloadstepper-56d69da83d1f004c79d2c3c5d27c28a5f3ec973e.tar.gz
stepper-56d69da83d1f004c79d2c3c5d27c28a5f3ec973e.zip
Fix bug with pattern chaining
-rw-r--r--src/sequencer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sequencer.c b/src/sequencer.c
index a3b72a8..4b7d174 100644
--- a/src/sequencer.c
+++ b/src/sequencer.c
@@ -951,7 +951,7 @@ handle_pattern_chain(void) {
951 switch (param_selection_loc) { 951 switch (param_selection_loc) {
952 case CHAIN_BTN_ENABLE: { 952 case CHAIN_BTN_ENABLE: {
953 chain.enabled ^= 1; 953 chain.enabled ^= 1;
954 chain.playing ^= 1; 954// chain.playing ^= 1;
955 } break; 955 } break;
956 case CHAIN_BTN_CLEAR: { 956 case CHAIN_BTN_CLEAR: {
957 chain.len = 0; 957 chain.len = 0;
@@ -1127,6 +1127,7 @@ handle_pattern_selection(void) {
1127 } 1127 }
1128 if (slot > -1) { 1128 if (slot > -1) {
1129 if (chain.len == 0) { 1129 if (chain.len == 0) {
1130 chain.playing = false;
1130 chain.current = slot; 1131 chain.current = slot;
1131 } 1132 }
1132 chain.chain[slot] = pattern_selection_loc; 1133 chain.chain[slot] = pattern_selection_loc;
@@ -1160,6 +1161,7 @@ handle_pattern_selection(void) {
1160 } 1161 }
1161 } 1162 }
1162 if (chain.len == 0) { 1163 if (chain.len == 0) {
1164 chain.playing = false;
1163 chain.enabled = 0; 1165 chain.enabled = 0;
1164 } 1166 }
1165 } 1167 }