From e1c4894a016682aed8a0fbd3837711c6f2781876 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Tue, 4 May 2021 21:44:06 +0200 Subject: Fix minor inconsistencies --- src/sequencer.c | 18 +++++++++++------- 1 file 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] = { // well or the note/duration. // TODO: Allow muting and unmuting channels. Show in grey when muted. // TODO: Show channel beat indicator if a note is being played. +// TODO: Parameters should change depending on the selected channel. For +// example, we may want to hide the sweep parameters for synth 2. +// TODO: Research a way of having pattern chains. +// TODO: Enable control on channels 3-4. +// TODO: Study how to save patterns and chains. static int bpm = 115; static int step_counter = 0; @@ -390,6 +395,7 @@ set_time(int bpm) { // - Env: Time text: 8x4 tiles // - Env: Direction label: 4 tiles. // - Env: Direction text: 2x4 tiles +// TODO: Update from sweep onwards. // // The order of OBJs correspond to: // @@ -939,9 +945,7 @@ handle_sequencer_input(void) { trig_selection_loc = CLAMP(trig_selection_loc - 1, 0, 15); } } else if (key_pressed(KEY_RIGHT)) { - if (trig_selection_loc == 15) { - trig_selection_loc = 0; - } else { + if (trig_selection_loc != 7) { trig_selection_loc = CLAMP(trig_selection_loc + 1, 0, 15); } } else if (key_pressed(KEY_UP) || key_pressed(KEY_DOWN)) { @@ -1059,16 +1063,16 @@ handle_sequencer_input(void) { } if (key_pressed(KEY_UP)) { if (channel_selection_loc == 0) { - channel_selection_loc = 3; + channel_selection_loc = SEQ_N_CHANNELS - 1; } else { - channel_selection_loc = CLAMP(channel_selection_loc - 1, 0, 6); + channel_selection_loc = CLAMP(channel_selection_loc - 1, 0, SEQ_N_CHANNELS); } } if (key_pressed(KEY_DOWN)) { - if (channel_selection_loc == 3) { + if (channel_selection_loc == SEQ_N_CHANNELS - 1) { channel_selection_loc = 0; } else { - channel_selection_loc = CLAMP(channel_selection_loc + 1, 0, 6); + channel_selection_loc = CLAMP(channel_selection_loc + 1, 0, SEQ_N_CHANNELS); } } } -- cgit v1.2.1