diff options
author | Bad Diode <bd@badd10de.dev> | 2023-05-28 09:27:03 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-05-28 09:27:03 +0200 |
commit | af68ac1e1bb77fd821e042d2c8ea9a159c970d20 (patch) | |
tree | dbe9ed56d0a846c1c79db3c39e9e6f9655be6821 /src/sequencer.c | |
parent | aa3db2f8c3af8163a707a87cd946c2a30070ced4 (diff) | |
download | stepper-af68ac1e1bb77fd821e042d2c8ea9a159c970d20.tar.gz stepper-af68ac1e1bb77fd821e042d2c8ea9a159c970d20.zip |
Fix bug for pattern chaining
Diffstat (limited to 'src/sequencer.c')
-rw-r--r-- | src/sequencer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sequencer.c b/src/sequencer.c index 65a2f46..6aa8eea 100644 --- a/src/sequencer.c +++ b/src/sequencer.c | |||
@@ -21,12 +21,12 @@ bool update_bpm = false; | |||
21 | 21 | ||
22 | void | 22 | void |
23 | play_step(void) { | 23 | play_step(void) { |
24 | Pattern *pat = &patterns[current_pattern]; | ||
24 | if (current_pattern != next_pattern && step_counter == 15) { | 25 | if (current_pattern != next_pattern && step_counter == 15) { |
25 | current_pattern = next_pattern; | 26 | current_pattern = next_pattern; |
26 | redraw_pattern_buttons = true; | 27 | redraw_pattern_buttons = true; |
27 | update_bpm = true; | 28 | update_bpm = true; |
28 | } | 29 | } |
29 | Pattern *pat = &patterns[current_pattern]; | ||
30 | if (pat->ch1.active) { | 30 | if (pat->ch1.active) { |
31 | TriggerNote *trig = &pat->ch1.notes[step_counter]; | 31 | TriggerNote *trig = &pat->ch1.notes[step_counter]; |
32 | ChannelSquareParams *params = &pat->ch1.params[step_counter]; | 32 | ChannelSquareParams *params = &pat->ch1.params[step_counter]; |