diff options
author | Bad Diode <bd@badd10de.dev> | 2024-02-02 09:23:56 +0100 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-02-02 09:23:56 +0100 |
commit | 490dd6a54ded91f78c3b7b33af774ef43283ad2d (patch) | |
tree | 0a38d852627894d15f385a57db8e27c75740c7ec | |
parent | 8cc0da2ca7ba0cb3e44deea8eb031a36d96f7c72 (diff) | |
download | stepper-490dd6a54ded91f78c3b7b33af774ef43283ad2d.tar.gz stepper-490dd6a54ded91f78c3b7b33af774ef43283ad2d.zip |
Add more notification hints
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/drawing.c | 98 | ||||
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/sequencer.c | 3 |
4 files changed, 72 insertions, 39 deletions
@@ -27,7 +27,7 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS)) | |||
27 | INC_FLAGS += -I$(LIBGBA_SRC) | 27 | INC_FLAGS += -I$(LIBGBA_SRC) |
28 | 28 | ||
29 | # Output library names and executables. | 29 | # Output library names and executables. |
30 | TARGET := STEPPER-v1.8-dev-22 | 30 | TARGET := STEPPER-v1.8-dev-23 |
31 | ELF := $(BUILD_DIR)/$(TARGET).elf | 31 | ELF := $(BUILD_DIR)/$(TARGET).elf |
32 | BIN := $(BUILD_DIR)/$(TARGET).gba | 32 | BIN := $(BUILD_DIR)/$(TARGET).gba |
33 | 33 | ||
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() { | |||
1815 | } | 1815 | } |
1816 | txt_drawf_small(msg, x0 + 2, y0 + 1, color); | 1816 | txt_drawf_small(msg, x0 + 2, y0 + 1, color); |
1817 | } else { | 1817 | } else { |
1818 | if (play_status && chain.len != 0 && chain.enabled) { | ||
1819 | u8 x = x0 + 2; | ||
1820 | u8 y = y0 + 1; | ||
1821 | txt_drawf_small("CHAIN: ", x, y, color); | ||
1822 | x += 4 * 7; | ||
1823 | bool first = true; | ||
1824 | for (size_t i = 0, k = 0; i < MAX_CHAIN; i++) { | ||
1825 | if (chain.active[i] != 1) { | ||
1826 | continue; | ||
1827 | } | ||
1828 | if (!first) { | ||
1829 | txt_drawc_small('-', x + 4 * k++, y, COL_FG); | ||
1830 | } | ||
1831 | u8 color = COL_FG; | ||
1832 | if (i == chain.current) { | ||
1833 | color = COL_ACC_2; | ||
1834 | } | ||
1835 | txt_drawc_small('A' + chain.chain[i], x + 4 * k++, y, color); | ||
1836 | first = false; | ||
1837 | } | ||
1838 | return; | ||
1839 | } | ||
1818 | Pattern *pat = &patterns[pattern_selection_loc]; | 1840 | Pattern *pat = &patterns[pattern_selection_loc]; |
1819 | if (input_handler == handle_param_selection_sq1 | 1841 | if (input_handler == handle_param_selection_sq1 |
1820 | || input_handler == handle_param_selection_ch1) { | 1842 | || input_handler == handle_param_selection_ch1) { |
@@ -2015,16 +2037,31 @@ draw_notif_bar() { | |||
2015 | } | 2037 | } |
2016 | 2038 | ||
2017 | if (settings.help == TOGGLE_ON) { | 2039 | if (settings.help == TOGGLE_ON) { |
2018 | if (input_handler == handle_trigger_selection || | 2040 | if (input_handler == handle_trigger_selection) { |
2019 | input_handler == handle_channel_selection) { | 2041 | if (key_pressed(KEY_B) && ctrl.key_b > 10) { |
2020 | txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); | 2042 | txt_drawf_small("D-PAD:NUDGE TRIGGER", x0 + 2, y0 + 1, color); |
2043 | } else if (key_pressed(KEY_SELECT)) { | ||
2044 | txt_drawf_small("SEL+B:COPY TRIG SEL+A:PASTE TRIG", x0 + 2, y0 + 1, color); | ||
2045 | } else { | ||
2046 | txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); | ||
2047 | } | ||
2048 | } else if (input_handler == handle_channel_selection) { | ||
2049 | if (key_pressed(KEY_SELECT)) { | ||
2050 | txt_drawf_small("SEL+B:COPY CHANNEL SEL+A:PASTE CHANNEL", x0 + 2, y0 + 1, color); | ||
2051 | } else { | ||
2052 | txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); | ||
2053 | } | ||
2021 | } else if (input_handler == handle_param_selection_sq1 || | 2054 | } else if (input_handler == handle_param_selection_sq1 || |
2022 | input_handler == handle_param_selection_sq2 || | 2055 | input_handler == handle_param_selection_sq2 || |
2023 | input_handler == handle_param_selection_wave || | 2056 | input_handler == handle_param_selection_wave || |
2024 | input_handler == handle_param_selection_noise) { | 2057 | input_handler == handle_param_selection_noise) { |
2025 | txt_drawf_small("L/R:ADJUST SELECT:COPY", x0 + 2, y0 + 1, color); | 2058 | txt_drawf_small("L/R:ADJUST SELECT:COPY PARAMETERS", x0 + 2, y0 + 1, color); |
2026 | } else if (input_handler == handle_pattern_selection) { | 2059 | } else if (input_handler == handle_pattern_selection) { |
2027 | txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE SEL+L+R:CLEAR", x0 + 2, y0 + 1, color); | 2060 | if (key_pressed(KEY_SELECT)) { |
2061 | txt_drawf_small("SEL+B:COPY PATTERN SEL+A:PASTE PATTERN", x0 + 2, y0 + 1, color); | ||
2062 | } else { | ||
2063 | txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE SEL+L+R:CLEAR", x0 + 2, y0 + 1, color); | ||
2064 | } | ||
2028 | } else if (input_handler == handle_pattern_chain) { | 2065 | } else if (input_handler == handle_pattern_chain) { |
2029 | switch (param_selection_loc) { | 2066 | switch (param_selection_loc) { |
2030 | case CHAIN_BTN_ENABLE: { | 2067 | case CHAIN_BTN_ENABLE: { |
@@ -2051,11 +2088,30 @@ draw_notif_bar() { | |||
2051 | txt_drawf_small("B:PAUSE", x0 + 2, y0 + 1, color); | 2088 | txt_drawf_small("B:PAUSE", x0 + 2, y0 + 1, color); |
2052 | } | 2089 | } |
2053 | } else if (right_col_selection_loc == R_COL_BPM) { | 2090 | } else if (right_col_selection_loc == R_COL_BPM) { |
2054 | txt_drawf_small("L/R:TEMPO (1) SEL+L/R:TEMPO (10)", x0 + 2, y0 + 1, color); | 2091 | if (key_pressed(KEY_SELECT)) { |
2092 | int bpm; | ||
2093 | if (settings.global_bpm) { | ||
2094 | bpm = settings.bpm; | ||
2095 | } else { | ||
2096 | bpm = patterns[pattern_selection_loc].bpm; | ||
2097 | } | ||
2098 | txt_drawf_small("TEMPO: %d bpm", x0 + 2, y0 + 1, color, bpm); | ||
2099 | } else { | ||
2100 | txt_drawf_small("L/R:TEMPO (+1) SEL+L/R:TEMPO (+10)", x0 + 2, y0 + 1, color); | ||
2101 | } | ||
2055 | } else if (right_col_selection_loc == R_COL_SETTINGS) { | 2102 | } else if (right_col_selection_loc == R_COL_SETTINGS) { |
2056 | txt_drawf_small("B:SETTINGS", x0 + 2, y0 + 1, color); | 2103 | txt_drawf_small("B:SETTINGS", x0 + 2, y0 + 1, color); |
2057 | } else if (right_col_selection_loc == R_COL_SCALE) { | 2104 | } else if (right_col_selection_loc == R_COL_SCALE) { |
2058 | txt_drawf_small("L/R:SCALE SEL+L/R:ROOT NOTE", x0 + 2, y0 + 1, color); | 2105 | if (key_pressed(KEY_SELECT)) { |
2106 | const char *roots[12] = { | ||
2107 | "C ", "C#", "D ", "D#", "E ", "F ", | ||
2108 | "F#", "G ", "G#", "A ", "A#", "B ", | ||
2109 | }; | ||
2110 | txt_drawf_small("ROOT: %s SCALE: %s", x0 + 2, y0 + 1, color, | ||
2111 | roots[current_scale_root], scale_long[current_scale]); | ||
2112 | } else { | ||
2113 | txt_drawf_small("L/R:SCALE SEL+L/R:ROOT NOTE", x0 + 2, y0 + 1, color); | ||
2114 | } | ||
2059 | } else if (right_col_selection_loc == R_COL_BANK_A || | 2115 | } else if (right_col_selection_loc == R_COL_BANK_A || |
2060 | right_col_selection_loc == R_COL_BANK_B || | 2116 | right_col_selection_loc == R_COL_BANK_B || |
2061 | right_col_selection_loc == R_COL_BANK_C || | 2117 | right_col_selection_loc == R_COL_BANK_C || |
@@ -2113,32 +2169,10 @@ draw_notif_bar() { | |||
2113 | return; | 2169 | return; |
2114 | } | 2170 | } |
2115 | 2171 | ||
2116 | if (chain.len != 0 && chain.enabled) { | 2172 | if (play_status == 0) { |
2117 | u8 x = x0 + 2; | 2173 | txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color); |
2118 | u8 y = y0 + 1; | ||
2119 | txt_drawf_small("CHAIN: ", x, y, color); | ||
2120 | x += 4 * 7; | ||
2121 | bool first = true; | ||
2122 | for (size_t i = 0, k = 0; i < MAX_CHAIN; i++) { | ||
2123 | if (chain.active[i] != 1) { | ||
2124 | continue; | ||
2125 | } | ||
2126 | if (!first) { | ||
2127 | txt_drawc_small('-', x + 4 * k++, y, COL_FG); | ||
2128 | } | ||
2129 | u8 color = COL_FG; | ||
2130 | if (i == chain.current) { | ||
2131 | color = COL_ACC_2; | ||
2132 | } | ||
2133 | txt_drawc_small('A' + chain.chain[i], x + 4 * k++, y, color); | ||
2134 | first = false; | ||
2135 | } | ||
2136 | } else { | 2174 | } else { |
2137 | if (play_status == 0) { | 2175 | txt_drawf_small("PLAYING", x0 + 2, y0 + 1, color); |
2138 | txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color); | ||
2139 | } else { | ||
2140 | txt_drawf_small("PLAYING", x0 + 2, y0 + 1, color); | ||
2141 | } | ||
2142 | } | 2176 | } |
2143 | } | 2177 | } |
2144 | } | 2178 | } |
@@ -34,15 +34,13 @@ WITH REGARD TO THIS SOFTWARE. | |||
34 | // + Make sure Attack/Decay are grey for A+B | 34 | // + Make sure Attack/Decay are grey for A+B |
35 | // + Add help for attack/decay on ch3 | 35 | // + Add help for attack/decay on ch3 |
36 | // + Bad performance when selecting patterns? | 36 | // + Bad performance when selecting patterns? |
37 | // + Make sure the chain is always shown on the notification bar if playing | ||
38 | // + Add more sync in/out options | ||
39 | // + Add more help hints when holding SEL | ||
37 | // - Fix any bugs we currently have | 40 | // - Fix any bugs we currently have |
38 | // - Add clipboard sharing between banks. | 41 | // - Add clipboard sharing between banks. |
39 | // - Make sure transposing a sequence past the keyboard limit doesn't affect | ||
40 | // the sequence and can be reversed. | ||
41 | // - Study saving overhauls for bootleg cartridges. | 42 | // - Study saving overhauls for bootleg cartridges. |
42 | // - When putting a new trigger, make sure it uses the global parameters | ||
43 | // - Improve memcpy32 performance (ASM?). We use it a lot in expensive places. | ||
44 | // - Add tap tempo for BPM. | 43 | // - Add tap tempo for BPM. |
45 | // - Improve drawing routines even more (ASM?). | ||
46 | // - Improve interrupt handler to allow nesting/prioritization. | 44 | // - Improve interrupt handler to allow nesting/prioritization. |
47 | // | 45 | // |
48 | 46 | ||
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) { | |||
1675 | 1675 | ||
1676 | static bool nudge = false; | 1676 | static bool nudge = false; |
1677 | bool empty = patterns[pattern_selection_loc].empty; | 1677 | bool empty = patterns[pattern_selection_loc].empty; |
1678 | if (key_hold(KEY_B)) { | 1678 | if (key_pressed(KEY_B) && ctrl.key_b > 10) { |
1679 | nudge = true; | ||
1679 | } else if (key_released(KEY_B)) { | 1680 | } else if (key_released(KEY_B)) { |
1680 | if (nudge) { | 1681 | if (nudge) { |
1681 | nudge = false; | 1682 | nudge = false; |