Removed sequencer code because the sequencer is better supported in MicroDexed-touch.

dev
Holger Wirtz 2 years ago
parent 892b4ea545
commit f961c69b02
  1. 752
      MicroDexed.ino
  2. 3195
      UI.hpp
  3. 145
      UI_FX_T4.h
  4. 388
      addon/SD/PERFORMANCE/0/patterns.json
  5. 108
      addon/SD/PERFORMANCE/0/sequencer.json
  6. 388
      addon/SD/PERFORMANCE/0/velocity.json
  7. 388
      addon/SD/PERFORMANCE/1/patterns.json
  8. 108
      addon/SD/PERFORMANCE/1/sequencer.json
  9. 388
      addon/SD/PERFORMANCE/1/velocity.json
  10. 388
      addon/SD/PERFORMANCE/2/patterns.json
  11. 108
      addon/SD/PERFORMANCE/2/sequencer.json
  12. 388
      addon/SD/PERFORMANCE/2/velocity.json
  13. 388
      addon/SD/PERFORMANCE/3/patterns.json
  14. 108
      addon/SD/PERFORMANCE/3/sequencer.json
  15. 388
      addon/SD/PERFORMANCE/3/velocity.json
  16. 388
      addon/SD/PERFORMANCE/4/patterns.json
  17. 108
      addon/SD/PERFORMANCE/4/sequencer.json
  18. 388
      addon/SD/PERFORMANCE/4/velocity.json
  19. 388
      addon/SD/PERFORMANCE/5/patterns.json
  20. 108
      addon/SD/PERFORMANCE/5/sequencer.json
  21. 388
      addon/SD/PERFORMANCE/5/velocity.json
  22. 388
      addon/SD/PERFORMANCE/6/patterns.json
  23. 108
      addon/SD/PERFORMANCE/6/sequencer.json
  24. 388
      addon/SD/PERFORMANCE/6/velocity.json
  25. 388
      addon/SD/PERFORMANCE/7/patterns.json
  26. 108
      addon/SD/PERFORMANCE/7/sequencer.json
  27. 388
      addon/SD/PERFORMANCE/7/velocity.json
  28. 388
      addon/SD/PERFORMANCE/8/patterns.json
  29. 108
      addon/SD/PERFORMANCE/8/sequencer.json
  30. 388
      addon/SD/PERFORMANCE/8/velocity.json
  31. 16
      config.h
  32. 479
      dexed_sd.cpp
  33. 1769
      midi_devices.hpp
  34. 250
      sequencer.cpp
  35. 133
      sequencer.h

@ -406,11 +406,9 @@ int16_t* ep_delayline_l;
#endif
#if NUM_DRUMS > 0
extern sequencer_t seq;
extern drum_config_t drum_config[NUM_DRUMSET_CONFIG];
uint8_t drum_counter;
uint8_t drum_type[NUM_DRUMS];
extern void sequencer(void);
uint8_t drum_midi_channel = DRUM_MIDI_CHANNEL;
custom_midi_map_t custom_midi_map[NUM_CUSTOM_MIDI_MAPPINGS];
#endif
@ -421,9 +419,6 @@ extern LCDMenuLib2 LCDML;
extern void getNoteName(char* noteName, uint8_t noteNumber);
#ifdef USE_SEQUENCER
PeriodicTimer sequencer_timer;
#endif
/***********************************************************************
SETUP
@ -679,11 +674,6 @@ void setup()
}
}
#ifdef USE_SEQUENCER
// Start timer (to avoid a crash when loading the performance data)
sequencer_timer.begin(sequencer, seq.tempo_ms / 2, false);
#endif
// Load initial Performance or the last used one
initial_values(false);
@ -735,7 +725,7 @@ void setup()
#if NUM_DRUMS > 0
master_mixer_r.gain(MASTER_MIX_CH_DRUMS, VOL_MAX_FLOAT);
master_mixer_l.gain(MASTER_MIX_CH_DRUMS, VOL_MAX_FLOAT);
seq.drums_volume = VOL_MAX_FLOAT;
configuration.drums.vol = VOL_MAX_FLOAT;
#else
master_mixer_r.gain(MASTER_MIX_CH_DRUMS, 0.0);
master_mixer_l.gain(MASTER_MIX_CH_DRUMS, 0.0);
@ -767,7 +757,7 @@ void setup()
//ep_modchorus.set_bypass(true);
strcpy(seq.name, "INIT Perf");
strcpy(configuration.performance.name, "INIT Perf");
LCDML.OTHER_jumpToFunc(UI_func_voice_select);
}
@ -784,38 +774,6 @@ void loop()
LCDML.loop();
#endif
if (seq.running)
{
if (seq.step != seq_UI_last_step)
{
seq_UI_last_step = seq.step;
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_seq_pattern_editor)) //is in UI of Sequencer
{
display.setCursor(seq.step, 1);
display.write(124);
if (seq.step == 0)
{
display.setCursor(15, 1);
display.print(seq_find_shortname(15)[0]);
}
else
{
display.setCursor(seq.step - 1, 1);
display.print(seq_find_shortname(seq.step - 1)[0]);
}
}
else if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_arpeggio)) //is in UI of Arpeggiator
{
display.setCursor(7, 0);
display.print( seq.chord_names[seq.arp_chord][0]);
display.print( seq.chord_names[seq.arp_chord][1]);
display.print( seq.chord_names[seq.arp_chord][2]);
display.print( seq.chord_names[seq.arp_chord][3]);
}
}
}
// CONTROL-RATE-EVENT-HANDLING
if (control_rate > CONTROL_RATE_MS)
{
@ -976,54 +934,6 @@ void learn_key(byte inChannel, byte inNumber)
; // can not be mapped, no empty slot left
}
}
seq.midi_learn_active = false;
//update_midi_learn_button();
print_custom_mappings();
}
void learn_cc(byte inChannel, byte inNumber)
{
uint8_t found = 199;
for (uint8_t c = 0; c < NUM_CUSTOM_MIDI_MAPPINGS; c++)
{
if (inNumber == custom_midi_map[c].in && custom_midi_map[c].type == 2)
{
found = c;
break;
}
}
if (found != 199) //remap to new destination if it was already mapped before
{
custom_midi_map[found].in = inNumber;
custom_midi_map[found].out = cc_dest_values[seq.temp_select_menu];
custom_midi_map[found].type = 2;
custom_midi_map[found].channel = configuration.dexed[selected_instance_id].midi_channel;
}
else
{
found = 199;
for (uint8_t c = 0; c < NUM_CUSTOM_MIDI_MAPPINGS; c++)
{
if (custom_midi_map[c].in == 0)
{
found = c;
break;
}
}
if (found != 199) // else map to next empty slot if it was not mapped before
{
custom_midi_map[found].in = inNumber;
custom_midi_map[found].out = cc_dest_values[seq.temp_select_menu];
custom_midi_map[found].type = 2;
custom_midi_map[found].channel = configuration.dexed[selected_instance_id].midi_channel;
}
else
; // can not be mapped, no empty slot left
}
seq.midi_learn_active = false;
//update_midi_learn_button();
print_custom_mappings();
}
/******************************************************************************
@ -1031,172 +941,133 @@ void learn_cc(byte inChannel, byte inNumber)
******************************************************************************/
void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity)
{
if (seq.midi_learn_active && LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_custom_mappings) )
learn_key(inChannel, inNumber);
else
// Check for MicroDexed
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{
//
// Drum Sampler
//
#if NUM_DRUMS > 0
if (activesample < 6 && seq.running == false && LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_seq_pattern_editor) ) // live play pitched sample
{
if (drum_counter >= NUM_DRUMS)
drum_counter = 0;
uint8_t slot = drum_get_slot(drum_config[activesample].drum_class);
float pan = mapfloat(drum_config[activesample].pan, -1.0, 1.0, 0.0, 1.0);
drum_mixer_r.gain(slot, (1.0 - pan) * drum_config[activesample].vol_max);
drum_mixer_l.gain(slot, pan * drum_config[activesample].vol_max);
#ifdef USE_FX
drum_reverb_send_mixer_r.gain(slot, (1.0 - pan) * volume_transform(drum_config[activesample].reverb_send));
drum_reverb_send_mixer_l.gain(slot, pan * volume_transform(drum_config[activesample].reverb_send));
#endif
if (drum_config[activesample].drum_data != NULL && drum_config[activesample].len > 0)
{
Drum[slot]->enableInterpolation(true);
Drum[slot]->setPlaybackRate( (float)pow (2, (inNumber - 72) / 12.00) * drum_config[activesample].p_offset );
Drum[slot]->playRaw((int16_t*)drum_config[activesample].drum_data, drum_config[activesample].len, 1);
}
}
else
if (checkMidiChannel(inChannel, instance_id))
{
#endif
//Ignore the note when playing & recording the same note into the sequencer
if (seq.recording == false || (seq.recording && inNumber != seq.note_in ))
if (inNumber >= configuration.dexed[instance_id].lowest_note && inNumber <= configuration.dexed[instance_id].highest_note)
{
// Check for MicroDexed
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{
if (checkMidiChannel(inChannel, instance_id))
{
if (inNumber >= configuration.dexed[instance_id].lowest_note && inNumber <= configuration.dexed[instance_id].highest_note)
{
if (configuration.dexed[instance_id].polyphony > 0)
MicroDexed[instance_id]->keydown(inNumber, uint8_t(float(configuration.dexed[instance_id].velocity_level / 127.0)*inVelocity + 0.5));
if (configuration.dexed[instance_id].polyphony > 0)
MicroDexed[instance_id]->keydown(inNumber, uint8_t(float(configuration.dexed[instance_id].velocity_level / 127.0)*inVelocity + 0.5));
midi_voices[instance_id]++;
midi_voices[instance_id]++;
#if defined(ARDUINO_TEENSY40) || defined(ARDUINO_TEENSY41)
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select))
{
midi_decay_timer = 0;
midi_decay[instance_id] = min(inVelocity / 5, 7);
}
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select))
{
midi_decay_timer = 0;
midi_decay[instance_id] = min(inVelocity / 5, 7);
}
#endif
#ifdef DEBUG
char note_name[4];
getNoteName(note_name, inNumber);
Serial.print(F("KeyDown "));
Serial.print(note_name);
Serial.print(F(" instance "));
Serial.print(instance_id, DEC);
Serial.print(F(" MIDI-channel "));
Serial.print(inChannel, DEC);
Serial.println();
char note_name[4];
getNoteName(note_name, inNumber);
Serial.print(F("KeyDown "));
Serial.print(note_name);
Serial.print(F(" instance "));
Serial.print(instance_id, DEC);
Serial.print(F(" MIDI-channel "));
Serial.print(inChannel, DEC);
Serial.println();
#endif
//return;
}
}
}
}
}
}
#if NUM_DRUMS > 0
// Check for Drum
if (inChannel == drum_midi_channel || drum_midi_channel == MIDI_CHANNEL_OMNI)
{
if (drum_counter >= NUM_DRUMS)
drum_counter = 0;
// Check for Drum
if (inChannel == drum_midi_channel || drum_midi_channel == MIDI_CHANNEL_OMNI)
{
if (drum_counter >= NUM_DRUMS)
drum_counter = 0;
//check custom midi mapping
for (uint8_t c = 0; c < NUM_CUSTOM_MIDI_MAPPINGS; c++)
{
if (inNumber == custom_midi_map[c].in && custom_midi_map[c].type == 1)
{
inNumber = custom_midi_map[c].out;
break;
}
}
//check custom midi mapping
for (uint8_t c = 0; c < NUM_CUSTOM_MIDI_MAPPINGS; c++)
{
if (inNumber == custom_midi_map[c].in && custom_midi_map[c].type == 1)
{
inNumber = custom_midi_map[c].out;
break;
}
}
#ifdef DEBUG
char note_name[4];
getNoteName(note_name, inNumber);
Serial.print(F("=> Drum["));
Serial.print(drum_counter, DEC);
Serial.print(F("]: "));
Serial.println(note_name);
char note_name[4];
getNoteName(note_name, inNumber);
Serial.print(F("=> Drum["));
Serial.print(drum_counter, DEC);
Serial.print(F("]: "));
Serial.println(note_name);
#endif
for (uint8_t d = 0; d < NUM_DRUMSET_CONFIG; d++)
{
if (inNumber == drum_config[d].midinote)
{
uint8_t slot = drum_get_slot(drum_config[d].drum_class);
float pan = mapfloat(drum_config[d].pan, -1.0, 1.0, 0.0, 1.0);
for (uint8_t d = 0; d < NUM_DRUMSET_CONFIG; d++)
{
if (inNumber == drum_config[d].midinote)
{
uint8_t slot = drum_get_slot(drum_config[d].drum_class);
float pan = mapfloat(drum_config[d].pan, -1.0, 1.0, 0.0, 1.0);
drum_mixer_r.gain(slot, (1.0 - pan) * volume_transform(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)));
drum_mixer_l.gain(slot, pan * volume_transform(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)));
drum_mixer_r.gain(slot, (1.0 - pan) * volume_transform(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)));
drum_mixer_l.gain(slot, pan * volume_transform(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max)));
#ifdef USE_FX
drum_reverb_send_mixer_r.gain(slot, (1.0 - pan) * volume_transform(drum_config[d].reverb_send));
drum_reverb_send_mixer_l.gain(slot, pan * volume_transform(drum_config[d].reverb_send));
drum_reverb_send_mixer_r.gain(slot, (1.0 - pan) * volume_transform(drum_config[d].reverb_send));
drum_reverb_send_mixer_l.gain(slot, pan * volume_transform(drum_config[d].reverb_send));
#endif
if (drum_config[d].drum_data != NULL && drum_config[d].len > 0)
{
//Drum[slot]->play(drum_config[d].drum_data);
if (drum_config[d].pitch != 0.0)
{
Drum[slot]->enableInterpolation(true);
Drum[slot]->setPlaybackRate(drum_config[d].pitch);
}
Drum[slot]->playRaw((int16_t*)drum_config[d].drum_data, drum_config[d].len, 1);
}
#ifdef DEBUG
Serial.print(F("Drum "));
Serial.print(drum_config[d].shortname);
Serial.print(F(" ["));
Serial.print(drum_config[d].name);
Serial.print(F("], Slot "));
Serial.print(slot);
Serial.print(F(": V"));
Serial.print(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max), 2);
Serial.print(F(" P"));
Serial.print(drum_config[d].pan, 2);
Serial.print(F(" PAN"));
Serial.print(pan, 2);
Serial.print(F(" RS"));
Serial.println(drum_config[d].reverb_send, 2);
#endif
break;
}
if (drum_config[d].drum_data != NULL && drum_config[d].len > 0)
{
//Drum[slot]->play(drum_config[d].drum_data);
if (drum_config[d].pitch != 0.0)
{
Drum[slot]->enableInterpolation(true);
Drum[slot]->setPlaybackRate(drum_config[d].pitch);
}
Drum[slot]->playRaw((int16_t*)drum_config[d].drum_data, drum_config[d].len, 1);
}
#ifdef DEBUG
Serial.print(F("Drum "));
Serial.print(drum_config[d].shortname);
Serial.print(F(" ["));
Serial.print(drum_config[d].name);
Serial.print(F("], Slot "));
Serial.print(slot);
Serial.print(F(": V"));
Serial.print(mapfloat(inVelocity, 0, 127, drum_config[d].vol_min, drum_config[d].vol_max), 2);
Serial.print(F(" P"));
Serial.print(drum_config[d].pan, 2);
Serial.print(F(" PAN"));
Serial.print(pan, 2);
Serial.print(F(" RS"));
Serial.println(drum_config[d].reverb_send, 2);
#endif
#if NUM_DRUMS > 0
break;
}
#endif
}
}
#endif
//
// E-Piano
//
//
// E-Piano
//
#if defined(USE_EPIANO)
if (configuration.epiano.midi_channel == MIDI_CHANNEL_OMNI || configuration.epiano.midi_channel == inChannel)
if (configuration.epiano.midi_channel == MIDI_CHANNEL_OMNI || configuration.epiano.midi_channel == inChannel)
{
if (inNumber >= configuration.epiano.lowest_note && inNumber <= configuration.epiano.highest_note)
{
if (inNumber >= configuration.epiano.lowest_note && inNumber <= configuration.epiano.highest_note)
{
ep.noteOn(inNumber + configuration.epiano.transpose - 24, inVelocity);
ep.noteOn(inNumber + configuration.epiano.transpose - 24, inVelocity);
#ifdef DEBUG
char note_name[4];
getNoteName(note_name, inNumber);
Serial.print(F("KeyDown "));
Serial.print(note_name);
Serial.print(F(" EPIANO "));
Serial.print(F(" MIDI-channel "));
Serial.print(inChannel, DEC);
Serial.println();
char note_name[4];
getNoteName(note_name, inNumber);
Serial.print(F("KeyDown "));
Serial.print(note_name);
Serial.print(F(" EPIANO "));
Serial.print(F(" MIDI-channel "));
Serial.print(inChannel, DEC);
Serial.println();
#endif
}
}
#endif
}
#endif
}
#if NUM_DRUMS > 0
@ -1263,6 +1134,7 @@ void handleNoteOff(byte inChannel, byte inNumber, byte inVelocity)
}
}
#if defined(USE_EPIANO)
if (configuration.epiano.midi_channel == MIDI_CHANNEL_OMNI || configuration.epiano.midi_channel == inChannel)
{
@ -1289,254 +1161,218 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue)
inCtrl = constrain(inCtrl, 0, 127);
inValue = constrain(inValue, 0, 127);
if (seq.midi_learn_active && LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_cc_mappings) )
learn_cc(inChannel, inCtrl);
else
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{
//check custom midi mapping
for (uint8_t c = 0; c < NUM_CUSTOM_MIDI_MAPPINGS; c++)
{
if (inCtrl == custom_midi_map[c].in && custom_midi_map[c].type == 2)
{
inCtrl = custom_midi_map[c].out;
inChannel = custom_midi_map[c].channel;
break;
}
}
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
if (checkMidiChannel(inChannel, instance_id))
{
if (checkMidiChannel(inChannel, instance_id))
{
#ifdef DEBUG
Serial.print(F("INSTANCE "));
Serial.print(instance_id, DEC);
Serial.print(F(": CC#"));
Serial.print(inCtrl, DEC);
Serial.print(F(":"));
Serial.println(inValue, DEC);
Serial.print(F("INSTANCE "));
Serial.print(instance_id, DEC);
Serial.print(F(": CC#"));
Serial.print(inCtrl, DEC);
Serial.print(F(":"));
Serial.println(inValue, DEC);
#endif
switch (inCtrl) {
case 0: // BankSelect MSB
switch (inCtrl) {
case 0: // BankSelect MSB
#ifdef DEBUG
Serial.println(F("BANK-SELECT MSB CC"));
Serial.println(F("BANK-SELECT MSB CC"));
#endif
configuration.dexed[instance_id].bank = constrain((inValue << 7)&configuration.dexed[instance_id].bank, 0, MAX_BANKS - 1);
/* load_sd_voice(configuration.dexed[instance_id].bank, configuration.dexed[instance_id].voice, instance_id);
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
} */
break;
case 1:
configuration.dexed[instance_id].bank = constrain((inValue << 7)&configuration.dexed[instance_id].bank, 0, MAX_BANKS - 1);
/* load_sd_voice(configuration.dexed[instance_id].bank, configuration.dexed[instance_id].voice, instance_id);
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
} */
break;
case 1:
#ifdef DEBUG
Serial.println(F("MODWHEEL CC"));
Serial.println(F("MODWHEEL CC"));
#endif
MicroDexed[instance_id]->setModWheel(inValue);
MicroDexed[instance_id]->ControllersRefresh();
break;
case 2:
MicroDexed[instance_id]->setModWheel(inValue);
MicroDexed[instance_id]->ControllersRefresh();
break;
case 2:
#ifdef DEBUG
Serial.println(F("BREATH CC"));
Serial.println(F("BREATH CC"));
#endif
MicroDexed[instance_id]->setBreathController(inValue);
MicroDexed[instance_id]->ControllersRefresh();
break;
case 4:
MicroDexed[instance_id]->setBreathController(inValue);
MicroDexed[instance_id]->ControllersRefresh();
break;
case 4:
#ifdef DEBUG
Serial.println(F("FOOT CC"));
Serial.println(F("FOOT CC"));
#endif
MicroDexed[instance_id]->setFootController(inValue);
MicroDexed[instance_id]->ControllersRefresh();
break;
case 5: // Portamento time
configuration.dexed[instance_id].portamento_time = inValue;
MicroDexed[instance_id]->setPortamentoTime(configuration.dexed[instance_id].portamento_time);
break;
case 7: // Instance Volume
MicroDexed[instance_id]->setFootController(inValue);
MicroDexed[instance_id]->ControllersRefresh();
break;
case 5: // Portamento time
configuration.dexed[instance_id].portamento_time = inValue;
MicroDexed[instance_id]->setPortamentoTime(configuration.dexed[instance_id].portamento_time);
break;
case 7: // Instance Volume
#ifdef DEBUG
Serial.println(F("VOLUME CC"));
Serial.println(F("VOLUME CC"));
#endif
configuration.dexed[instance_id].sound_intensity = map(inValue, 0, 127, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX);
MicroDexed[instance_id]->setGain(midi_volume_transform(map(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0, 127)));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_sound_intensity))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 10: // Pan
configuration.dexed[instance_id].sound_intensity = map(inValue, 0, 127, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX);
MicroDexed[instance_id]->setGain(midi_volume_transform(map(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0, 127)));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_sound_intensity))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 10: // Pan
#ifdef DEBUG
Serial.println(F("PANORAMA CC"));
Serial.println(F("PANORAMA CC"));
#endif
configuration.dexed[instance_id].pan = map(inValue, 0, 0x7f, PANORAMA_MIN, PANORAMA_MAX);
mono2stereo[instance_id]->panorama(mapfloat(configuration.dexed[instance_id].pan, PANORAMA_MIN, PANORAMA_MAX, -1.0, 1.0));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_panorama))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 32: // BankSelect LSB
configuration.dexed[instance_id].pan = map(inValue, 0, 0x7f, PANORAMA_MIN, PANORAMA_MAX);
mono2stereo[instance_id]->panorama(mapfloat(configuration.dexed[instance_id].pan, PANORAMA_MIN, PANORAMA_MAX, -1.0, 1.0));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_panorama))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 32: // BankSelect LSB
#ifdef DEBUG
Serial.println(F("BANK-SELECT LSB CC"));
Serial.println(F("BANK-SELECT LSB CC"));
#endif
configuration.dexed[instance_id].bank = constrain(inValue, 0, MAX_BANKS - 1);
/*load_sd_voice(configuration.dexed[instance_id].bank, configuration.dexed[instance_id].voice, instance_id);
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}*/
break;
case 64:
MicroDexed[instance_id]->setSustain(inValue > 63);
/*
if (!MicroDexed[instance_id]->getSustain())
{
for (uint8_t note = 0; note < MicroDexed[instance_id]->getMaxNotes(); note++)
{
if (MicroDexed[instance_id]->voices[note].sustained && !MicroDexed[instance_id]->voices[note].keydown)
{
MicroDexed[instance_id]->voices[note].dx7_note->keyup();
MicroDexed[instance_id]->voices[note].sustained = false;
}
}
}
*/
break;
case 65:
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode);
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_portamento_mode))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 94: // CC 94: (de)tune
configuration.dexed[selected_instance_id].tune = map(inValue, 0, 0x7f, TUNE_MIN, TUNE_MAX);
MicroDexed[selected_instance_id]->setMasterTune((int((configuration.dexed[selected_instance_id].tune - 100) / 100.0 * 0x4000) << 11) * (1.0 / 12));
MicroDexed[selected_instance_id]->doRefreshVoice();
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_tune))
configuration.dexed[instance_id].bank = constrain(inValue, 0, MAX_BANKS - 1);
/*load_sd_voice(configuration.dexed[instance_id].bank, configuration.dexed[instance_id].voice, instance_id);
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
#if defined(USE_FX)
case 91: // CC 91: reverb send
configuration.fx.reverb_send[selected_instance_id] = map(inValue, 0, 0x7f, REVERB_SEND_MIN, REVERB_SEND_MAX);
reverb_mixer_r.gain(selected_instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[selected_instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT)));
reverb_mixer_l.gain(selected_instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[selected_instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT)));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_reverb_send))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 93: // CC 93: chorus level
configuration.fx.chorus_level[selected_instance_id] = map(inValue, 0, 0x7f, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX);
chorus_mixer[selected_instance_id]->gain(1, volume_transform(mapfloat(configuration.fx.chorus_level[selected_instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5)));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_chorus_level))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 103: // CC 103: filter resonance
configuration.fx.filter_resonance[instance_id] = map(inValue, 0, 0x7f, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX);
MicroDexed[instance_id]->setFilterResonance(mapfloat(configuration.fx.filter_resonance[instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_filter_resonance))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 104: // CC 104: filter cutoff
configuration.fx.filter_cutoff[instance_id] = map(inValue, 0, 0x7f, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX);
MicroDexed[instance_id]->setFilterCutoff(mapfloat(configuration.fx.filter_cutoff[instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0));;
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_filter_cutoff))
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}*/
break;
case 64:
MicroDexed[instance_id]->setSustain(inValue > 63);
/*
if (!MicroDexed[instance_id]->getSustain())
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 105: // CC 105: delay time
configuration.fx.delay_time[instance_id] = map(inValue, 0, 0x7f, DELAY_TIME_MIN, DELAY_TIME_MAX);
delay_fx[instance_id]->delay(0, constrain(configuration.fx.delay_time[instance_id] * 10, DELAY_TIME_MIN * 10, DELAY_TIME_MAX * 10));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_delay_time))
for (uint8_t note = 0; note < MicroDexed[instance_id]->getMaxNotes(); note++)
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
if (MicroDexed[instance_id]->voices[note].sustained && !MicroDexed[instance_id]->voices[note].keydown)
{
MicroDexed[instance_id]->voices[note].dx7_note->keyup();
MicroDexed[instance_id]->voices[note].sustained = false;
}
}
break;
case 106: // CC 106: delay feedback
configuration.fx.delay_feedback[instance_id] = map(inValue, 0, 0x7f, DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX);
delay_fb_mixer[instance_id]->gain(1, midi_volume_transform(map(configuration.fx.delay_feedback[instance_id], DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0, 127))); // amount of feedback
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_delay_feedback))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 107: // CC 107: delay volume
configuration.fx.delay_level[instance_id] = map(inValue, 0, 0x7f, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX);
delay_mixer[instance_id]->gain(1, midi_volume_transform(map(configuration.fx.delay_level[instance_id], DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0, 127)));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_delay_level))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
#endif
case 120:
MicroDexed[instance_id]->panic();
break;
case 121:
MicroDexed[instance_id]->resetControllers();
break;
case 123:
MicroDexed[instance_id]->notesOff();
break;
case 126:
if (inValue > 0)
MicroDexed[instance_id]->setMonoMode(true);
else
MicroDexed[instance_id]->setMonoMode(false);
break;
case 127:
if (inValue > 0)
MicroDexed[instance_id]->setMonoMode(true);
else
MicroDexed[instance_id]->setMonoMode(false);
break;
case 200: // CC 200: seq start/stop
if (!seq.running)
handleStart();
else
handleStop();
break;
case 201: // CC 201: seq stop
if (seq.running)
handleStop();
break;
case 202: // CC 202: seq record
if (seq.running)
seq.running = true;
seq.recording = true;
seq.note_in = 0;
break;
case 203: // CC 203: dexed panic
MicroDexed[0]->panic();
#if NUM_DEXED > 1
MicroDexed[1]->panic();
*/
break;
case 65:
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode);
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_portamento_mode))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 94: // CC 94: (de)tune
configuration.dexed[selected_instance_id].tune = map(inValue, 0, 0x7f, TUNE_MIN, TUNE_MAX);
MicroDexed[selected_instance_id]->setMasterTune((int((configuration.dexed[selected_instance_id].tune - 100) / 100.0 * 0x4000) << 11) * (1.0 / 12));
MicroDexed[selected_instance_id]->doRefreshVoice();
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_tune))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
#if defined(USE_FX)
case 91: // CC 91: reverb send
configuration.fx.reverb_send[selected_instance_id] = map(inValue, 0, 0x7f, REVERB_SEND_MIN, REVERB_SEND_MAX);
reverb_mixer_r.gain(selected_instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[selected_instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT)));
reverb_mixer_l.gain(selected_instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[selected_instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT)));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_reverb_send))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 93: // CC 93: chorus level
configuration.fx.chorus_level[selected_instance_id] = map(inValue, 0, 0x7f, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX);
chorus_mixer[selected_instance_id]->gain(1, volume_transform(mapfloat(configuration.fx.chorus_level[selected_instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 0.5)));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_chorus_level))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 103: // CC 103: filter resonance
configuration.fx.filter_resonance[instance_id] = map(inValue, 0, 0x7f, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX);
MicroDexed[instance_id]->setFilterResonance(mapfloat(configuration.fx.filter_resonance[instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_filter_resonance))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 104: // CC 104: filter cutoff
configuration.fx.filter_cutoff[instance_id] = map(inValue, 0, 0x7f, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX);
MicroDexed[instance_id]->setFilterCutoff(mapfloat(configuration.fx.filter_cutoff[instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0));;
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_filter_cutoff))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 105: // CC 105: delay time
configuration.fx.delay_time[instance_id] = map(inValue, 0, 0x7f, DELAY_TIME_MIN, DELAY_TIME_MAX);
delay_fx[instance_id]->delay(0, constrain(configuration.fx.delay_time[instance_id] * 10, DELAY_TIME_MIN * 10, DELAY_TIME_MAX * 10));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_delay_time))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 106: // CC 106: delay feedback
configuration.fx.delay_feedback[instance_id] = map(inValue, 0, 0x7f, DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX);
delay_fb_mixer[instance_id]->gain(1, midi_volume_transform(map(configuration.fx.delay_feedback[instance_id], DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0, 127))); // amount of feedback
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_delay_feedback))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
case 107: // CC 107: delay volume
configuration.fx.delay_level[instance_id] = map(inValue, 0, 0x7f, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX);
delay_mixer[instance_id]->gain(1, midi_volume_transform(map(configuration.fx.delay_level[instance_id], DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0, 127)));
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_delay_level))
{
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
break;
#endif
}
case 120:
MicroDexed[instance_id]->panic();
break;
case 121:
MicroDexed[instance_id]->resetControllers();
break;
case 123:
MicroDexed[instance_id]->notesOff();
break;
case 126:
if (inValue > 0)
MicroDexed[instance_id]->setMonoMode(true);
else
MicroDexed[instance_id]->setMonoMode(false);
break;
case 127:
if (inValue > 0)
MicroDexed[instance_id]->setMonoMode(true);
else
MicroDexed[instance_id]->setMonoMode(false);
break;
}
}
}
#if defined(USE_EPIANO)
if (configuration.epiano.midi_channel == MIDI_CHANNEL_OMNI || configuration.epiano.midi_channel == inChannel)
ep.processMidiController(inCtrl, inValue);
@ -1584,7 +1420,7 @@ void handleProgramChange(byte inChannel, byte inProgram)
}
}
void handleSystemExclusive(byte* sysex, unsigned int len)
void handleSystemExclusive(byte * sysex, unsigned int len)
{
int16_t sysex_return;
@ -2015,13 +1851,6 @@ void handleStart(void)
midi_bpm_timer = 0;
midi_bpm_counter = 0;
_midi_bpm = -1;
seq.step = 0;
seq.chain_active_step = 0;
seq.running = true;
#ifdef USE_SEQUENCER
sequencer_timer.start();
#endif
}
void handleContinue(void)
@ -2031,15 +1860,6 @@ void handleContinue(void)
void handleStop(void)
{
#ifdef USE_SEQUENCER
sequencer_timer.stop();
#endif
seq.running = false;
seq.recording = false;
seq.note_in = 0;
seq.step = 0;
seq.chain_active_step = 0;
MicroDexed[0]->panic();
#if NUM_DEXED > 1
MicroDexed[1]->panic();
@ -2591,7 +2411,7 @@ void set_fx_params(void)
delay_fx[instance_id]->delay(0, constrain(configuration.fx.delay_time[instance_id], DELAY_TIME_MIN, DELAY_TIME_MAX) * 10);
if (configuration.fx.delay_sync[instance_id] > 0)
{
uint16_t midi_sync_delay_time = uint16_t(60000.0 * midi_ticks_factor[configuration.fx.delay_sync[instance_id]] / seq.bpm);
uint16_t midi_sync_delay_time = uint16_t(60000.0 * midi_ticks_factor[configuration.fx.delay_sync[instance_id]] / midi_bpm);
delay_fx[instance_id]->delay(0, constrain(midi_sync_delay_time, DELAY_TIME_MIN, DELAY_TIME_MAX * 10));
}

3195
UI.hpp

File diff suppressed because it is too large Load Diff

@ -96,86 +96,67 @@ LCDML_add(61, LCDML_0_2, 4, "Drum Rev.Send", UI_func_drum_reverb_send);
LCDML_add(62, LCDML_0_2, 5, "Drum Pitch", UI_func_drum_pitch);
LCDML_add(63, LCDML_0_2, 6, "Drum Tune", UI_func_drum_tune_offset);
LCDML_add(64, LCDML_0_2, 7, "MIDI Channel", UI_func_drum_midi_channel);
LCDML_add(65, LCDML_0_2, 8, "Smart Filter", UI_func_smart_filter);
LCDML_add(66, LCDML_0_2, 9, "Cust.DrumMap", UI_func_custom_mappings);
LCDML_add(67, LCDML_0, 3, "E-Piano", NULL);
LCDML_add(68, LCDML_0_3, 1, "Voice Level", UI_func_epiano_sound_intensity);
LCDML_add(69, LCDML_0_3, 2, "Panorama", UI_func_epiano_panorama);
LCDML_add(70, LCDML_0_3, 3, "Sound", NULL);
LCDML_add(71, LCDML_0_3_3, 1, "Decay", UI_func_epiano_decay); // uint8_t decay;
LCDML_add(72, LCDML_0_3_3, 2, "Release", UI_func_epiano_release); // uint8_t release;
LCDML_add(73, LCDML_0_3_3, 3, "Hardness", UI_func_epiano_hardness); // uint8_t hardness;
LCDML_add(74, LCDML_0_3_3, 4, "Treble", UI_func_epiano_treble); // uint8_t treble;
LCDML_add(75, LCDML_0_3_3, 5, "Stereo", UI_func_epiano_stereo); // uint8_t stereo;
LCDML_add(76, LCDML_0_3_3, 6, "Tune", UI_func_epiano_tune); // uint8_t tune;
LCDML_add(77, LCDML_0_3_3, 7, "Detune", UI_func_epiano_detune); // uint8_t detune;
LCDML_add(78, LCDML_0_3, 4, "Effects", NULL);
LCDML_add(79, LCDML_0_3_4, 1, "Overdrive", UI_func_epiano_overdrive); // uint8_t overdrive;
LCDML_add(80, LCDML_0_3_4, 2, "Tremolo", NULL);
LCDML_add(81, LCDML_0_3_4_2, 1, "Width", UI_func_epiano_pan_tremolo); // uint8_t pan_tremolo;
LCDML_add(82, LCDML_0_3_4_2, 2, "LFO", UI_func_epiano_pan_lfo); // uint8_t pan_lfo;
LCDML_add(83, LCDML_0_3_4, 3, "Chorus", NULL);
LCDML_add(84, LCDML_0_3_4_3, 1, "Frequency", UI_func_epiano_chorus_frequency);
LCDML_add(85, LCDML_0_3_4_3, 2, "Waveform", UI_func_epiano_chorus_waveform);
LCDML_add(86, LCDML_0_3_4_3, 3, "Depth", UI_func_epiano_chorus_depth);
LCDML_add(87, LCDML_0_3_4_3, 4, "Level", UI_func_epiano_chorus_level);
LCDML_add(88, LCDML_0_3_4, 4, "Reverb Send", UI_func_epiano_reverb_send);
LCDML_add(89, LCDML_0_3, 6, "MIDI", NULL);
LCDML_add(90, LCDML_0_3_6, 1, "MIDI Channel", UI_func_epiano_midi_channel); // uint8_t midi_channel;
LCDML_add(91, LCDML_0_3_6, 2, "Lowest Note", UI_func_epiano_lowest_note); // uint8_t lowest_note;
LCDML_add(92, LCDML_0_3_6, 3, "Highest Note", UI_func_epiano_highest_note); // uint8_t highest_note;
LCDML_add(93, LCDML_0_3, 7, "Setup", NULL);
LCDML_add(94, LCDML_0_3_7, 4, "Transpose", UI_func_epiano_transpose); // uint8_t transpose;
LCDML_add(95, LCDML_0_3_7, 1, "Polyphony", UI_func_epiano_polyphony); // uint8_t polyphony;
LCDML_add(96, LCDML_0_3_7, 2, "Vel. Sense", UI_func_epiano_velocity_sense); // uint8_t velocity_sense;
LCDML_add(97, LCDML_0, 4, "Master Effects", NULL);
LCDML_add(98, LCDML_0_4, 1, "Reverb", NULL);
LCDML_add(99, LCDML_0_4_1, 1, "Roomsize", UI_func_reverb_roomsize);
LCDML_add(100, LCDML_0_4_1, 2, "Lowpass", UI_func_reverb_lowpass);
LCDML_add(101, LCDML_0_4_1, 3, "Lodamp", UI_func_reverb_lodamp);
LCDML_add(102, LCDML_0_4_1, 4, "Hidamp", UI_func_reverb_hidamp);
LCDML_add(103, LCDML_0_4_1, 5, "Diffusion", UI_func_reverb_diffusion);
LCDML_add(104, LCDML_0_4_1, 6, "Level", UI_func_reverb_level);
LCDML_add(105, LCDML_0_4_1, 7, "Reverb Send", UI_func_reverb_send);
LCDML_add(106, LCDML_0_4, 2, "EQ", NULL);
LCDML_add(107, LCDML_0_4_2, 1, "Low-Cut", UI_func_eq_1);
LCDML_add(108, LCDML_0_4_2, 2, "110Hz", UI_func_eq_2);
LCDML_add(109, LCDML_0_4_2, 3, "220Hz", UI_func_eq_3);
LCDML_add(110, LCDML_0_4_2, 4, "1000Hz", UI_func_eq_4);
LCDML_add(111, LCDML_0_4_2, 5, "2000Hz", UI_func_eq_5);
LCDML_add(112, LCDML_0_4_2, 6, "7000Hz", UI_func_eq_6);
LCDML_add(113, LCDML_0_4_2, 7, "High-Cut", UI_func_eq_7)
LCDML_add(114, LCDML_0, 5, "Sequencer", NULL);
LCDML_add(115, LCDML_0_5, 1, "Pattern Editor", UI_func_seq_pattern_editor);
LCDML_add(116, LCDML_0_5, 2, "Vel./Chrd Edit", UI_func_seq_vel_editor);
LCDML_add(117, LCDML_0_5, 3, "Pattern Chain", UI_func_seq_pat_chain);
LCDML_add(118, LCDML_0_5, 4, "Arpeggio", UI_func_arpeggio);
LCDML_add(119, LCDML_0_5, 5, "Mute Matrix", UI_func_seq_mute_matrix);
LCDML_add(120, LCDML_0_5, 6, "Seq. Settings", NULL);
LCDML_add(121, LCDML_0_5_6, 1, "Tempo", UI_func_seq_tempo);
LCDML_add(122, LCDML_0_5_6, 2, "Seq. Length", UI_func_seq_lenght);
LCDML_add(123, LCDML_0_5_6, 3, "Track Setup", UI_func_seq_track_setup);
LCDML_add(124, LCDML_0_5_6, 4, "Seq.Disp.Style", UI_func_seq_display_style);
LCDML_add(125, LCDML_0_5_6, 5, "Dexed Assign", UI_func_dexed_assign);
LCDML_add(126, LCDML_0_5_6, 6, "Shift&Transp.", UI_func_arp_shift);
LCDML_add(127, LCDML_0_5_6, 7, "L.Transp.Key", UI_func_seq_live_transpose_oct);
LCDML_add(128, LCDML_0_5_6, 8, "ChordTrack Keys", UI_func_seq_chord_keys_ammount);
LCDML_add(129, LCDML_0_5_6, 9, "Smart Filter", UI_func_smart_filter);
LCDML_add(130, LCDML_0, 6, "Load/Save", NULL);
LCDML_add(131, LCDML_0_6, 1, "Load Perf.", UI_func_load_performance);
LCDML_add(132, LCDML_0_6, 2, "Save Perf.", UI_func_save_performance);
LCDML_add(133, LCDML_0_6, 3, "Name Perf.", UI_func_set_performance_name);
LCDML_add(134, LCDML_0_6, 4, "MIDI", NULL);
LCDML_add(135, LCDML_0_6_4, 1, "MIDI Recv Bank", UI_func_sysex_receive_bank);
LCDML_add(136, LCDML_0_6_4, 2, "MIDI Snd Bank", UI_func_sysex_send_bank);
LCDML_add(137, LCDML_0_6_4, 3, "MIDI Snd Voice", UI_func_sysex_send_voice);
LCDML_add(138, LCDML_0, 7, "System", NULL);
LCDML_add(139, LCDML_0_7, 1, "Stereo/Mono", UI_func_stereo_mono);
LCDML_add(140, LCDML_0_7, 2, "MIDI Soft THRU", UI_func_midi_soft_thru);
LCDML_add(141, LCDML_0_7, 3, "Cust. CC Map", UI_func_cc_mappings);
LCDML_add(142, LCDML_0_7, 4, "Favorites", UI_func_favorites);
LCDML_add(143, LCDML_0_7, 5, "Startup", UI_func_startup);
LCDML_add(144, LCDML_0, 8, "Info", UI_func_information);
LCDML_addAdvanced(145, LCDML_0, 9, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default);
#define _LCDML_DISP_cnt 145
LCDML_add(65, LCDML_0, 3, "E-Piano", NULL);
LCDML_add(66, LCDML_0_3, 1, "Voice Level", UI_func_epiano_sound_intensity);
LCDML_add(67, LCDML_0_3, 2, "Panorama", UI_func_epiano_panorama);
LCDML_add(68, LCDML_0_3, 3, "Sound", NULL);
LCDML_add(69, LCDML_0_3_3, 1, "Decay", UI_func_epiano_decay); // uint8_t decay;
LCDML_add(70, LCDML_0_3_3, 2, "Release", UI_func_epiano_release); // uint8_t release;
LCDML_add(71, LCDML_0_3_3, 3, "Hardness", UI_func_epiano_hardness); // uint8_t hardness;
LCDML_add(72, LCDML_0_3_3, 4, "Treble", UI_func_epiano_treble); // uint8_t treble;
LCDML_add(73, LCDML_0_3_3, 5, "Stereo", UI_func_epiano_stereo); // uint8_t stereo;
LCDML_add(74, LCDML_0_3_3, 6, "Tune", UI_func_epiano_tune); // uint8_t tune;
LCDML_add(75, LCDML_0_3_3, 7, "Detune", UI_func_epiano_detune); // uint8_t detune;
LCDML_add(76, LCDML_0_3, 4, "Effects", NULL);
LCDML_add(77, LCDML_0_3_4, 1, "Overdrive", UI_func_epiano_overdrive); // uint8_t overdrive;
LCDML_add(78, LCDML_0_3_4, 2, "Tremolo", NULL);
LCDML_add(79, LCDML_0_3_4_2, 1, "Width", UI_func_epiano_pan_tremolo); // uint8_t pan_tremolo;
LCDML_add(80, LCDML_0_3_4_2, 2, "LFO", UI_func_epiano_pan_lfo); // uint8_t pan_lfo;
LCDML_add(81, LCDML_0_3_4, 3, "Chorus", NULL);
LCDML_add(82, LCDML_0_3_4_3, 1, "Frequency", UI_func_epiano_chorus_frequency);
LCDML_add(83, LCDML_0_3_4_3, 2, "Waveform", UI_func_epiano_chorus_waveform);
LCDML_add(84, LCDML_0_3_4_3, 3, "Depth", UI_func_epiano_chorus_depth);
LCDML_add(85, LCDML_0_3_4_3, 4, "Level", UI_func_epiano_chorus_level);
LCDML_add(86, LCDML_0_3_4, 4, "Reverb Send", UI_func_epiano_reverb_send);
LCDML_add(87, LCDML_0_3, 6, "MIDI", NULL);
LCDML_add(88, LCDML_0_3_6, 1, "MIDI Channel", UI_func_epiano_midi_channel); // uint8_t midi_channel;
LCDML_add(89, LCDML_0_3_6, 2, "Lowest Note", UI_func_epiano_lowest_note); // uint8_t lowest_note;
LCDML_add(90, LCDML_0_3_6, 3, "Highest Note", UI_func_epiano_highest_note); // uint8_t highest_note;
LCDML_add(91, LCDML_0_3, 7, "Setup", NULL);
LCDML_add(92, LCDML_0_3_7, 4, "Transpose", UI_func_epiano_transpose); // uint8_t transpose;
LCDML_add(93, LCDML_0_3_7, 1, "Polyphony", UI_func_epiano_polyphony); // uint8_t polyphony;
LCDML_add(94, LCDML_0_3_7, 2, "Vel. Sense", UI_func_epiano_velocity_sense); // uint8_t velocity_sense;
LCDML_add(95, LCDML_0, 4, "Master Effects", NULL);
LCDML_add(96, LCDML_0_4, 1, "Reverb", NULL);
LCDML_add(97, LCDML_0_4_1, 1, "Roomsize", UI_func_reverb_roomsize);
LCDML_add(98, LCDML_0_4_1, 2, "Lowpass", UI_func_reverb_lowpass);
LCDML_add(99, LCDML_0_4_1, 3, "Lodamp", UI_func_reverb_lodamp);
LCDML_add(100, LCDML_0_4_1, 4, "Hidamp", UI_func_reverb_hidamp);
LCDML_add(101, LCDML_0_4_1, 5, "Diffusion", UI_func_reverb_diffusion);
LCDML_add(102, LCDML_0_4_1, 6, "Level", UI_func_reverb_level);
LCDML_add(103, LCDML_0_4_1, 7, "Reverb Send", UI_func_reverb_send);
LCDML_add(104, LCDML_0_4, 2, "EQ", NULL);
LCDML_add(105, LCDML_0_4_2, 1, "Low-Cut", UI_func_eq_1);
LCDML_add(106, LCDML_0_4_2, 2, "110Hz", UI_func_eq_2);
LCDML_add(107, LCDML_0_4_2, 3, "220Hz", UI_func_eq_3);
LCDML_add(108, LCDML_0_4_2, 4, "1000Hz", UI_func_eq_4);
LCDML_add(109, LCDML_0_4_2, 5, "2000Hz", UI_func_eq_5);
LCDML_add(110, LCDML_0_4_2, 6, "7000Hz", UI_func_eq_6);
LCDML_add(111, LCDML_0_4_2, 7, "High-Cut", UI_func_eq_7)
LCDML_add(112, LCDML_0, 5, "Load/Save", NULL);
LCDML_add(113, LCDML_0_5, 1, "Load Perf.", UI_func_load_performance);
LCDML_add(114, LCDML_0_5, 2, "Save Perf.", UI_func_save_performance);
LCDML_add(115, LCDML_0_5, 3, "Name Perf.", UI_func_set_performance_name);
LCDML_add(116, LCDML_0_5, 4, "MIDI", NULL);
LCDML_add(117, LCDML_0_5_4, 1, "MIDI Recv Bank", UI_func_sysex_receive_bank);
LCDML_add(118, LCDML_0_5_4, 2, "MIDI Snd Bank", UI_func_sysex_send_bank);
LCDML_add(119, LCDML_0_5_4, 3, "MIDI Snd Voice", UI_func_sysex_send_voice);
LCDML_add(120, LCDML_0, 6, "System", NULL);
LCDML_add(121, LCDML_0_6, 1, "Stereo/Mono", UI_func_stereo_mono);
LCDML_add(122, LCDML_0_6, 2, "MIDI Soft THRU", UI_func_midi_soft_thru);
LCDML_add(123, LCDML_0_6, 3, "Favorites", UI_func_favorites);
LCDML_add(124, LCDML_0_6, 4, "Startup", UI_func_startup);
LCDML_add(125, LCDML_0, 7, "Info", UI_func_information);
LCDML_addAdvanced(126, LCDML_0, 8, COND_hide, "Volume", UI_func_volume, 0, _LCDML_TYPE_default);
#define _LCDML_DISP_cnt 126
#endif

@ -1,388 +0,0 @@
{
"seq_data": [
72,
0,
0,
73,
72,
0,
0,
0,
72,
0,
74,
74,
72,
0,
0,
0,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
72,
87,
87,
92,
72,
90,
90,
90,
72,
0,
0,
75,
72,
95,
95,
95,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
77,
77,
77,
77,
77,
77,
77,
77,
77,
77,
77,
77,
77,
77,
0,
0,
55,
0,
0,
0,
0,
0,
52,
0,
0,
0,
0,
0,
0,
0,
0,
0,
57,
0,
0,
0,
0,
0,
53,
0,
0,
0,
0,
0,
0,
0,
0,
0,
74,
0,
0,
72,
0,
0,
74,
0,
0,
0,
76,
130,
130,
130,
130,
0,
74,
0,
0,
72,
0,
0,
71,
0,
0,
0,
67,
130,
0,
0,
0,
0,
69,
0,
0,
76,
0,
0,
69,
130,
130,
130,
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,
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,
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,
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
]
}

@ -1,108 +0,0 @@
{
"seq_patternchain": [
0,
1,
6,
9,
3,
3,
0,
1,
5,
8,
3,
3,
0,
1,
6,
9,
3,
3,
2,
1,
5,
7,
3,
3
],
"seq_tempo_ms": 147058,
"seq_bpm": 102,
"arp_play_basenote": true,
"arp_speed": 0,
"arp_lenght": 8,
"arp_style": 0,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 3,
"seq_transpose": 0,
"chord_key_ammount": 4,
"seq_oct_shift": 0,
"seq_element_shift": 0,
"track_type": [
0,
0,
3,
1,
0,
0
],
"content_type": [
0,
0,
0,
0,
2,
2,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
1,
1,
0,
0
],
"seq_name": [
65,
108,
108,
79,
110,
66,
111,
97,
114,
100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
120,
120,
120,
120,
120,
0,
0,
0,
120,
0,
120,
120,
120,
0,
0,
0,
105,
80,
105,
70,
106,
98,
106,
70,
126,
97,
106,
70,
106,
99,
90,
65,
120,
120,
120,
120,
120,
86,
106,
99,
120,
0,
120,
80,
120,
79,
95,
109,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
10,
30,
50,
70,
90,
100,
127,
100,
60,
40,
30,
0,
200,
200,
200,
200,
200,
200,
200,
201,
0,
0,
0,
0,
0,
0,
0,
0,
200,
201,
200,
200,
200,
200,
200,
200,
200,
0,
0,
0,
0,
0,
0,
0,
0,
98,
120,
0,
88,
120,
0,
127,
120,
0,
0,
125,
120,
0,
0,
0,
0,
124,
120,
0,
115,
0,
0,
126,
120,
0,
120,
127,
120,
0,
0,
0,
0,
123,
120,
0,
110,
120,
0,
90,
120,
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,
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,
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,
0,
0,
0,
0,
0,
0,
0,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
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,108 +0,0 @@
{
"seq_patternchain": [
0,
1,
6,
9,
3,
16,
0,
1,
5,
8,
4,
15,
0,
1,
6,
9,
10,
17,
2,
1,
5,
7,
4,
15
],
"seq_tempo_ms": 145631,
"seq_bpm": 103,
"arp_play_basenote": true,
"arp_speed": 0,
"arp_lenght": 9,
"arp_style": 0,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 3,
"seq_transpose": 0,
"chord_key_ammount": 6,
"seq_oct_shift": -1,
"seq_element_shift": 3,
"track_type": [
0,
0,
2,
1,
0,
0
],
"content_type": [
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
1,
1,
0,
0
],
"seq_name": [
67,
108,
101,
97,
114,
67,
111,
97,
115,
116,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
120,
0,
0,
120,
120,
0,
0,
0,
120,
90,
100,
84,
120,
0,
0,
0,
105,
80,
105,
70,
106,
98,
106,
70,
126,
97,
106,
70,
106,
99,
90,
65,
120,
0,
0,
120,
120,
83,
106,
79,
120,
0,
120,
91,
120,
120,
120,
120,
0,
0,
0,
0,
0,
0,
210,
210,
0,
210,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
210,
210,
0,
210,
0,
0,
0,
0,
0,
0,
200,
200,
200,
200,
200,
200,
201,
0,
0,
0,
0,
0,
0,
0,
0,
200,
201,
200,
200,
200,
200,
200,
200,
200,
0,
0,
0,
0,
0,
0,
0,
0,
98,
120,
0,
88,
120,
0,
127,
120,
0,
0,
125,
120,
0,
0,
0,
0,
124,
120,
0,
115,
0,
0,
126,
120,
0,
120,
127,
120,
0,
0,
0,
0,
123,
120,
0,
110,
120,
0,
90,
120,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
210,
210,
0,
210,
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,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_data": [
72,
0,
76,
0,
72,
72,
76,
0,
72,
0,
76,
0,
72,
72,
76,
0,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78,
78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
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,108 +0,0 @@
{
"seq_patternchain": [
0,
1,
6,
9,
16,
99,
0,
1,
5,
9,
15,
99,
0,
1,
4,
8,
14,
99,
2,
1,
3,
7,
13,
99
],
"seq_tempo_ms": 180722,
"seq_bpm": 83,
"arp_play_basenote": true,
"arp_speed": 0,
"arp_lenght": 5,
"arp_style": 2,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 3,
"seq_transpose": 0,
"chord_key_ammount": 4,
"seq_oct_shift": -1,
"seq_element_shift": 3,
"track_type": [
0,
0,
3,
1,
0,
0
],
"content_type": [
0,
0,
0,
2,
2,
2,
2,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
0,
1,
0,
0
],
"seq_name": [
66,
108,
105,
110,
100,
105,
110,
103,
68,
88,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
108,
0,
127,
120,
98,
114,
125,
120,
108,
0,
127,
0,
90,
106,
115,
120,
127,
127,
124,
116,
124,
127,
125,
120,
125,
127,
123,
124,
125,
127,
123,
100,
109,
0,
127,
120,
92,
103,
125,
120,
103,
0,
126,
0,
106,
119,
127,
119,
200,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
200,
200,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
200,
201,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
200,
201,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
120,
0,
0,
120,
0,
0,
120,
0,
107,
126,
0,
124,
0,
0,
123,
0,
96,
127,
0,
110,
0,
0,
115,
120,
127,
0,
0,
0,
127,
0,
0,
113,
125,
125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,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 1,
"seq_transpose": 0,
"chord_key_ammount": 4,
"seq_oct_shift": -1,
"seq_element_shift": 3,
"track_type": [
0,
0,
0,
1,
0,
0
],
"content_type": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
0,
0,
0,
0
],
"seq_name": [
110,
105,
110,
101,
116,
101,
101,
110,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
120,
120,
0,
120,
120,
0,
0,
120,
0,
0,
120,
0,
120,
0,
120,
102,
120,
105,
120,
102,
120,
104,
120,
106,
120,
109,
120,
103,
120,
108,
120,
120,
120,
99,
120,
106,
120,
113,
113,
105,
120,
108,
120,
110,
120,
109,
120,
120,
120,
0,
0,
120,
0,
0,
120,
0,
0,
0,
120,
120,
120,
0,
0,
0,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
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,
127,
127,
0,
120,
0,
0,
120,
127,
0,
125,
0,
127,
127,
124,
0,
127,
0,
0,
0,
124,
0,
0,
0,
115,
0,
0,
127,
0,
0,
122,
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,
0,
0,
0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,
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,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,108 +0,0 @@
{
"seq_patternchain": [
0,
1,
6,
9,
3,
3,
0,
1,
5,
8,
3,
3,
0,
1,
6,
9,
3,
3,
0,
1,
5,
7,
3,
3
],
"seq_tempo_ms": 154639,
"seq_bpm": 97,
"arp_play_basenote": true,
"arp_speed": 0,
"arp_lenght": 7,
"arp_style": 1,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 3,
"seq_transpose": 0,
"chord_key_ammount": 4,
"seq_oct_shift": 0,
"seq_element_shift": 0,
"track_type": [
0,
0,
3,
1,
0,
0
],
"content_type": [
0,
0,
0,
0,
2,
2,
2,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
0,
1,
0,
0
],
"seq_name": [
77,
117,
116,
101,
100,
83,
116,
111,
114,
109,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
120,
119,
120,
120,
120,
0,
125,
0,
113,
0,
120,
120,
120,
120,
120,
120,
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,
200,
0,
0,
0,
0,
0,
201,
0,
0,
0,
0,
0,
0,
0,
0,
200,
201,
200,
200,
200,
200,
200,
200,
200,
200,
200,
200,
0,
0,
0,
0,
0,
98,
120,
0,
88,
120,
0,
108,
120,
0,
0,
107,
120,
0,
0,
0,
0,
111,
120,
0,
103,
0,
0,
100,
120,
0,
0,
99,
120,
0,
0,
0,
0,
115,
120,
0,
105,
120,
0,
93,
120,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,108 +0,0 @@
{
"seq_patternchain": [
0,
1,
3,
9,
5,
5,
0,
2,
4,
8,
5,
5,
0,
1,
4,
8,
5,
5,
2,
1,
3,
7,
5,
5
],
"seq_tempo_ms": 145631,
"seq_bpm": 103,
"arp_play_basenote": true,
"arp_speed": 0,
"arp_lenght": 5,
"arp_style": 2,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 1,
"seq_transpose": 0,
"chord_key_ammount": 4,
"seq_oct_shift": -1,
"seq_element_shift": 3,
"track_type": [
0,
0,
0,
1,
0,
0
],
"content_type": [
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
0,
0,
0,
0
],
"seq_name": [
68,
114,
68,
114,
117,
109,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
125,
120,
0,
127,
125,
0,
0,
120,
120,
120,
80,
120,
120,
120,
120,
120,
127,
127,
127,
103,
127,
103,
125,
98,
127,
101,
127,
102,
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,
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,
0,
0
]
}

@ -1,108 +0,0 @@
{
"seq_patternchain": [
0,
2,
6,
9,
3,
3,
1,
2,
5,
8,
3,
3,
0,
2,
6,
9,
3,
3,
1,
2,
5,
7,
3,
3
],
"seq_tempo_ms": 156250,
"seq_bpm": 96,
"arp_play_basenote": true,
"arp_speed": 0,
"arp_lenght": 8,
"arp_style": 0,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 3,
"seq_transpose": 0,
"chord_key_ammount": 4,
"seq_oct_shift": 0,
"seq_element_shift": 0,
"track_type": [
0,
0,
0,
0,
0,
0
],
"content_type": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
1,
1,
0,
0
],
"seq_name": [
70,
97,
105,
114,
108,
105,
103,
104,
116,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
210,
210,
0,
210,
210,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
210,
210,
0,
210,
210,
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,
213,
0,
0,
0,
0,
0,
213,
0,
0,
0,
0,
0,
0,
0,
0,
0,
213,
0,
0,
0,
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@
{
"seq_patternchain": [
0,
1,
2,
10,
17,
19,
5,
1,
2,
11,
17,
17,
6,
1,
2,
12,
18,
20,
7,
1,
2,
13,
19,
16
],
"seq_tempo_ms": 150000,
"seq_bpm": 100,
"arp_play_basenote": true,
"arp_speed": 0,
"arp_lenght": 8,
"arp_style": 0,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 3,
"seq_transpose": 0,
"chord_key_ammount": 4,
"seq_oct_shift": 0,
"seq_element_shift": 0,
"track_type": [
0,
0,
0,
1,
0,
0
],
"content_type": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
1,
0,
0,
0
],
"seq_name": [
74,
97,
112,
97,
110,
45,
66,
73,
71,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
210,
210,
0,
210,
210,
120,
210,
210,
210,
210,
120,
210,
210,
0,
210,
210,
120,
0,
0,
0,
106,
0,
0,
0,
120,
0,
0,
0,
107,
0,
0,
0,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
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,
210,
210,
0,
210,
210,
120,
210,
210,
210,
210,
120,
210,
210,
0,
210,
210,
210,
210,
0,
210,
210,
120,
210,
210,
210,
210,
120,
210,
210,
0,
210,
210,
210,
210,
0,
210,
210,
120,
210,
210,
210,
210,
120,
210,
210,
0,
210,
210,
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,
124,
0,
115,
0,
101,
94,
105,
127,
0,
0,
0,
0,
0,
0,
0,
0,
127,
0,
125,
0,
113,
103,
107,
108,
0,
0,
0,
0,
127,
0,
0,
0,
101,
0,
110,
0,
101,
90,
107,
102,
0,
102,
0,
102,
107,
0,
113,
0,
115,
0,
0,
101,
0,
0,
76,
0,
102,
0,
100,
120,
0,
120,
89,
96,
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,
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,
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
]
}

@ -1,388 +0,0 @@
{
"seq_data": [
72,
0,
0,
55,
53,
0,
0,
0,
72,
0,
0,
0,
76,
0,
74,
74,
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,
45,
57,
69,
81,
45,
57,
69,
81,
45,
57,
69,
81,
45,
57,
69,
81,
38,
50,
62,
74,
38,
50,
62,
74,
38,
50,
62,
74,
38,
50,
62,
74,
69,
0,
69,
0,
0,
0,
0,
69,
69,
0,
0,
0,
0,
0,
0,
0,
74,
0,
74,
0,
0,
0,
0,
74,
74,
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,
69,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
76,
0,
76,
78,
74,
0,
0,
0,
0,
0,
0,
0,
0,
0,
72,
0,
74,
0,
76,
69,
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,
64,
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,
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,
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
]
}

@ -1,108 +0,0 @@
{
"seq_patternchain": [
0,
3,
10,
5,
99,
99,
0,
4,
11,
6,
24,
24,
0,
3,
12,
5,
99,
99,
0,
3,
13,
5,
99,
99
],
"seq_tempo_ms": 170454,
"seq_bpm": 88,
"arp_play_basenote": true,
"arp_speed": 0,
"arp_lenght": 8,
"arp_style": 0,
"seq_chord_velocity": 60,
"seq_chord_dexed_inst": 0,
"seq_chain_lenght": 3,
"seq_transpose": 0,
"chord_key_ammount": 4,
"seq_oct_shift": 0,
"seq_element_shift": 0,
"track_type": [
0,
1,
1,
0,
1,
1
],
"content_type": [
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
],
"seq_inst_dexed": [
0,
0,
1,
1,
1,
1
],
"seq_name": [
86,
105,
115,
105,
116,
111,
114,
115,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}

@ -1,388 +0,0 @@
{
"seq_velocity": [
120,
0,
0,
115,
124,
0,
0,
0,
120,
0,
0,
0,
127,
0,
120,
120,
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,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
120,
210,
0,
210,
0,
0,
0,
0,
210,
210,
0,
0,
0,
0,
0,
0,
0,
210,
0,
210,
0,
0,
0,
0,
210,
210,
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,
125,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
126,
0,
125,
125,
127,
0,
0,
0,
0,
0,
0,
0,
0,
0,
92,
0,
95,
0,
102,
123,
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,
124,
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,
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,
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
]
}

@ -331,11 +331,9 @@
#define FAV_CONFIG_NAME "FAVCFG"
#define PERFORMANCE_CONFIG_PATH "PERFORMANCE"
#define SEQUENCER_CONFIG_NAME "sequencer"
#define PERFORMANCE_CONFIG_NAME "performance"
#define DRUMS_CONFIG_NAME "drums"
#define DRUMS_MAPPING_NAME "drmmap"
#define PATTERN_CONFIG_NAME "patterns"
#define VELOCITY_CONFIG_NAME "velocity"
#define FX_CONFIG_NAME "fx"
#define VOICE_CONFIG_NAME "voice"
#define SYS_CONFIG_NAME "sys"
@ -910,10 +908,22 @@ typedef struct sys_s {
uint8_t load_at_startup;
} sys_t;
typedef struct performance_s {
char name[FILENAME_LEN];
char name_temp[FILENAME_LEN];
} performance_t;
typedef struct drums_s {
uint8_t vol;
bool smartfilter;
} drum_t;
typedef struct configuration_s {
performance_t performance;
sys_t sys;
dexed_t dexed[MAX_DEXED];
epiano_t epiano;
drum_t drums;
fx_t fx;
} config_t;

@ -34,7 +34,6 @@ using namespace TeensyTimerTool;
#include "dexed_sd.h"
#include "synth_dexed.h"
#if NUM_DRUMS > 0
#include "sequencer.h"
#include "drums.h"
extern void set_drums_volume(float vol);
extern drum_config_t drum_config[];
@ -46,11 +45,6 @@ extern void check_configuration_dexed(uint8_t instance_id);
extern void check_configuration_performance(void);
extern void check_configuration_fx(void);
extern void check_configuration_epiano(void);
extern void sequencer();
extern sequencer_t seq;
#ifdef USE_SEQUENCER
extern PeriodicTimer sequencer_timer;
#endif
extern float midi_volume_transform(uint8_t midi_amp);
extern void set_sample_note(uint8_t sample, uint8_t note);
extern void set_sample_pitch(uint8_t sample, float playbackspeed);
@ -618,8 +612,9 @@ bool load_sd_drumsettings_json(uint8_t number)
serializeJsonPretty(data_json, Serial);
Serial.println();
#endif
seq.drums_volume = data_json["drums_volume"];
set_drums_volume(seq.drums_volume);
configuration.drums.vol = data_json["drums_volume"];
for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG - 1; i++)
{
uint8_t drumnumber = 0;
@ -687,7 +682,7 @@ bool save_sd_drumsettings_json(uint8_t number)
json = SD.open(filename, FILE_WRITE);
if (json)
{
data_json["drums_volume"] = seq.drums_volume;
data_json["drums_volume"] = configuration.drums.vol;
for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG - 1; i++)
{
data_json["note"][i] = get_sample_note(i);
@ -1378,134 +1373,11 @@ bool save_sd_sys_json(void)
return (false);
}
/******************************************************************************
SD SEQUENCER
******************************************************************************/
bool save_sd_seq_sub_vel_json(uint8_t number)
{
char filename[CONFIG_FILENAME_LEN];
int count = 0;
number = constrain(number, PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX);
if (sd_card > 0)
{
File json;
StaticJsonDocument<JSON_BUFFER_SIZE> data_json;
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, VELOCITY_CONFIG_NAME);
#ifdef DEBUG
Serial.print(F("Saving sequencer velocity "));
Serial.print(number);
Serial.print(F(" to "));
Serial.println(filename);
#endif
int total = sizeof(seq.vel);
int columns = sizeof(seq.vel[0]);
int rows = total / columns;
AudioNoInterrupts();
SD.begin();
SD.remove(filename);
json = SD.open(filename, FILE_WRITE);
if (json)
{
for (uint8_t i = 0; i < rows; i++)
{
for (uint8_t j = 0; j < columns; j++) {
data_json["seq_velocity"][count] = seq.vel[i][j];
count++;
}
}
#if defined(DEBUG) && defined(DEBUG_SHOW_JSON)
Serial.println(F("Write JSON data:"));
serializeJsonPretty(data_json, Serial);
Serial.println();
#endif
serializeJsonPretty(data_json, json);
json.close();
AudioInterrupts();
return (true);
}
json.close();
}
else
{
#ifdef DEBUG
Serial.print(F("E : Cannot open "));
Serial.print(filename);
Serial.println(F(" on SD."));
#endif
}
return (false);
}
bool save_sd_seq_sub_patterns_json(uint8_t number)
{
char filename[CONFIG_FILENAME_LEN];
int count = 0;
number = constrain(number, PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX);
if (sd_card > 0)
{
File json;
StaticJsonDocument<JSON_BUFFER_SIZE> data_json;
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, PATTERN_CONFIG_NAME);
#ifdef DEBUG
Serial.print(F("Saving sequencer patterns "));
Serial.print(number);
Serial.print(F(" to "));
Serial.println(filename);
#endif
int total = sizeof(seq.note_data);
int columns = sizeof(seq.note_data[0]);
int rows = total / columns;
AudioNoInterrupts();
SD.begin();
SD.remove(filename);
json = SD.open(filename, FILE_WRITE);
if (json)
{
for (uint8_t i = 0; i < rows; i++)
{
for (uint8_t j = 0; j < columns; j++) {
data_json["seq_data"][count] = seq.note_data[i][j];
count++;
}
}
#if defined(DEBUG) && defined(DEBUG_SHOW_JSON)
Serial.println(F("Write JSON data:"));
serializeJsonPretty(data_json, Serial);
Serial.println();
#endif
serializeJsonPretty(data_json, json);
json.close();
AudioInterrupts();
return (true);
}
json.close();
}
else
{
#ifdef DEBUG
Serial.print(F("E : Cannot open "));
Serial.print(filename);
Serial.println(F(" on SD."));
#endif
}
return (false);
}
bool save_sd_performance_json(uint8_t number)
{
char filename[CONFIG_FILENAME_LEN];
int count = 0;
bool seq_was_running = false;
number = constrain(number, PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX);
if (seq.running == true ) {
seq_was_running = true;
handleStop();
}
dac_mute();
AudioNoInterrupts();
@ -1517,8 +1389,6 @@ bool save_sd_performance_json(uint8_t number)
Serial.println(number);
#endif
save_sd_seq_sub_vel_json(number);
save_sd_seq_sub_patterns_json(number);
save_sd_drummappings_json(number);
save_sd_fx_json(number);
save_sd_epiano_json(number);
@ -1527,70 +1397,31 @@ bool save_sd_performance_json(uint8_t number)
{
sprintf(filename, "/%s/%d/%s%d.json", PERFORMANCE_CONFIG_PATH, number, VOICE_CONFIG_NAME, i);
#ifdef DEBUG
Serial.print(F("Write Voice-Config for sequencer"));
Serial.print(F("Write Voice-Config"));
Serial.println(filename);
#endif
save_sd_voiceconfig_json(number, i);
}
if (sd_card > 0)
{
File json;
StaticJsonDocument<JSON_BUFFER_SIZE> data_json;
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, SEQUENCER_CONFIG_NAME);
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, PERFORMANCE_CONFIG_NAME);
#ifdef DEBUG
Serial.print(F("Saving sequencer config "));
Serial.print(F("Saving performance config "));
Serial.print(number);
Serial.print(F(" to "));
Serial.println(filename);
#endif
int total = sizeof(seq.patternchain);
int columns = sizeof(seq.patternchain[0]);
int rows = total / columns;
Serial.print(F(" "));
SD.remove(filename);
json = SD.open(filename, FILE_WRITE);
if (json)
{
Serial.print(F("Chain Rows: "));
Serial.print(rows);
Serial.print(" Chain Columns: ");
Serial.print(columns);
Serial.print(F(" "));
count = 0;
for (uint8_t i = 0; i < rows; i++)
{
for (uint8_t j = 0; j < columns; j++) {
data_json["seq_patternchain"][count] = seq.patternchain[i][j];
count++;
}
}
count = 0;
data_json["seq_tempo_ms"] = seq.tempo_ms ;
data_json["seq_bpm"] = seq.bpm;
data_json["arp_play_basenote"] = seq.arp_play_basenote;
data_json["arp_speed"] = seq.arp_speed;
data_json["arp_lenght"] = seq.arp_lenght;
data_json["arp_style"] = seq.arp_style;
data_json["seq_chord_velocity"] = seq.chord_velocity;
data_json["seq_chord_dexed_inst"] = seq.chord_dexed_inst;
data_json["seq_chain_lenght"] = seq.chain_lenght;
data_json["seq_transpose"] = seq.transpose;
data_json["chord_key_ammount"] = seq.chord_key_ammount;
data_json["seq_oct_shift"] = seq.oct_shift;
data_json["seq_element_shift"] = seq.element_shift;
for (uint8_t i = 0; i < sizeof(seq.track_type); i++) {
data_json["track_type"][i] = seq.track_type[i];
}
for (uint8_t i = 0; i < sizeof(seq.content_type); i++) {
data_json["content_type"][i] = seq.content_type[i];
}
for (uint8_t i = 0; i < sizeof(seq.inst_dexed); i++) {
data_json["seq_inst_dexed"][i] = seq.inst_dexed[i];
}
for (uint8_t i = 0; i < FILENAME_LEN; i++) {
data_json["seq_name"][i] = seq.name[i];
data_json["name"][i] = configuration.performance.name[i];
}
#if defined(DEBUG) && defined(DEBUG_SHOW_JSON)
Serial.println(F("Write JSON data:"));
serializeJsonPretty(data_json, Serial);
@ -1600,8 +1431,6 @@ bool save_sd_performance_json(uint8_t number)
json.close();
AudioInterrupts();
dac_unmute();
if (seq_was_running == true )
handleStart();
return (true);
}
json.close();
@ -1664,14 +1493,13 @@ bool check_performance_directory(uint8_t number)
void get_sd_performance_name_json(uint8_t number)
{
number = constrain(number, PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX);
memset(seq.name_temp, 0, FILENAME_LEN);
if (sd_card > 0)
{
File json;
StaticJsonDocument<JSON_BUFFER_SIZE> data_json;
char filename[CONFIG_FILENAME_LEN];
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, SEQUENCER_CONFIG_NAME);
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, PERFORMANCE_CONFIG_NAME);
// first check if file exists...
AudioNoInterrupts();
@ -1687,15 +1515,15 @@ void get_sd_performance_name_json(uint8_t number)
json.close();
AudioInterrupts();
}
if (data_json["seq_name"][0] != 0) {
if (data_json["performance_name"][0] != 0) {
for (uint8_t i = 0; i < FILENAME_LEN; i++) {
seq.name_temp[i] = data_json["seq_name"][i];
configuration.performance.name_temp[i] = data_json["name"][i];
}
#ifdef DEBUG
Serial.print(F("Get performance name for "));
Serial.print(number);
Serial.print(F(": "));
Serial.print(seq.name_temp);
Serial.print(configuration.performance.name_temp);
Serial.println();
#endif
}
@ -1711,162 +1539,12 @@ void get_sd_performance_name_json(uint8_t number)
}
}
bool load_sd_seq_sub_vel_json(uint8_t number)
{
if (number < 0)
return (false);
number = constrain(number, PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX);
if (sd_card > 0)
{
File json;
StaticJsonDocument<JSON_BUFFER_SIZE> data_json;
char filename[CONFIG_FILENAME_LEN];
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, VELOCITY_CONFIG_NAME);
// first check if file exists...
AudioNoInterrupts();
if (SD.exists(filename))
{
// ... and if: load
#ifdef DEBUG
Serial.print(F("Found velocity data ["));
Serial.print(filename);
Serial.println(F("]... loading..."));
Serial.println(F(" "));
#endif
json = SD.open(filename);
if (json)
{
deserializeJson(data_json, json);
json.close();
AudioInterrupts();
#if defined(DEBUG) && defined(DEBUG_SHOW_JSON)
Serial.println(F("Read JSON data:"));
serializeJsonPretty(data_json, Serial);
Serial.println();
#endif
int total = sizeof(seq.vel);
int columns = sizeof(seq.vel[0]);
int rows = total / columns;
int count = 0;
for (uint8_t i = 0; i < rows; i++)
{
for (uint8_t j = 0; j < columns; j++) {
seq.vel[i][j] = data_json["seq_velocity"][count];
count++;
}
}
return (true);
}
#ifdef DEBUG
else
{
Serial.print(F("E: Cannot open "));
Serial.print(filename);
Serial.println(F(" on SD."));
}
}
else
{
Serial.print(F("No "));
Serial.print(filename);
Serial.println(F(" available."));
#endif
}
}
return (false);
}
bool load_sd_seq_sub_patterns_json(uint8_t number)
{
if (number < 0)
return (false);
number = constrain(number, PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX);
if (sd_card > 0)
{
File json;
StaticJsonDocument<JSON_BUFFER_SIZE> data_json;
char filename[CONFIG_FILENAME_LEN];
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, PATTERN_CONFIG_NAME);
// first check if file exists...
AudioNoInterrupts();
if (SD.exists(filename))
{
// ... and if: load
#ifdef DEBUG
Serial.print(F("Found pattern data ["));
Serial.print(filename);
Serial.println(F("]... loading..."));
Serial.println(F(" "));
#endif
json = SD.open(filename);
if (json)
{
deserializeJson(data_json, json);
json.close();
AudioInterrupts();
#if defined(DEBUG) && defined(DEBUG_SHOW_JSON)
Serial.println(F("Read JSON data:"));
serializeJsonPretty(data_json, Serial);
Serial.println();
#endif
int total = sizeof(seq.note_data);
int columns = sizeof(seq.note_data[0]);
int rows = total / columns;
int count = 0;
for (uint8_t i = 0; i < rows; i++)
{
for (uint8_t j = 0; j < columns; j++) {
seq.note_data[i][j] = data_json["seq_data"][count];
count++;
}
}
return (true);
}
#ifdef DEBUG
else
{
Serial.print(F("E : Cannot open "));
Serial.print(filename);
Serial.println(F(" on SD."));
}
}
else
{
Serial.print(F("No "));
Serial.print(filename);
Serial.println(F(" available."));
#endif
}
}
return (false);
}
bool load_sd_performance_json(uint8_t number)
{
#ifdef USE_SEQUENCER
bool seq_was_running = false;
if (seq.running)
{
seq_was_running = true;
seq.running = false;
}
#endif
dac_mute();
handleStop();
number = constrain(number, PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX);
AudioNoInterrupts();
load_sd_seq_sub_patterns_json(number);
load_sd_seq_sub_vel_json(number);
load_sd_fx_json(number);
load_sd_epiano_json(number);
load_sd_drummappings_json(number);
@ -1875,126 +1553,25 @@ bool load_sd_performance_json(uint8_t number)
{
File json;
StaticJsonDocument<JSON_BUFFER_SIZE> data_json;
char filename[CONFIG_FILENAME_LEN];
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, SEQUENCER_CONFIG_NAME);
// first check if file exists...
if (SD.exists(filename))
{
// ... and if: load
#ifdef DEBUG
Serial.print(F("Found Performance configuration ["));
Serial.print(filename);
Serial.println(F("]... loading..."));
#endif
AudioNoInterrupts();
json = SD.open(filename);
if (json)
{
deserializeJson(data_json, json);
json.close();
AudioInterrupts();
#if defined(DEBUG) && defined(DEBUG_SHOW_JSON)
Serial.println(F("Read JSON data:"));
serializeJsonPretty(data_json, Serial);
Serial.println();
#endif
int total = sizeof(seq.patternchain);
int columns = sizeof(seq.patternchain[0]);
int rows = total / columns;
int count = 0;
for (uint8_t i = 0; i < rows; i++)
{
for (uint8_t j = 0; j < columns; j++)
{
seq.patternchain[i][j] = data_json["seq_patternchain"][count];
count++;
}
}
for (uint8_t i = 0; i < sizeof(seq.track_type); i++)
{
seq.track_type[i] = data_json["track_type"][i];
}
for (uint8_t i = 0; i < sizeof(seq.content_type); i++)
{
seq.content_type[i] = data_json["content_type"][i];
}
for (uint8_t i = 0; i < sizeof(seq.inst_dexed); i++)
{
seq.inst_dexed[i] = data_json["seq_inst_dexed"][i];
}
if (data_json["seq_name"][0] != 0)
{
for (uint8_t i = 0; i < FILENAME_LEN; i++)
{
seq.name[i] = data_json["seq_name"][i];
}
}
count = 0;
seq.tempo_ms = data_json["seq_tempo_ms"] ;
seq.bpm = data_json["seq_bpm"];
seq.arp_play_basenote = data_json["arp_play_basenote"];
seq.arp_speed = data_json["arp_speed"] ;
seq.arp_lenght = data_json["arp_lenght"];
seq.arp_style = data_json["arp_style"];
seq.chord_velocity = data_json["seq_chord_velocity"];
seq.chord_dexed_inst = data_json["seq_chord_dexed_inst"] ;
seq.chain_lenght = data_json["seq_chain_lenght"];
seq.transpose = data_json["seq_transpose"];
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"];
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{
#ifdef DEBUG
Serial.print(F("Load Voice-Config "));
Serial.print(instance_id + 1);
Serial.print(F(" for sequencer"));
Serial.print(F("Load Voice-Config "));
Serial.println(instance_id + 1);
#endif
load_sd_voiceconfig_json(number, instance_id);
load_sd_voice(configuration.dexed[instance_id].bank, configuration.dexed[instance_id].voice, instance_id);
MicroDexed[instance_id]->setGain(midi_volume_transform(map(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0, 127)));
MicroDexed[instance_id]->panic();
}
/* for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
set_voiceconfig_params(instance_id);
load_sd_voiceconfig_json(number, instance_id);
load_sd_voice(configuration.dexed[instance_id].bank, configuration.dexed[instance_id].voice, instance_id);
MicroDexed[instance_id]->setGain(midi_volume_transform(map(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0, 127)));
MicroDexed[instance_id]->panic();
}
set_fx_params();*/
dac_unmute();
AudioInterrupts();
dac_unmute();
seq.step = 0;
seq.chain_active_step = 0;
#ifdef USE_SEQUENCER
if (seq_was_running)
{
sequencer_timer.begin(sequencer, seq.tempo_ms / 2);
seq.running = true;
}
else
sequencer_timer.begin(sequencer, seq.tempo_ms / 2, false);
#else
seq.running = false;
#endif
return (true);
}
#ifdef DEBUG
else
{
AudioInterrupts();
Serial.print(F("E : Cannot open "));
Serial.print(filename);
Serial.println(F(" on SD."));
}
}
else
{
Serial.print(F("No "));
Serial.print(filename);
Serial.println(F(" available."));
#endif
}
return (true);
}
return (false);
}
@ -2009,7 +1586,7 @@ bool check_sd_performance_exists(uint8_t number)
{
char filename[CONFIG_FILENAME_LEN];
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, SEQUENCER_CONFIG_NAME);
sprintf(filename, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, number, PERFORMANCE_CONFIG_NAME);
// check if file exists...
if (SD.exists(filename))

File diff suppressed because it is too large Load Diff

@ -1,250 +0,0 @@
/*
MicroDexed
MicroDexed is a port of the Dexed sound engine
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6/4.x with audio shield.
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2021-2022 H. Wirtz <wirtz@parasitstudio.de>, M. Koslowski <positionhigh@gmx.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include "sequencer.h"
#include <LCDMenuLib2.h>
#include <LiquidCrystal_I2C.h>
extern LCDMenuLib2 LCDML;
//extern LiquidCrystal_I2C lcd;
extern config_t configuration;
extern uint8_t drum_midi_channel;
extern uint8_t activesample;
extern uint8_t get_sample_note(uint8_t sample);
extern void handleNoteOn(byte , byte , byte );
extern void handleNoteOff(byte , byte , byte );
extern void UI_func_seq_pattern_editor(uint8_t);
extern void UI_func_arpeggio(uint8_t);
extern const char* seq_find_shortname(uint8_t);
extern void set_sample_pitch (uint8_t, float); //float32_t not working
extern float get_sample_vol_max(uint8_t);
extern float get_sample_p_offset(uint8_t);
boolean interrupt_swapper = false;
sequencer_t seq;
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.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);
}
else
seq.vel[seq.active_track][seq.step] = seq.note_in_velocity;
seq.note_in = 0;
seq.note_in_velocity = 0;
}
}
void sequencer_part1(void)
{
//if (seq.note_in > 0 && seq.note_in < 62 && seq.recording == false ) {
//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;
//seq.note_in = 0;
//}
seq_live_recording();
for (uint8_t d = 0; d < NUM_SEQ_TRACKS; d++)
{
if (seq.patternchain[seq.chain_active_step][d] < NUM_SEQ_PATTERN ) // sequence not empty or muted
{
if ( seq.track_type[d] == 0)
{ // drum track (drum samples and pitched one-shot samples)
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.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.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.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.note_data[seq.patternchain[seq.chain_active_step][d]][seq.step] != 130 )
{
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];
}
}
else if (seq.track_type[d] == 2 ) //Chords
{
if (seq.vel[ seq.patternchain[seq.chain_active_step][d]][seq.step] > 199)
{
//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.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.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.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;
}
}
// after here not triggered by a key input - arp only
if (seq.track_type[d] == 3)
{ //Arp
if (seq.arp_speed == 0 || (seq.arp_speed == 1 && seq.arp_counter == 0) ) {
{ if (seq.arp_style == 0) { //arp up
handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.arp_note + seq.arps[seq.arp_chord][seq.arp_step + seq.element_shift], seq.chord_velocity);
seq.arp_note_prev = seq.arp_note + seq.arps[seq.arp_chord][seq.arp_step + seq.element_shift] ;
}
else if (seq.arp_style == 1) { //arp down
handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.arp_note + seq.arps[seq.arp_chord][seq.arp_lenght - seq.arp_step + seq.element_shift], seq.chord_velocity);
seq.arp_note_prev = seq.arp_note + seq.arps[seq.arp_chord][seq.arp_lenght - seq.arp_step + seq.element_shift] ;
}
else if (seq.arp_style == 2) { //arp up & down
if (seq.arp_step <= seq.arp_lenght) {
handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.arp_note + seq.arps[seq.arp_chord][seq.arp_step ], seq.chord_velocity);
seq.arp_note_prev = seq.arp_note + seq.arps[seq.arp_chord][seq.arp_step ] ;
}
else {
handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.arp_note + seq.arps[seq.arp_chord][seq.arp_lenght * 2 - seq.arp_step ], seq.chord_velocity);
seq.arp_note_prev = seq.arp_note + seq.arps[seq.arp_chord][seq.arp_lenght * 2 - seq.arp_step ] ;
}
}
else if (seq.arp_style == 3) { //arp random
uint8_t rnd1 = random(seq.arp_lenght);
handleNoteOn(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.arp_note + seq.arps[seq.arp_chord][rnd1 + seq.element_shift] + (seq.oct_shift * 12), seq.chord_velocity);
seq.arp_note_prev = seq.arp_note + seq.arps[seq.arp_chord][rnd1 + seq.element_shift] + (seq.oct_shift * 12);
}
}
}
}
}
}
seq.noteoffsent[d] = false;
}
seq.arp_counter++;
seq.step++;
if (seq.arp_speed == 0) // Arp Speed 1/16
{
seq.arp_step++;
}
else
{
// Arp Speed 1/8
if (seq.arp_counter > 1) {
seq.arp_counter = 0;
seq.arp_step++;
}
}
if (seq.arp_style != 2) {
if ( (seq.arp_step > 1 && seq.arps[seq.arp_chord][seq.arp_step] == 0) || seq.arp_step == seq.arp_lenght)
{
seq.arp_step = 0;
}
}
if (seq.arp_style == 1 || seq.arp_style == 2 )
{
if (seq.arp_lenght == 0)seq.arp_lenght = 9;
}
if ( seq.arp_style == 2 ) //only for up&down
{
if ( (seq.arp_step > 1 && seq.arps[seq.arp_chord][seq.arp_step] == 0) || seq.arp_step == seq.arp_lenght * 2)
{
seq.arp_step = 0;
}
}
if (seq.step > 15)
{
seq.step = 0;
if (seq.chain_lenght > 0) {
seq.chain_active_step++;
if (seq.chain_active_step > seq.chain_lenght)
{
seq.chain_active_step = 0;
}
}
}
}
void sequencer_part2(void)
{
seq_live_recording();
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)
{
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;
}
if (seq.track_type[d] == 2) { //Chords
if ( seq.prev_vel[d] > 199) {
for (uint8_t x = seq.element_shift; x < seq.element_shift + seq.chord_key_ammount; x++) //play chord notes
{
handleNoteOff(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.prev_note[d] + seq.arps[seq.prev_vel[d] - 200][x], 0);
seq.noteoffsent[d] = true;
}
}
}
else if (seq.track_type[d] == 3)
{ //Arp
handleNoteOff(configuration.dexed[seq.chord_dexed_inst].midi_channel, seq.arp_note_prev, 0);
seq.noteoffsent[d] = true;
}
}
}
}
}
void sequencer(void)
{ // Runs in Interrupt Timer. Switches between the Noteon and Noteoff Task, each cycle
interrupt_swapper = !interrupt_swapper;
if (interrupt_swapper) sequencer_part1();
else sequencer_part2();
}

@ -1,133 +0,0 @@
/*
MicroDexed
MicroDexed is a port of the Dexed sound engine
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6/4.x with audio shield.
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018-2022 H. Wirtz <wirtz@parasitstudio.de>
(c)2021-2022 H. Wirtz <wirtz@parasitstudio.de>, M. Koslowski <positionhigh@gmx.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _SEQUENCER_H
#define _SEQUENCER_H
typedef struct sequencer_s
{
bool midi_learn_active = false;
float drums_volume;
uint8_t active_track = 0;
uint8_t menu;
bool noteoffsent[NUM_SEQ_TRACKS] = {false, false, false, false, false, false};
uint8_t inst_dexed[NUM_SEQ_TRACKS] = { 0, 0, 1, 1 , 1, 1 };
uint8_t step = 0;
bool running = false;
bool recording = false;
bool smartfilter = true;
uint8_t state_last_loadsave = 200;
char name[FILENAME_LEN];
char name_temp[FILENAME_LEN];
uint8_t note_in;
uint8_t note_in_velocity;
int transpose;
uint8_t chord_dexed_inst = 0;
uint8_t chord_velocity = 60;
uint8_t chord_key_ammount = 4;
uint8_t element_shift = 0;
int oct_shift = 0;
uint8_t arp_style = 0; // up, down, up&down, random
const uint8_t arps[6][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
};
const char chord_names[7][4] = {
{'M', 'a', 'j', ' '}, //major
{'M', 'i', 'n', ' '},
{'s', 'e', 'v', ' '},
{'a', 'u', 'g', ' '},
{'d', 'i', 'm', ' '},
{ 'M', 'a', 'j', '7'},
{ 'N', 'o', 'C', 'd'}
};
const char arp_style_names[4][3] = {
{ 'u', 'p', ' '},
{'d', 'w', 'n'},
{'u', '&', 'd'},
{'R', 'N', 'D'}
};
int tempo_ms = 180000;
int bpm = 102;
uint8_t temp_select_menu;
uint8_t temp_active_menu = 99;
uint8_t chain_active_chainstep;
uint8_t chain_lenght = 3; // 0 = 16 steps, 1 = 32 Steps, 2 = 46 Steps, 3 = 64 Steps
uint8_t chain_active_step = 0;
uint8_t prev_note[NUM_SEQ_TRACKS]; // note_offs for every (instr.) track
uint8_t prev_vel[NUM_SEQ_TRACKS];
uint8_t arp_step;
uint8_t arp_note;
uint8_t arp_chord = 6;
bool arp_play_basenote = true;
uint8_t arp_note_prev;
uint8_t arp_octave;
uint8_t arp_prev_oct;
uint8_t arp_speed = 0;
uint8_t arp_counter = 0;
uint8_t arp_lenght = 8;
uint8_t data_buffer[16] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
uint8_t note_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 },
{ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 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chain[4][NUM_SEQ_TRACKS] = {
{ 0 , 2 , 6 , 9 , 99, 99 },
{ 1 , 2 , 5 , 8 , 99, 99 },
{ 0 , 2 , 6 , 9 , 99, 99 },
{ 1 , 2 , 5 , 7 , 99, 99 }
};
uint8_t track_type[NUM_SEQ_TRACKS] = { 0, 0, 1, 1, 1, 1 }; // 0 = track is Drumtrack, 1 = Instrumenttrack, 2 = Chord, 3 = Arp
} sequencer_t;
#endif
Loading…
Cancel
Save