diff options
author | Bad Diode <bd@badd10de.dev> | 2023-09-09 16:29:45 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-09-09 16:29:45 +0200 |
commit | 140fa93b0286f2d986cc4ba30b6be33b6c48af3e (patch) | |
tree | 7b5359b84a3e3a357cf87f3d38650b22494be9c6 | |
parent | 45ad578200d91a1e21ea2b5661efa0e11f99ebca (diff) | |
download | stepper-140fa93b0286f2d986cc4ba30b6be33b6c48af3e.tar.gz stepper-140fa93b0286f2d986cc4ba30b6be33b6c48af3e.zip |
Fix a couple of small bugs
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/sequencer.c | 11 |
2 files changed, 14 insertions, 5 deletions
@@ -40,6 +40,8 @@ WITH REGARD TO THIS SOFTWARE. | |||
40 | // - Improve SRAM saving to make room for longer patterns and/or more banks. | 40 | // - Improve SRAM saving to make room for longer patterns and/or more banks. |
41 | // - Higher resolution clock to allow for microtiming and more accurate tempo. | 41 | // - Higher resolution clock to allow for microtiming and more accurate tempo. |
42 | // - Add clipboard sharing between banks. | 42 | // - Add clipboard sharing between banks. |
43 | // - Allow using B + dpad to nudge trigs. This will potentially mean switching | ||
44 | // to key release to enable trigs. | ||
43 | // | 45 | // |
44 | // WIP (1.7) | 46 | // WIP (1.7) |
45 | // + Improve "grey" cursor with dithering instead. | 47 | // + Improve "grey" cursor with dithering instead. |
@@ -85,10 +87,16 @@ WITH REGARD TO THIS SOFTWARE. | |||
85 | // used. | 87 | // used. |
86 | // + Make sure parameters show the default ones on empty/cleared patterns and | 88 | // + Make sure parameters show the default ones on empty/cleared patterns and |
87 | // you can't modify non active trig params or params on empty patterns. | 89 | // you can't modify non active trig params or params on empty patterns. |
90 | // + When In chain and in Square 1 should allow you to up arrow to Toggle | ||
91 | // button. Also Square 8 up to allow to arrow up to Random. | ||
92 | // + If chain Toggled OFF (and chain starts with E) and editing a Pattern | ||
93 | // (let’s say it’s C), hitting Start to stop will jump the pattern selected to | ||
94 | // E. Chain if toggled off should have no affect. | ||
88 | // - Add CREDITS to the documentation for now, should probably be a menu item | 95 | // - Add CREDITS to the documentation for now, should probably be a menu item |
89 | // later. | 96 | // later. |
90 | // - Make sure sync works with the same cable for in/out. | 97 | // - Make sure sync works with the same cable for in/out. |
91 | 98 | ||
99 | |||
92 | #include "gba/gba.h" | 100 | #include "gba/gba.h" |
93 | 101 | ||
94 | #include "renderer_m0.c" | 102 | #include "renderer_m0.c" |
diff --git a/src/sequencer.c b/src/sequencer.c index 27874f5..8addefd 100644 --- a/src/sequencer.c +++ b/src/sequencer.c | |||
@@ -513,7 +513,7 @@ toggle_playing(void) { | |||
513 | chain.current = find_next_pattern(); | 513 | chain.current = find_next_pattern(); |
514 | chain.playing = false; | 514 | chain.playing = false; |
515 | bar_counter = 0; | 515 | bar_counter = 0; |
516 | if (current_pattern == next_pattern && chain.len > 0) { | 516 | if (current_pattern == next_pattern && chain.len > 0 && chain.enabled) { |
517 | chain.playing = true; | 517 | chain.playing = true; |
518 | next_pattern = chain.chain[chain.current]; | 518 | next_pattern = chain.chain[chain.current]; |
519 | current_pattern = next_pattern; | 519 | current_pattern = next_pattern; |
@@ -573,7 +573,7 @@ pause_playing(void) { | |||
573 | SOUND_WAVE_CTRL = 0; | 573 | SOUND_WAVE_CTRL = 0; |
574 | SOUND_NOISE_CTRL = 0; | 574 | SOUND_NOISE_CTRL = 0; |
575 | chain.playing = false; | 575 | chain.playing = false; |
576 | if (current_pattern == next_pattern && chain.len > 0) { | 576 | if (current_pattern == next_pattern && chain.len > 0 && chain.enabled) { |
577 | chain.playing = true; | 577 | chain.playing = true; |
578 | next_pattern = chain.chain[chain.current]; | 578 | next_pattern = chain.chain[chain.current]; |
579 | current_pattern = next_pattern; | 579 | current_pattern = next_pattern; |
@@ -780,11 +780,11 @@ handle_pattern_chain(void) { | |||
780 | param_selection_loc = 8; | 780 | param_selection_loc = 8; |
781 | } | 781 | } |
782 | } else if (key_tap(KEY_UP)) { | 782 | } else if (key_tap(KEY_UP)) { |
783 | if (param_selection_loc >= 1 && param_selection_loc <= 2) { | 783 | if (param_selection_loc >= 0 && param_selection_loc <= 2) { |
784 | param_selection_loc = 16; | 784 | param_selection_loc = 16; |
785 | } else if (param_selection_loc >= 3 && param_selection_loc <= 4) { | 785 | } else if (param_selection_loc >= 3 && param_selection_loc <= 4) { |
786 | param_selection_loc = 17; | 786 | param_selection_loc = 17; |
787 | } else if (param_selection_loc >= 5 && param_selection_loc <= 6) { | 787 | } else if (param_selection_loc >= 5 && param_selection_loc <= 7) { |
788 | param_selection_loc = 18; | 788 | param_selection_loc = 18; |
789 | } else if (param_selection_loc >= 8 && param_selection_loc <= 15){ | 789 | } else if (param_selection_loc >= 8 && param_selection_loc <= 15){ |
790 | param_selection_loc -= 8; | 790 | param_selection_loc -= 8; |
@@ -1391,7 +1391,8 @@ handle_trigger_selection(void) { | |||
1391 | TriggerNote *trig = get_current_trig(); | 1391 | TriggerNote *trig = get_current_trig(); |
1392 | 1392 | ||
1393 | bool empty = patterns[pattern_selection_loc].empty; | 1393 | bool empty = patterns[pattern_selection_loc].empty; |
1394 | if (key_tap(KEY_B)) { | 1394 | if (key_hold(KEY_B)) { |
1395 | } else if (key_released(KEY_B)) { | ||
1395 | if (key_hold(KEY_SELECT)) { | 1396 | if (key_hold(KEY_SELECT)) { |
1396 | clipboard_copy(); | 1397 | clipboard_copy(); |
1397 | } else { | 1398 | } else { |