From 490dd6a54ded91f78c3b7b33af774ef43283ad2d Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 2 Feb 2024 09:23:56 +0100 Subject: Add more notification hints --- src/drawing.c | 98 ++++++++++++++++++++++++++++++++++++++------------------- src/main.c | 8 ++--- src/sequencer.c | 3 +- 3 files changed, 71 insertions(+), 38 deletions(-) (limited to 'src') diff --git a/src/drawing.c b/src/drawing.c index 18ee3b9..cfe0321 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1815,6 +1815,28 @@ draw_notif_bar() { } txt_drawf_small(msg, x0 + 2, y0 + 1, color); } else { + if (play_status && chain.len != 0 && chain.enabled) { + u8 x = x0 + 2; + u8 y = y0 + 1; + txt_drawf_small("CHAIN: ", x, y, color); + x += 4 * 7; + bool first = true; + for (size_t i = 0, k = 0; i < MAX_CHAIN; i++) { + if (chain.active[i] != 1) { + continue; + } + if (!first) { + txt_drawc_small('-', x + 4 * k++, y, COL_FG); + } + u8 color = COL_FG; + if (i == chain.current) { + color = COL_ACC_2; + } + txt_drawc_small('A' + chain.chain[i], x + 4 * k++, y, color); + first = false; + } + return; + } Pattern *pat = &patterns[pattern_selection_loc]; if (input_handler == handle_param_selection_sq1 || input_handler == handle_param_selection_ch1) { @@ -2015,16 +2037,31 @@ 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 SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); + if (input_handler == handle_trigger_selection) { + if (key_pressed(KEY_B) && ctrl.key_b > 10) { + txt_drawf_small("D-PAD:NUDGE TRIGGER", x0 + 2, y0 + 1, color); + } else if (key_pressed(KEY_SELECT)) { + txt_drawf_small("SEL+B:COPY TRIG SEL+A:PASTE TRIG", x0 + 2, y0 + 1, color); + } else { + txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); + } + } else if (input_handler == handle_channel_selection) { + if (key_pressed(KEY_SELECT)) { + txt_drawf_small("SEL+B:COPY CHANNEL SEL+A:PASTE CHANNEL", x0 + 2, y0 + 1, color); + } else { + 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 PARAMETERS", x0 + 2, y0 + 1, color); } else if (input_handler == handle_pattern_selection) { - txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE SEL+L+R:CLEAR", x0 + 2, y0 + 1, color); + if (key_pressed(KEY_SELECT)) { + txt_drawf_small("SEL+B:COPY PATTERN SEL+A:PASTE PATTERN", x0 + 2, y0 + 1, color); + } else { + 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: { @@ -2051,11 +2088,30 @@ 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 (1) SEL+L/R:TEMPO (10)", x0 + 2, y0 + 1, color); + if (key_pressed(KEY_SELECT)) { + int bpm; + if (settings.global_bpm) { + bpm = settings.bpm; + } else { + bpm = patterns[pattern_selection_loc].bpm; + } + txt_drawf_small("TEMPO: %d bpm", x0 + 2, y0 + 1, color, bpm); + } else { + 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); + if (key_pressed(KEY_SELECT)) { + const char *roots[12] = { + "C ", "C#", "D ", "D#", "E ", "F ", + "F#", "G ", "G#", "A ", "A#", "B ", + }; + txt_drawf_small("ROOT: %s SCALE: %s", x0 + 2, y0 + 1, color, + roots[current_scale_root], scale_long[current_scale]); + } else { + 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 || @@ -2113,32 +2169,10 @@ draw_notif_bar() { return; } - if (chain.len != 0 && chain.enabled) { - u8 x = x0 + 2; - u8 y = y0 + 1; - txt_drawf_small("CHAIN: ", x, y, color); - x += 4 * 7; - bool first = true; - for (size_t i = 0, k = 0; i < MAX_CHAIN; i++) { - if (chain.active[i] != 1) { - continue; - } - if (!first) { - txt_drawc_small('-', x + 4 * k++, y, COL_FG); - } - u8 color = COL_FG; - if (i == chain.current) { - color = COL_ACC_2; - } - txt_drawc_small('A' + chain.chain[i], x + 4 * k++, y, color); - first = false; - } + if (play_status == 0) { + txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color); } else { - if (play_status == 0) { - txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color); - } else { - txt_drawf_small("PLAYING", x0 + 2, y0 + 1, color); - } + txt_drawf_small("PLAYING", x0 + 2, y0 + 1, color); } } } diff --git a/src/main.c b/src/main.c index cec540e..8760b2a 100644 --- a/src/main.c +++ b/src/main.c @@ -34,15 +34,13 @@ WITH REGARD TO THIS SOFTWARE. // + Make sure Attack/Decay are grey for A+B // + Add help for attack/decay on ch3 // + Bad performance when selecting patterns? +// + Make sure the chain is always shown on the notification bar if playing +// + Add more sync in/out options +// + Add more help hints when holding SEL // - Fix any bugs we currently have // - Add clipboard sharing between banks. -// - Make sure transposing a sequence past the keyboard limit doesn't affect -// the sequence and can be reversed. // - Study saving overhauls for bootleg cartridges. -// - When putting a new trigger, make sure it uses the global parameters -// - Improve memcpy32 performance (ASM?). We use it a lot in expensive places. // - Add tap tempo for BPM. -// - Improve drawing routines even more (ASM?). // - Improve interrupt handler to allow nesting/prioritization. // diff --git a/src/sequencer.c b/src/sequencer.c index 56146c5..7275fbe 100644 --- a/src/sequencer.c +++ b/src/sequencer.c @@ -1675,7 +1675,8 @@ handle_trigger_selection(void) { static bool nudge = false; bool empty = patterns[pattern_selection_loc].empty; - if (key_hold(KEY_B)) { + if (key_pressed(KEY_B) && ctrl.key_b > 10) { + nudge = true; } else if (key_released(KEY_B)) { if (nudge) { nudge = false; -- cgit v1.2.1