From 140fa93b0286f2d986cc4ba30b6be33b6c48af3e Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sat, 9 Sep 2023 16:29:45 +0200 Subject: Fix a couple of small bugs --- src/main.c | 8 ++++++++ src/sequencer.c | 11 ++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 1970e8e..db04026 100644 --- a/src/main.c +++ b/src/main.c @@ -40,6 +40,8 @@ WITH REGARD TO THIS SOFTWARE. // - Improve SRAM saving to make room for longer patterns and/or more banks. // - Higher resolution clock to allow for microtiming and more accurate tempo. // - Add clipboard sharing between banks. +// - Allow using B + dpad to nudge trigs. This will potentially mean switching +// to key release to enable trigs. // // WIP (1.7) // + Improve "grey" cursor with dithering instead. @@ -85,10 +87,16 @@ WITH REGARD TO THIS SOFTWARE. // used. // + Make sure parameters show the default ones on empty/cleared patterns and // you can't modify non active trig params or params on empty patterns. +// + When In chain and in Square 1 should allow you to up arrow to Toggle +// button. Also Square 8 up to allow to arrow up to Random. +// + If chain Toggled OFF (and chain starts with E) and editing a Pattern +// (let’s say it’s C), hitting Start to stop will jump the pattern selected to +// E. Chain if toggled off should have no affect. // - Add CREDITS to the documentation for now, should probably be a menu item // later. // - Make sure sync works with the same cable for in/out. + #include "gba/gba.h" #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) { chain.current = find_next_pattern(); chain.playing = false; bar_counter = 0; - if (current_pattern == next_pattern && chain.len > 0) { + if (current_pattern == next_pattern && chain.len > 0 && chain.enabled) { chain.playing = true; next_pattern = chain.chain[chain.current]; current_pattern = next_pattern; @@ -573,7 +573,7 @@ pause_playing(void) { SOUND_WAVE_CTRL = 0; SOUND_NOISE_CTRL = 0; chain.playing = false; - if (current_pattern == next_pattern && chain.len > 0) { + if (current_pattern == next_pattern && chain.len > 0 && chain.enabled) { chain.playing = true; next_pattern = chain.chain[chain.current]; current_pattern = next_pattern; @@ -780,11 +780,11 @@ handle_pattern_chain(void) { param_selection_loc = 8; } } else if (key_tap(KEY_UP)) { - if (param_selection_loc >= 1 && param_selection_loc <= 2) { + if (param_selection_loc >= 0 && param_selection_loc <= 2) { param_selection_loc = 16; } else if (param_selection_loc >= 3 && param_selection_loc <= 4) { param_selection_loc = 17; - } else if (param_selection_loc >= 5 && param_selection_loc <= 6) { + } else if (param_selection_loc >= 5 && param_selection_loc <= 7) { param_selection_loc = 18; } else if (param_selection_loc >= 8 && param_selection_loc <= 15){ param_selection_loc -= 8; @@ -1391,7 +1391,8 @@ handle_trigger_selection(void) { TriggerNote *trig = get_current_trig(); bool empty = patterns[pattern_selection_loc].empty; - if (key_tap(KEY_B)) { + if (key_hold(KEY_B)) { + } else if (key_released(KEY_B)) { if (key_hold(KEY_SELECT)) { clipboard_copy(); } else { -- cgit v1.2.1