diff options
author | Bad Diode <bd@badd10de.dev> | 2023-09-08 14:45:46 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-09-08 14:45:46 +0200 |
commit | 7f42a1877cdfc4af394942b6ca8131e4ee8fa898 (patch) | |
tree | e3e8565fe3a32c92d117f9c9433ae5ab6cc74811 /src | |
parent | 004e84fd5ed8943f6058dc31690bb3af61d27574 (diff) | |
download | stepper-7f42a1877cdfc4af394942b6ca8131e4ee8fa898.tar.gz stepper-7f42a1877cdfc4af394942b6ca8131e4ee8fa898.zip |
Add wraparound for patterns and more help strings
Diffstat (limited to 'src')
-rw-r--r-- | src/drawing.c | 36 | ||||
-rw-r--r-- | src/main.c | 12 | ||||
-rw-r--r-- | 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() { | |||
1719 | if (settings.help == TOGGLE_ON) { | 1719 | if (settings.help == TOGGLE_ON) { |
1720 | if (input_handler == handle_trigger_selection || | 1720 | if (input_handler == handle_trigger_selection || |
1721 | input_handler == handle_channel_selection) { | 1721 | input_handler == handle_channel_selection) { |
1722 | txt_drawf_small("L/R:NOTE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); | 1722 | txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); |
1723 | } else if (input_handler == handle_param_selection_sq1 || | 1723 | } else if (input_handler == handle_param_selection_sq1 || |
1724 | input_handler == handle_param_selection_sq2 || | 1724 | input_handler == handle_param_selection_sq2 || |
1725 | input_handler == handle_param_selection_wave || | 1725 | input_handler == handle_param_selection_wave || |
1726 | input_handler == handle_param_selection_noise) { | 1726 | input_handler == handle_param_selection_noise) { |
1727 | txt_drawf_small("L/R:ADJUST SELECT:COPY", x0 + 2, y0 + 1, color); | 1727 | txt_drawf_small("L/R:ADJUST SELECT:COPY", x0 + 2, y0 + 1, color); |
1728 | } else if (input_handler == handle_pattern_selection) { | 1728 | } else if (input_handler == handle_pattern_selection) { |
1729 | txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE", x0 + 2, y0 + 1, color); | 1729 | txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE SEL+L/R:CLEAR", x0 + 2, y0 + 1, color); |
1730 | } else if (input_handler == handle_pattern_chain) { | ||
1731 | switch (param_selection_loc) { | ||
1732 | case CHAIN_BTN_ENABLE: { | ||
1733 | txt_drawf_small("A:BACK B:TOGGLE CHAIN", x0 + 2, y0 + 1, color); | ||
1734 | } break; | ||
1735 | case CHAIN_BTN_CLEAR: { | ||
1736 | txt_drawf_small("A:BACK B:CLEAR CHAIN", x0 + 2, y0 + 1, color); | ||
1737 | } break; | ||
1738 | case CHAIN_BTN_RANDOM: { | ||
1739 | txt_drawf_small("A:BACK B:RANDOMIZE CHAIN", x0 + 2, y0 + 1, color); | ||
1740 | } break; | ||
1741 | default: { | ||
1742 | txt_drawf_small("L/R:CHANGE PATTERN A:BACK B:TOGGLE STEP", x0 + 2, y0 + 1, color); | ||
1743 | } break; | ||
1744 | } | ||
1745 | |||
1730 | } else if (input_handler == handle_right_col_selection) { | 1746 | } else if (input_handler == handle_right_col_selection) { |
1731 | if (right_col_selection_loc == R_COL_STOP) { | 1747 | if (right_col_selection_loc == R_COL_STOP) { |
1732 | txt_drawf_small("B:STOP", x0 + 2, y0 + 1, color); | 1748 | txt_drawf_small("B:STOP", x0 + 2, y0 + 1, color); |
@@ -1737,14 +1753,22 @@ draw_notif_bar() { | |||
1737 | txt_drawf_small("B:PAUSE", x0 + 2, y0 + 1, color); | 1753 | txt_drawf_small("B:PAUSE", x0 + 2, y0 + 1, color); |
1738 | } | 1754 | } |
1739 | } else if (right_col_selection_loc == R_COL_BPM) { | 1755 | } else if (right_col_selection_loc == R_COL_BPM) { |
1740 | txt_drawf_small("L/R:TEMPO", x0 + 2, y0 + 1, color); | 1756 | txt_drawf_small("L/R:TEMPO (1) SEL+L/R:TEMPO (10)", x0 + 2, y0 + 1, color); |
1741 | } else if (right_col_selection_loc == R_COL_SETTINGS) { | 1757 | } else if (right_col_selection_loc == R_COL_SETTINGS) { |
1742 | txt_drawf_small("B:SETTINGS", x0 + 2, y0 + 1, color); | 1758 | txt_drawf_small("B:SETTINGS", x0 + 2, y0 + 1, color); |
1759 | } else if (right_col_selection_loc == R_COL_SCALE) { | ||
1760 | txt_drawf_small("L/R:SCALE SEL+L/R:ROOT NOTE", x0 + 2, y0 + 1, color); | ||
1743 | } else if (right_col_selection_loc == R_COL_BANK_A || | 1761 | } else if (right_col_selection_loc == R_COL_BANK_A || |
1744 | right_col_selection_loc == R_COL_BANK_B || | 1762 | right_col_selection_loc == R_COL_BANK_B || |
1745 | right_col_selection_loc == R_COL_BANK_C || | 1763 | right_col_selection_loc == R_COL_BANK_C || |
1746 | right_col_selection_loc == R_COL_BANK_D) { | 1764 | right_col_selection_loc == R_COL_BANK_D || |
1747 | txt_drawf_small("B:SAVE CURRENT BANK AND SWITCH", x0 + 2, y0 + 1, color); | 1765 | right_col_selection_loc == R_COL_BANK_E || |
1766 | right_col_selection_loc == R_COL_BANK_F) { | ||
1767 | if (settings.auto_save) { | ||
1768 | txt_drawf_small("B:SAVE CURRENT BANK AND SWITCH", x0 + 2, y0 + 1, color); | ||
1769 | } else { | ||
1770 | txt_drawf_small("B:SWITCH BANK", x0 + 2, y0 + 1, color); | ||
1771 | } | ||
1748 | } | 1772 | } |
1749 | } | 1773 | } |
1750 | return; | 1774 | return; |
@@ -75,15 +75,15 @@ WITH REGARD TO THIS SOFTWARE. | |||
75 | // a pattern to start chain. | 75 | // a pattern to start chain. |
76 | // + Random chain just places A- doesn’t check if which patterns have content | 76 | // + Random chain just places A- doesn’t check if which patterns have content |
77 | // in bank for random placement. | 77 | // in bank for random placement. |
78 | // + Add help for scale parameters and banks E/F (consider auto-save settings | ||
79 | // for notification) | ||
80 | // + Default should be help is on | ||
81 | // + Cursor on bank can wrap around (up/down) but the same can't be done on | ||
82 | // patterns. | ||
83 | // + Add help for pattern chain | ||
78 | // - Add CREDITS to the documentation for now, should probably be a menu item | 84 | // - Add CREDITS to the documentation for now, should probably be a menu item |
79 | // later. | 85 | // later. |
80 | // - Make sure sync works with the same cable for in/out. | 86 | // - Make sure sync works with the same cable for in/out. |
81 | // - Add help for scale parameters and banks E/F (consider auto-save settings | ||
82 | // for notification) | ||
83 | // - Add help for pattern chain | ||
84 | // - Default should be help is on | ||
85 | // - Cursor on bank can wrap around (up/down) but the same can't be done on | ||
86 | // patterns. | ||
87 | 87 | ||
88 | #include "gba/gba.h" | 88 | #include "gba/gba.h" |
89 | 89 | ||
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) { | |||
938 | } else if (key_tap(KEY_UP)) { | 938 | } else if (key_tap(KEY_UP)) { |
939 | if (pattern_selection_loc > 0) { | 939 | if (pattern_selection_loc > 0) { |
940 | pattern_selection_loc = pattern_selection_loc - 1; | 940 | pattern_selection_loc = pattern_selection_loc - 1; |
941 | redraw_channels = true; | 941 | } else { |
942 | redraw_trigs = true; | 942 | pattern_selection_loc = 7; |
943 | redraw_bpm = true; | ||
944 | } | 943 | } |
944 | redraw_channels = true; | ||
945 | redraw_trigs = true; | ||
946 | redraw_bpm = true; | ||
945 | } else if (key_tap(KEY_DOWN)) { | 947 | } else if (key_tap(KEY_DOWN)) { |
946 | if (pattern_selection_loc < 7) { | 948 | if (pattern_selection_loc < 7) { |
947 | pattern_selection_loc = pattern_selection_loc + 1; | 949 | pattern_selection_loc = pattern_selection_loc + 1; |
948 | redraw_channels = true; | 950 | } else { |
949 | redraw_trigs = true; | 951 | pattern_selection_loc = 0; |
950 | redraw_bpm = true; | ||
951 | } | 952 | } |
953 | redraw_channels = true; | ||
954 | redraw_trigs = true; | ||
955 | redraw_bpm = true; | ||
952 | } | 956 | } |
953 | if (key_tap(KEY_LEFT)) { | 957 | if (key_tap(KEY_LEFT)) { |
954 | redraw_params = true; | 958 | redraw_params = true; |