From 7f42a1877cdfc4af394942b6ca8131e4ee8fa898 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 8 Sep 2023 14:45:46 +0200 Subject: Add wraparound for patterns and more help strings --- src/drawing.c | 36 ++++++++++++++++++++++++++++++------ src/main.c | 12 ++++++------ src/sequencer.c | 16 ++++++++++------ 3 files changed, 46 insertions(+), 18 deletions(-) diff --git a/src/drawing.c b/src/drawing.c index e94d0ff..274fe66 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1719,14 +1719,30 @@ draw_notif_bar() { if (settings.help == TOGGLE_ON) { if (input_handler == handle_trigger_selection || input_handler == handle_channel_selection) { - txt_drawf_small("L/R:NOTE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); + txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); } else if (input_handler == handle_param_selection_sq1 || input_handler == handle_param_selection_sq2 || input_handler == handle_param_selection_wave || input_handler == handle_param_selection_noise) { - txt_drawf_small("L/R:ADJUST SELECT:COPY", x0 + 2, y0 + 1, color); + txt_drawf_small("L/R:ADJUST SELECT:COPY", x0 + 2, y0 + 1, color); } else if (input_handler == handle_pattern_selection) { - txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE", x0 + 2, y0 + 1, color); + txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE SEL+L/R:CLEAR", x0 + 2, y0 + 1, color); + } else if (input_handler == handle_pattern_chain) { + switch (param_selection_loc) { + case CHAIN_BTN_ENABLE: { + txt_drawf_small("A:BACK B:TOGGLE CHAIN", x0 + 2, y0 + 1, color); + } break; + case CHAIN_BTN_CLEAR: { + txt_drawf_small("A:BACK B:CLEAR CHAIN", x0 + 2, y0 + 1, color); + } break; + case CHAIN_BTN_RANDOM: { + txt_drawf_small("A:BACK B:RANDOMIZE CHAIN", x0 + 2, y0 + 1, color); + } break; + default: { + txt_drawf_small("L/R:CHANGE PATTERN A:BACK B:TOGGLE STEP", x0 + 2, y0 + 1, color); + } break; + } + } else if (input_handler == handle_right_col_selection) { if (right_col_selection_loc == R_COL_STOP) { txt_drawf_small("B:STOP", x0 + 2, y0 + 1, color); @@ -1737,14 +1753,22 @@ draw_notif_bar() { txt_drawf_small("B:PAUSE", x0 + 2, y0 + 1, color); } } else if (right_col_selection_loc == R_COL_BPM) { - txt_drawf_small("L/R:TEMPO", x0 + 2, y0 + 1, color); + txt_drawf_small("L/R:TEMPO (1) SEL+L/R:TEMPO (10)", x0 + 2, y0 + 1, color); } else if (right_col_selection_loc == R_COL_SETTINGS) { txt_drawf_small("B:SETTINGS", x0 + 2, y0 + 1, color); + } else if (right_col_selection_loc == R_COL_SCALE) { + txt_drawf_small("L/R:SCALE SEL+L/R:ROOT NOTE", x0 + 2, y0 + 1, color); } else if (right_col_selection_loc == R_COL_BANK_A || right_col_selection_loc == R_COL_BANK_B || right_col_selection_loc == R_COL_BANK_C || - right_col_selection_loc == R_COL_BANK_D) { - txt_drawf_small("B:SAVE CURRENT BANK AND SWITCH", x0 + 2, y0 + 1, color); + right_col_selection_loc == R_COL_BANK_D || + right_col_selection_loc == R_COL_BANK_E || + right_col_selection_loc == R_COL_BANK_F) { + if (settings.auto_save) { + txt_drawf_small("B:SAVE CURRENT BANK AND SWITCH", x0 + 2, y0 + 1, color); + } else { + txt_drawf_small("B:SWITCH BANK", x0 + 2, y0 + 1, color); + } } } return; diff --git a/src/main.c b/src/main.c index d6ea621..e9d1baf 100644 --- a/src/main.c +++ b/src/main.c @@ -75,15 +75,15 @@ WITH REGARD TO THIS SOFTWARE. // a pattern to start chain. // + Random chain just places A- doesn’t check if which patterns have content // in bank for random placement. +// + Add help for scale parameters and banks E/F (consider auto-save settings +// for notification) +// + Default should be help is on +// + Cursor on bank can wrap around (up/down) but the same can't be done on +// patterns. +// + Add help for pattern chain // - 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. -// - Add help for scale parameters and banks E/F (consider auto-save settings -// for notification) -// - Add help for pattern chain -// - Default should be help is on -// - Cursor on bank can wrap around (up/down) but the same can't be done on -// patterns. #include "gba/gba.h" diff --git a/src/sequencer.c b/src/sequencer.c index 512555a..3bd214f 100644 --- a/src/sequencer.c +++ b/src/sequencer.c @@ -938,17 +938,21 @@ handle_pattern_selection(void) { } else if (key_tap(KEY_UP)) { if (pattern_selection_loc > 0) { pattern_selection_loc = pattern_selection_loc - 1; - redraw_channels = true; - redraw_trigs = true; - redraw_bpm = true; + } else { + pattern_selection_loc = 7; } + redraw_channels = true; + redraw_trigs = true; + redraw_bpm = true; } else if (key_tap(KEY_DOWN)) { if (pattern_selection_loc < 7) { pattern_selection_loc = pattern_selection_loc + 1; - redraw_channels = true; - redraw_trigs = true; - redraw_bpm = true; + } else { + pattern_selection_loc = 0; } + redraw_channels = true; + redraw_trigs = true; + redraw_bpm = true; } if (key_tap(KEY_LEFT)) { redraw_params = true; -- cgit v1.2.1