From 1e8c7a50b4295383b0d16ab105a4b8f26bbaa438 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Thu, 24 Aug 2023 16:35:32 +0200 Subject: Fix a couple of UI bugs --- src/main.c | 8 ++++++++ src/scale.c | 6 +++--- src/sequencer.c | 7 +++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index fe3dba0..0efcc73 100644 --- a/src/main.c +++ b/src/main.c @@ -14,6 +14,8 @@ WITH REGARD TO THIS SOFTWARE. // UI tweaks. // - Add custom user themes // - Animations for cursor movement/current step highlight. (A fade out maybe?) +// - Should the channel parameters reset after leaving them? Is it more or +// less confusing this way? // // Quality of life improvements. // - When not on play mode, adjusting a note or a parameter triggers the sound. @@ -66,6 +68,11 @@ WITH REGARD TO THIS SOFTWARE. // - Add CREDITS to the documentation for now, should probably be a menu item // later. // +// Bug notes (catbeat): +// +// + Bug: GUI scale disappeared +// + Bug: cut and pasted note on noise voice and showed parameter paste but +// not note, had to push B again for note #include "gba/gba.h" @@ -186,6 +193,7 @@ update(void) { redraw_play_pause = true; redraw_piano_note = true; redraw_params = true; + redraw_scale = true; } last_trig_loc = trig_selection_loc; last_channel_loc = channel_selection_loc; diff --git a/src/scale.c b/src/scale.c index 51d46fe..7704815 100644 --- a/src/scale.c +++ b/src/scale.c @@ -18,6 +18,9 @@ typedef enum Scales { SCALE_NUM, } Scales; +int current_scale = SCALE_CHRM; +int current_scale_root = 0; + char *scale_short[] = { "CHRM", "MAJR", @@ -77,9 +80,6 @@ Scale scales[] = { {1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0}, // HIRA }; -int current_scale = SCALE_CHRM; -int current_scale_root = 0; - s32 scale_note(s32 current, s32 inc) { if (inc > 1 || inc < -1) { diff --git a/src/sequencer.c b/src/sequencer.c index 609ccee..0558323 100644 --- a/src/sequencer.c +++ b/src/sequencer.c @@ -683,6 +683,7 @@ handle_right_col_selection(void) { if (current_scale < 0) { current_scale = SCALE_NUM - 1; } + // TODO: add root note change & keyboard viz. redraw_scale = true; } break; } @@ -807,6 +808,9 @@ handle_pattern_selection(void) { clipboard_copy(); } if (key_tap(KEY_A)) { + if (patterns[pattern_selection_loc].empty) { + clear_pattern(pattern_selection_loc); + } clipboard_paste(); redraw_bpm = true; redraw_trigs = true; @@ -1337,6 +1341,9 @@ handle_trigger_selection(void) { redraw_piano_note = true; } else if (key_tap(KEY_A)) { if (key_hold(KEY_SELECT)) { + if (patterns[pattern_selection_loc].empty) { + clear_pattern(pattern_selection_loc); + } clipboard_paste(); redraw_bpm = true; redraw_trigs = true; -- cgit v1.2.1