Merge pull request 'fixed small merge problem in UI_FX and one missing line in UI.hpp' (#76) from positionhigh/MicroDexed:dev into dev

Reviewed-on: https://codeberg.org/dcoredump/MicroDexed/pulls/76
pull/77/head
Holger Wirtz 3 years ago
commit f48325e0ef
  1. 2
      UI.hpp
  2. 60
      UI_FX.h
  3. 39
      dexed_sd.cpp
  4. 43
      sequencer.cpp
  5. 29
      sequencer.h

@ -5057,7 +5057,7 @@ void UI_func_arpeggio(uint8_t param)
}
}
lcd.setCursor( 4, 0);
lcd.print(arp_lenght);
if (arp_lenght==0) lcd.print("A");else lcd.print(arp_lenght); //play all elements or from 1-xx elements
lcd.setCursor( 6, 1);
lcd.print( arp_style_names[arp_style][0] );
lcd.print( arp_style_names[arp_style][1] );

@ -61,36 +61,36 @@ LCDML_add(27, LCDML_0_1_2_3_5, 4, "1000Hz", UI_func_eq_4);
LCDML_add(28, LCDML_0_1_2_3_5, 5, "2000Hz", UI_func_eq_5);
LCDML_add(29, LCDML_0_1_2_3_5, 6, "7000Hz", UI_func_eq_6);
LCDML_add(30, LCDML_0_1_2_3_5, 7, "10000Hz", UI_func_eq_7);
LCDML_add(30, LCDML_0_1, 3, "Controller", NULL);
LCDML_add(31, LCDML_0_1_3, 1, "Pitchbend", NULL);
LCDML_add(32, LCDML_0_1_3_1, 1, "PB Range", UI_func_pb_range);
LCDML_add(33, LCDML_0_1_3_1, 2, "PB Step", UI_func_pb_step);
LCDML_add(34, LCDML_0_1_3, 2, "Mod Wheel", NULL);
LCDML_add(35, LCDML_0_1_3_2, 1, "MW Range", UI_func_mw_range);
LCDML_add(36, LCDML_0_1_3_2, 2, "MW Assign", UI_func_mw_assign);
LCDML_add(37, LCDML_0_1_3_2, 3, "MW Mode", UI_func_mw_mode);
LCDML_add(38, LCDML_0_1_3, 3, "Aftertouch", NULL);
LCDML_add(39, LCDML_0_1_3_3, 1, "AT Range", UI_func_at_range);
LCDML_add(40, LCDML_0_1_3_3, 2, "AT Assign", UI_func_at_assign);
LCDML_add(41, LCDML_0_1_3_3, 3, "AT Mode", UI_func_at_mode);
LCDML_add(42, LCDML_0_1_3, 4, "Foot Ctrl", NULL);
LCDML_add(43, LCDML_0_1_3_4, 1, "FC Range", UI_func_fc_range);
LCDML_add(44, LCDML_0_1_3_4, 2, "FC Assign", UI_func_fc_assign);
LCDML_add(45, LCDML_0_1_3_4, 3, "FC Mode", UI_func_fc_mode);
LCDML_add(46, LCDML_0_1_3, 5, "Breath Ctrl", NULL);
LCDML_add(47, LCDML_0_1_3_5, 1, "BC Range", UI_func_bc_range);
LCDML_add(48, LCDML_0_1_3_5, 2, "BC Assign", UI_func_bc_assign);
LCDML_add(49, LCDML_0_1_3_5, 3, "BC Mode", UI_func_bc_mode);
LCDML_add(50, LCDML_0_1, 4, "MIDI", NULL);
LCDML_add(51, LCDML_0_1_4, 1, "MIDI Channel", UI_func_midi_channel);
LCDML_add(52, LCDML_0_1_4, 2, "Lowest Note", UI_func_lowest_note);
LCDML_add(53, LCDML_0_1_4, 3, "Highest Note", UI_func_highest_note);
LCDML_add(54, LCDML_0_1_4, 4, "MIDI Send Voice", UI_func_sysex_send_voice);
LCDML_add(55, LCDML_0_1, 5, "Setup", NULL);
LCDML_add(56, LCDML_0_1_5, 1, "Portamento", NULL);
LCDML_add(57, LCDML_0_1_5_1, 1, "Port. Mode", UI_func_portamento_mode);
LCDML_add(58, LCDML_0_1_5_1, 2, "Port. Gliss", UI_func_portamento_glissando);
LCDML_add(59, LCDML_0_1_5_1, 3, "Port. Time", UI_func_portamento_time);
LCDML_add(31, LCDML_0_1, 3, "Controller", NULL);
LCDML_add(32, LCDML_0_1_3, 1, "Pitchbend", NULL);
LCDML_add(33, LCDML_0_1_3_1, 1, "PB Range", UI_func_pb_range);
LCDML_add(34, LCDML_0_1_3_1, 2, "PB Step", UI_func_pb_step);
LCDML_add(35, LCDML_0_1_3, 2, "Mod Wheel", NULL);
LCDML_add(36, LCDML_0_1_3_2, 1, "MW Range", UI_func_mw_range);
LCDML_add(37, LCDML_0_1_3_2, 2, "MW Assign", UI_func_mw_assign);
LCDML_add(38, LCDML_0_1_3_2, 3, "MW Mode", UI_func_mw_mode);
LCDML_add(39, LCDML_0_1_3, 3, "Aftertouch", NULL);
LCDML_add(40, LCDML_0_1_3_3, 1, "AT Range", UI_func_at_range);
LCDML_add(41, LCDML_0_1_3_3, 2, "AT Assign", UI_func_at_assign);
LCDML_add(42, LCDML_0_1_3_3, 3, "AT Mode", UI_func_at_mode);
LCDML_add(43, LCDML_0_1_3, 4, "Foot Ctrl", NULL);
LCDML_add(44, LCDML_0_1_3_4, 1, "FC Range", UI_func_fc_range);
LCDML_add(45, LCDML_0_1_3_4, 2, "FC Assign", UI_func_fc_assign);
LCDML_add(46, LCDML_0_1_3_4, 3, "FC Mode", UI_func_fc_mode);
LCDML_add(47, LCDML_0_1_3, 5, "Breath Ctrl", NULL);
LCDML_add(48, LCDML_0_1_3_5, 1, "BC Range", UI_func_bc_range);
LCDML_add(49, LCDML_0_1_3_5, 2, "BC Assign", UI_func_bc_assign);
LCDML_add(50, LCDML_0_1_3_5, 3, "BC Mode", UI_func_bc_mode);
LCDML_add(51, LCDML_0_1, 4, "MIDI", NULL);
LCDML_add(52, LCDML_0_1_4, 1, "MIDI Channel", UI_func_midi_channel);
LCDML_add(53, LCDML_0_1_4, 2, "Lowest Note", UI_func_lowest_note);
LCDML_add(54, LCDML_0_1_4, 3, "Highest Note", UI_func_highest_note);
LCDML_add(55, LCDML_0_1_4, 4, "MIDI Send Voice", UI_func_sysex_send_voice);
LCDML_add(56, LCDML_0_1, 5, "Setup", NULL);
LCDML_add(57, LCDML_0_1_5, 1, "Portamento", NULL);
LCDML_add(58, LCDML_0_1_5_1, 1, "Port. Mode", UI_func_portamento_mode);
LCDML_add(59, LCDML_0_1_5_1, 2, "Port. Gliss", UI_func_portamento_glissando);
LCDML_add(50, LCDML_0_1_5_1, 3, "Port. Time", UI_func_portamento_time);
LCDML_add(60, LCDML_0_1_5, 2, "Polyphony", UI_func_polyphony);
LCDML_add(61, LCDML_0_1_5, 3, "Transpose", UI_func_transpose);
LCDML_add(62, LCDML_0_1_5, 4, "Fine Tune", UI_func_tune);

@ -1158,25 +1158,6 @@ bool save_sd_seq_json(uint8_t seq_number)
data_json["seq_oct_shift"] = seq_oct_shift;
data_json["seq_element_shift"] = seq_element_shift;
/*
<<<<<<< HEAD
data_json["reverb_roomsize"] = configuration.fx.reverb_roomsize;
data_json["reverb_damping"] = configuration.fx.reverb_damping;
data_json["reverb_lowpass"] = configuration.fx.reverb_lowpass;
data_json["reverb_lodamp"] = configuration.fx.reverb_lodamp;
data_json["reverb_hidamp"] = configuration.fx.reverb_hidamp;
data_json["reverb_diffusion"] = configuration.fx.reverb_diffusion;
data_json["reverb_level"] = configuration.fx.reverb_level;
data_json["eq_1"] = configuration.fx.eq_1;
data_json["eq_2"] = configuration.fx.eq_2;
data_json["eq_3"] = configuration.fx.eq_3;
data_json["eq_4"] = configuration.fx.eq_4;
data_json["eq_5"] = configuration.fx.eq_5;
data_json["eq_6"] = configuration.fx.eq_6;
data_json["eq_7"] = configuration.fx.eq_7;
=======
*/
for (uint8_t i = 0; i < sizeof(seq_track_type); i++) {
data_json["track_type"][i] = seq_track_type[i];
}
@ -1187,7 +1168,6 @@ bool save_sd_seq_json(uint8_t seq_number)
data_json["seq_inst_dexed"][i] = seq_inst_dexed[i];
}
//>>>>>>> 4af597461ea0ae5e49069d309862018eb651ccb4
#ifdef DEBUG
Serial.println(F("Write JSON data:"));
serializeJsonPretty(data_json, Serial);
@ -1296,24 +1276,6 @@ bool load_sd_seq_json(uint8_t seq_number)
for (uint8_t i = 0; i < sizeof(seq_inst_dexed); i++) {
seq_inst_dexed[i] = data_json["seq_inst_dexed"][i];
}
/*
<<<<<<< HEAD
configuration.fx.reverb_roomsize = data_json["reverb_roomsize"];
configuration.fx.reverb_damping = data_json["reverb_damping"];
configuration.fx.reverb_lowpass = data_json["reverb_lowpass"];
configuration.fx.reverb_lodamp = data_json["reverb_lodamp"];
configuration.fx.reverb_hidamp = data_json["reverb_hidamp"];
configuration.fx.reverb_diffusion = data_json["reverb_diffusion"];
configuration.fx.reverb_level = data_json["reverb_level"];
configuration.fx.eq_1 = data_json["eq_1"];
configuration.fx.eq_2 = data_json["eq_2"];
configuration.fx.eq_3 = data_json["eq_3"];
configuration.fx.eq_4 = data_json["eq_4"];
configuration.fx.eq_5 = data_json["eq_5"];
configuration.fx.eq_6 = data_json["eq_6"];
configuration.fx.eq_7 = data_json["eq_7"];
=======
*/
count = 0;
seq_tempo_ms = data_json["seq_tempo_ms"] ;
@ -1329,7 +1291,6 @@ bool load_sd_seq_json(uint8_t seq_number)
seq_chord_key_ammount = data_json["chord_key_ammount"];
seq_oct_shift = data_json["seq_oct_shift"];
seq_element_shift = data_json["seq_element_shift"];
//>>>>>>> 4af597461ea0ae5e49069d309862018eb651ccb4
//set_fx_params();

@ -83,10 +83,26 @@ void sequencer_part1(void)
handleNoteOn(configuration.dexed[seq_chord_dexed_inst].midi_channel, arp_note + seq_arps[arp_chord][arp_step + seq_element_shift] , seq_chord_velocity);
arp_note_prev = arp_note + seq_arps[arp_chord][arp_step + seq_element_shift] ;
}
else if (arp_style == 1) { //arp down
handleNoteOn(configuration.dexed[seq_chord_dexed_inst].midi_channel, arp_note + seq_arps[arp_chord][10 - arp_step + seq_element_shift] , seq_chord_velocity);
arp_note_prev = arp_note + seq_arps[arp_chord][10 - arp_step + seq_element_shift] ;
}
else if (arp_style == 2) { //arp up & down
if (seq_step < arp_lenght) {
handleNoteOn(configuration.dexed[seq_chord_dexed_inst].midi_channel, arp_note + seq_arps[arp_chord][arp_step+1] , seq_chord_velocity);
arp_note_prev = arp_note + seq_arps[arp_chord][arp_step +1] ;
}
else {
handleNoteOn(configuration.dexed[seq_chord_dexed_inst].midi_channel, arp_note + seq_arps[arp_chord][arp_lenght*2-2 - arp_step ] , seq_chord_velocity);
arp_note_prev = arp_note + seq_arps[arp_chord][arp_lenght*2- - arp_step ] ;
}
}
else if (arp_style == 3) { //arp random
uint8_t rnd1 = random(5);
handleNoteOn(configuration.dexed[seq_chord_dexed_inst].midi_channel, arp_note + seq_chords[arp_chord][rnd1] + (seq_oct_shift * 12), seq_chord_velocity);
arp_note_prev = arp_note + seq_chords[arp_chord][rnd1] + (seq_oct_shift * 12);
uint8_t rnd1 = random(arp_lenght);
handleNoteOn(configuration.dexed[seq_chord_dexed_inst].midi_channel, arp_note + seq_arps[arp_chord][rnd1 + seq_element_shift] + (seq_oct_shift * 12), seq_chord_velocity);
arp_note_prev = arp_note + seq_arps[arp_chord][rnd1 + seq_element_shift] + (seq_oct_shift * 12);
}
}
}
@ -110,11 +126,24 @@ void sequencer_part1(void)
}
}
}
if ( (arp_step > 1 && seq_arps[arp_chord][arp_step] == 0) || arp_step == arp_lenght)
{
arp_step = 0;
if (arp_style != 2){
if ( (arp_step > 1 && seq_arps[arp_chord][arp_step] == 0) || arp_step == arp_lenght)
{
arp_step = 0;
}
}
else
{
if ( (arp_step > 1 && seq_arps[arp_chord][arp_step] == 0) || arp_step == arp_lenght*2)
{
arp_step = 0;
}
}
if (seq_step > 15)
if (seq_step > 15)
{
seq_step = 0;
if (seq_chain_lenght > 0) {

@ -14,25 +14,17 @@ uint8_t seq_inst_dexed[4] = { 0, 0, 1, 1 };
uint8_t seq_chord_dexed_inst = 0;
uint8_t seq_chord_velocity = 60;
uint8_t seq_chord_key_ammount = 4;
uint8_t seq_element_shift=0;
int seq_oct_shift=0;
uint8_t seq_element_shift = 0;
int seq_oct_shift = 0;
uint8_t arp_style = 0; // up, down, up&down, random
uint8_t seq_chords[7][4] = { 4, 7, 0, 0, //major
3, 7, 0, 0, //minor
4, 7, 10, 0, //seventh
4, 8, 0, 0, //augmented
3, 6, 0 , 0, //dim
4, 7, 11, 0, //maj7,
0, 0, 0 , 0 //no Chord
};
uint8_t seq_arps[7][22] = { //up
0, 4, 7, 12, 16, 19, 24, 28, 31, 36, 40, 43, 48, 52, 55, 60 ,99,0,0,0,0,0,//major
0, 3, 7, 12, 15, 19, 24, 27, 31, 36, 39, 43, 48, 51, 55, 60 ,99,0,0,0,0,0,//minor
0, 4, 7, 10, 12, 16, 19, 22, 24, 28, 31, 34, 36, 40, 43, 46, 48, 52, 55, 58, 60 ,99,//seventh
0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 ,99,0,0,0,0,0,//augmented
0, 3, 6, 12, 15, 18, 24, 27, 30, 36, 39, 42, 48, 51, 54, 60 ,99,0,0,0,0,0,//dim
0, 4, 7, 11, 12, 16, 19, 23, 24, 28, 31, 35, 36, 40, 43, 47, 48, 52, 55, 59, 60 ,99//maj7
uint8_t seq_arps[7][23] = {
0, 4, 7, 12, 16, 19, 24, 28, 31, 36, 40, 43, 48, 52, 55, 60, 64, 67, 72, 76, 79, 84, 0, //major
0, 3, 7, 12, 15, 19, 24, 27, 31, 36, 39, 43, 48, 51, 55, 60, 63, 67, 72, 75, 79, 84, 0, //minor
0, 4, 7, 10, 12, 16, 19, 22, 24, 28, 31, 34, 36, 40, 43, 46, 48, 52, 55, 58, 60, 64, 0, //seventh
0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 0, //augmented
0, 3, 6, 12, 15, 18, 24, 27, 30, 36, 39, 42, 48, 51, 54, 60, 63, 66, 72, 75, 78, 84, 0, //dim
0, 4, 7, 11, 12, 16, 19, 23, 24, 28, 31, 35, 36, 40, 43, 47, 48, 52, 55, 59, 60, 64, 0 //maj7
};
char seq_chord_names[7][4] = { 'M', 'a', 'j', ' ' , //major
@ -44,7 +36,6 @@ char seq_chord_names[7][4] = { 'M', 'a', 'j', ' ' , //major
'N', 'o', 'C', 'd' ,
};
char arp_style_names[4][3] = { 'u', 'p', ' ',
'd', 'w', 'n',
'u', '&', 'd',
@ -95,7 +86,7 @@ uint8_t seq_vel[10][16] = {120, 0, 0, 0, 120, 0, 0, 0, 120, 0, 0, 0, 120, 0, 0,
uint8_t seq_patternchain[4][4] = { 0 , 1 , 6 , 9 , 0 , 1 , 5 , 8 , 0 , 1 , 6 , 9 , 2 , 1 , 5 , 7
};
uint8_t seq_content_type[10] = { 0, 0, 0, 0 , 1, 1, 1 , 1 , 1 , 1 }; // 0 = track is Drumtrack, 1= Instrumenttrack, 2= Chord or Arpeggio
uint8_t seq_track_type[4] = { 0, 0, 2, 1 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp
uint8_t seq_track_type[4] = { 0, 0, 3, 1 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp
//uint8_t seq_reverb[4][16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0,

Loading…
Cancel
Save