summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-04 21:44:06 +0200
committerBad Diode <bd@badd10de.dev>2021-05-04 21:44:06 +0200
commite1c4894a016682aed8a0fbd3837711c6f2781876 (patch)
tree3423429eb4e1224737fbcfe3de2299fecc0949c5
parent59966e7639c4ad3ffdd6dc3566e1b5aae003e3cd (diff)
downloadgba-experiments-e1c4894a016682aed8a0fbd3837711c6f2781876.tar.gz
gba-experiments-e1c4894a016682aed8a0fbd3837711c6f2781876.zip
Fix minor inconsistencies
-rw-r--r--src/sequencer.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/sequencer.c b/src/sequencer.c
index 6837b1e..f4006c4 100644
--- a/src/sequencer.c
+++ b/src/sequencer.c
@@ -323,6 +323,11 @@ static SeqTrigger sequences[2][16] = {
323// well or the note/duration. 323// well or the note/duration.
324// TODO: Allow muting and unmuting channels. Show in grey when muted. 324// TODO: Allow muting and unmuting channels. Show in grey when muted.
325// TODO: Show channel beat indicator if a note is being played. 325// TODO: Show channel beat indicator if a note is being played.
326// TODO: Parameters should change depending on the selected channel. For
327// example, we may want to hide the sweep parameters for synth 2.
328// TODO: Research a way of having pattern chains.
329// TODO: Enable control on channels 3-4.
330// TODO: Study how to save patterns and chains.
326 331
327static int bpm = 115; 332static int bpm = 115;
328static int step_counter = 0; 333static int step_counter = 0;
@@ -390,6 +395,7 @@ set_time(int bpm) {
390// - Env: Time text: 8x4 tiles 395// - Env: Time text: 8x4 tiles
391// - Env: Direction label: 4 tiles. 396// - Env: Direction label: 4 tiles.
392// - Env: Direction text: 2x4 tiles 397// - Env: Direction text: 2x4 tiles
398// TODO: Update from sweep onwards.
393// 399//
394// The order of OBJs correspond to: 400// The order of OBJs correspond to:
395// 401//
@@ -939,9 +945,7 @@ handle_sequencer_input(void) {
939 trig_selection_loc = CLAMP(trig_selection_loc - 1, 0, 15); 945 trig_selection_loc = CLAMP(trig_selection_loc - 1, 0, 15);
940 } 946 }
941 } else if (key_pressed(KEY_RIGHT)) { 947 } else if (key_pressed(KEY_RIGHT)) {
942 if (trig_selection_loc == 15) { 948 if (trig_selection_loc != 7) {
943 trig_selection_loc = 0;
944 } else {
945 trig_selection_loc = CLAMP(trig_selection_loc + 1, 0, 15); 949 trig_selection_loc = CLAMP(trig_selection_loc + 1, 0, 15);
946 } 950 }
947 } else if (key_pressed(KEY_UP) || key_pressed(KEY_DOWN)) { 951 } else if (key_pressed(KEY_UP) || key_pressed(KEY_DOWN)) {
@@ -1059,16 +1063,16 @@ handle_sequencer_input(void) {
1059 } 1063 }
1060 if (key_pressed(KEY_UP)) { 1064 if (key_pressed(KEY_UP)) {
1061 if (channel_selection_loc == 0) { 1065 if (channel_selection_loc == 0) {
1062 channel_selection_loc = 3; 1066 channel_selection_loc = SEQ_N_CHANNELS - 1;
1063 } else { 1067 } else {
1064 channel_selection_loc = CLAMP(channel_selection_loc - 1, 0, 6); 1068 channel_selection_loc = CLAMP(channel_selection_loc - 1, 0, SEQ_N_CHANNELS);
1065 } 1069 }
1066 } 1070 }
1067 if (key_pressed(KEY_DOWN)) { 1071 if (key_pressed(KEY_DOWN)) {
1068 if (channel_selection_loc == 3) { 1072 if (channel_selection_loc == SEQ_N_CHANNELS - 1) {
1069 channel_selection_loc = 0; 1073 channel_selection_loc = 0;
1070 } else { 1074 } else {
1071 channel_selection_loc = CLAMP(channel_selection_loc + 1, 0, 6); 1075 channel_selection_loc = CLAMP(channel_selection_loc + 1, 0, SEQ_N_CHANNELS);
1072 } 1076 }
1073 } 1077 }
1074 } 1078 }