diff --git a/sequencer.cpp b/sequencer.cpp index de695aa..c6eaeac 100644 --- a/sequencer.cpp +++ b/sequencer.cpp @@ -37,7 +37,7 @@ void sequencer_part1(void) seq_note_in_velocity = 0; } - for (uint8_t d = 0; d < 4; d++) + for (uint8_t d = 0; d < NUM_SEQ_TRACKS; d++) { if ( seq_track_type[d] == 0) { // drum track (drum samples and pitched one-shot samples) if (seq_data[ seq_patternchain[seq_chain_active_step][d] ][seq_step] > 0 ) @@ -171,7 +171,7 @@ void sequencer_part1(void) void sequencer_part2(void) { - for (uint8_t d = 0; d < 4; d++) + for (uint8_t d = 0; d < NUM_SEQ_TRACKS; d++) { if (seq_noteoffsent[d] == false) { if ( seq_prev_note[d] > 0 && seq_track_type[d] > 0) diff --git a/sequencer.h b/sequencer.h index b4b8d3a..7d37bf5 100644 --- a/sequencer.h +++ b/sequencer.h @@ -14,7 +14,7 @@ char seq_name_temp[FILENAME_LEN]; uint8_t seq_note_in; uint8_t seq_note_in_velocity; int seq_transpose; -uint8_t seq_inst_dexed[4] = { 0, 0, 1, 1 }; +uint8_t seq_inst_dexed[NUM_SEQ_TRACKS] = { 0, 0, 1, 1 }; uint8_t seq_chord_dexed_inst = 0; uint8_t seq_chord_velocity = 60; uint8_t seq_chord_key_ammount = 4; @@ -52,8 +52,8 @@ uint8_t seq_temp_active_menu = 99; uint8_t seq_chain_active_chainstep; uint8_t seq_chain_lenght = 3; // 0 = 16 steps, 1 = 32 Steps, 2 = 46 Steps, 3 = 64 Steps uint8_t seq_chain_active_step = 0; -uint8_t seq_prev_note[4]; // note_offs for every (instr.) track -uint8_t seq_prev_vel[4]; +uint8_t seq_prev_note[NUM_SEQ_TRACKS]; // note_offs for every (instr.) track +uint8_t seq_prev_vel[NUM_SEQ_TRACKS]; uint8_t arp_step; uint8_t arp_note; uint8_t arp_chord = 6; @@ -64,7 +64,7 @@ uint8_t arp_prev_oct; uint8_t arp_speed = 0; uint8_t arp_counter = 0; uint8_t arp_lenght = 8; -uint8_t seq_data[10][16] = {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , +uint8_t seq_data[NUM_SEQ_PATTERN][16] = {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , @@ -75,7 +75,7 @@ uint8_t seq_data[10][16] = {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }; -uint8_t seq_vel[10][16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +uint8_t seq_vel[NUM_SEQ_PATTERN][16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -132,13 +132,10 @@ uint8_t seq_vel[10][16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 123, 120, 0, 110, 120, 0, 90, 120, 0, 0, 0, 0, 0, 0, 0, 0 // }; -uint8_t seq_patternchain[4][4] = { 0 , 2 , 6 , 9 , +uint8_t seq_patternchain[NUM_SEQ_TRACKS][4] = { 0 , 2 , 6 , 9 , 1 , 2 , 5 , 8 , 0 , 2 , 6 , 9 , 1 , 2 , 5 , 7 }; -uint8_t seq_content_type[10] = { 0, 0, 0, 0 , 0, 0, 0 , 0 , 0 , 0 }; // 0 = track is Drumtrack, 1= Instrumenttrack, 2= Chord or Arpeggio -uint8_t seq_track_type[4] = { 0, 0, 0, 0 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp - -//uint8_t seq_content_type[10] = { 0, 0, 0, 0 , 2, 2, 1 , 1 , 1 , 1 }; // 0 = track is Drumtrack, 1= Instrumenttrack, 2= Chord or Arpeggio -//uint8_t seq_track_type[4] = { 0, 0, 3, 1 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp +uint8_t seq_content_type[NUM_SEQ_PATTERN] = { 0, 0, 0, 0 , 0, 0, 0 , 0 , 0 , 0 }; // 0 = track is Drumtrack, 1= Instrumenttrack, 2= Chord or Arpeggio +uint8_t seq_track_type[NUM_SEQ_TRACKS] = { 0, 0, 0, 0 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp