|
|
|
@ -50,7 +50,7 @@ void seq_live_recording(void) |
|
|
|
|
//record to sequencer if sequencer menu is active and recording is active
|
|
|
|
|
if (seq.note_in > 0 && seq.recording == true && LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_seq_pattern_editor)) |
|
|
|
|
{ |
|
|
|
|
seq.data[seq.active_track][seq.step] = seq.note_in; |
|
|
|
|
seq.note_data[seq.active_track][seq.step] = seq.note_in; |
|
|
|
|
if ( get_sample_note(activesample) > 209 ) // pitched sample
|
|
|
|
|
{ |
|
|
|
|
seq.vel[seq.active_track][seq.step] = get_sample_note(activesample); |
|
|
|
@ -65,8 +65,8 @@ void seq_live_recording(void) |
|
|
|
|
void sequencer_part1(void) |
|
|
|
|
{ |
|
|
|
|
//if (seq.note_in > 0 && seq.note_in < 62 && seq.recording == false ) {
|
|
|
|
|
//handleNoteOff(configuration.dexed[0].midi_channel, seq.data[3][seq.step] + seq.transpose , 0);
|
|
|
|
|
//handleNoteOff(configuration.dexed[0].midi_channel, seq.data[3][seq.step - 1] + seq.transpose , 0);
|
|
|
|
|
//handleNoteOff(configuration.dexed[0].midi_channel, seq.note_data[3][seq.step] + seq.transpose , 0);
|
|
|
|
|
//handleNoteOff(configuration.dexed[0].midi_channel, seq.note_data[3][seq.step - 1] + seq.transpose , 0);
|
|
|
|
|
//if (seq.note_in>65)seq.note_in=seq.note_in-12;
|
|
|
|
|
//seq.transpose = seq.note_in % 12 ;
|
|
|
|
|
//seq.transpose=seq.transpose-12;
|
|
|
|
@ -80,27 +80,27 @@ void sequencer_part1(void) |
|
|
|
|
{ |
|
|
|
|
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 ) |
|
|
|
|
if (seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] > 0 ) |
|
|
|
|
{ |
|
|
|
|
if (seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] > 209) // it is a pitched sample
|
|
|
|
|
{ |
|
|
|
|
// Drum[slot]->setPlaybackRate( pow (2, (inNote - 72) / 12.00) * drum_config[sample].pitch ); get_sample_vol_max(sample)
|
|
|
|
|
set_sample_pitch(seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 210 , (float)pow (2, (seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 72) / 12.00) * get_sample_p_offset( seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 210 ) ); |
|
|
|
|
set_sample_pitch(seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 210 , (float)pow (2, (seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 72) / 12.00) * get_sample_p_offset( seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 210 ) ); |
|
|
|
|
handleNoteOn(drum_midi_channel, seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] , 90 ); |
|
|
|
|
} |
|
|
|
|
else // else play normal drum sample
|
|
|
|
|
handleNoteOn(drum_midi_channel, seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] , seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]); |
|
|
|
|
handleNoteOn(drum_midi_channel, seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] , seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
if (seq.data[seq.patternchain[seq.chain_active_step][d]][seq.step] > 0 ) // instrument track
|
|
|
|
|
if (seq.note_data[seq.patternchain[seq.chain_active_step][d]][seq.step] > 0 ) // instrument track
|
|
|
|
|
{ |
|
|
|
|
if (seq.track_type[d] == 1 || (seq.track_type[d] == 3 && seq.arp_play_basenote) ) |
|
|
|
|
{ |
|
|
|
|
if (seq.data[seq.patternchain[seq.chain_active_step][d]][seq.step] != 130 ) |
|
|
|
|
if (seq.note_data[seq.patternchain[seq.chain_active_step][d]][seq.step] != 130 ) |
|
|
|
|
{ |
|
|
|
|
handleNoteOn(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step], seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]); |
|
|
|
|
seq.prev_note[d] = seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step]; |
|
|
|
|
handleNoteOn(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step], seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]); |
|
|
|
|
seq.prev_note[d] = seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step]; |
|
|
|
|
seq.prev_vel[d] = seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -109,20 +109,20 @@ void sequencer_part1(void) |
|
|
|
|
if (seq.vel[ seq.patternchain[seq.chain_active_step][d]][seq.step] > 199) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
//handleNoteOn(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step], seq.chord_velocity); // basenote
|
|
|
|
|
//handleNoteOn(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step], seq.chord_velocity); // basenote
|
|
|
|
|
|
|
|
|
|
for (uint8_t x = seq.element_shift; x < seq.element_shift + seq.chord_key_ammount; x++) //play chord notes
|
|
|
|
|
{ |
|
|
|
|
handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] + (seq.oct_shift * 12) + seq.arps[seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 200][x], seq.chord_velocity); |
|
|
|
|
handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] + (seq.oct_shift * 12) + seq.arps[seq.vel[ seq.patternchain[seq.chain_active_step][d] ][seq.step] - 200][x], seq.chord_velocity); |
|
|
|
|
} |
|
|
|
|
seq.prev_note[d] = seq.data[seq.patternchain[seq.chain_active_step][d]][seq.step] + (seq.oct_shift * 12); |
|
|
|
|
seq.prev_note[d] = seq.note_data[seq.patternchain[seq.chain_active_step][d]][seq.step] + (seq.oct_shift * 12); |
|
|
|
|
seq.prev_vel[d] = seq.vel[seq.patternchain[seq.chain_active_step][d]][seq.step]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (seq.track_type[d] == 3) { //Arp
|
|
|
|
|
seq.arp_step = 0; |
|
|
|
|
seq.arp_counter = 0; |
|
|
|
|
seq.arp_note = seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] + (seq.oct_shift * 12); |
|
|
|
|
seq.arp_note = seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] + (seq.oct_shift * 12); |
|
|
|
|
seq.arp_chord = seq.vel[seq.patternchain[seq.chain_active_step][d] ][seq.step] - 200; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -218,7 +218,7 @@ void sequencer_part2(void) |
|
|
|
|
if (seq.noteoffsent[d] == false) { |
|
|
|
|
if ( seq.prev_note[d] > 0 && seq.track_type[d] > 0) |
|
|
|
|
{ |
|
|
|
|
if (seq.data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] != 130) |
|
|
|
|
if (seq.note_data[ seq.patternchain[seq.chain_active_step][d] ][seq.step] != 130) |
|
|
|
|
{ |
|
|
|
|
handleNoteOff(configuration.dexed[seq.inst_dexed[d]].midi_channel, seq.prev_note[d] , 0); |
|
|
|
|
seq.noteoffsent[d] = true; |
|
|
|
|