|
|
|
@ -258,7 +258,7 @@ void setup() |
|
|
|
|
pinMode(U8X8_CS_PIN, OUTPUT); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
delay(320); // necessary, because before this time no serial output is done :(
|
|
|
|
|
delay(320); // necessary, because before no serial output is done :(
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
|
setup_ui(); |
|
|
|
@ -271,6 +271,9 @@ void setup() |
|
|
|
|
Serial.println(F("https://codeberg.org/dcoredump/MicroDexed")); |
|
|
|
|
Serial.print(F("Version: ")); |
|
|
|
|
Serial.println(VERSION); |
|
|
|
|
Serial.print(F("CPU-Speed: ")); |
|
|
|
|
Serial.print(F_CPU / 1000000.0, 1); |
|
|
|
|
Serial.println(F(" MHz")); |
|
|
|
|
Serial.println(F("<setup start>")); |
|
|
|
|
Serial.flush(); |
|
|
|
|
|
|
|
|
@ -296,8 +299,9 @@ void setup() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
// Init EEPROM if both buttons are pressed at startup
|
|
|
|
|
/* if (digitalRead(BUT_R_PIN) == LOW)
|
|
|
|
|
if (digitalRead(BUT_R_PIN) == HIGH && digitalRead(BUT_L_PIN) == HIGH) |
|
|
|
|
{ |
|
|
|
|
Serial.println(F("Init EEPROM")); |
|
|
|
|
lcd.clear(); |
|
|
|
@ -306,9 +310,10 @@ void setup() |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("EEPROM")); |
|
|
|
|
initial_values_from_eeprom(true); |
|
|
|
|
delay(2000); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
initial_values_from_eeprom(false); */ |
|
|
|
|
*/ |
|
|
|
|
initial_values_from_eeprom(false); |
|
|
|
|
|
|
|
|
|
#if defined(TEENSY_AUDIO_BOARD) |
|
|
|
@ -650,7 +655,7 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) |
|
|
|
|
{ |
|
|
|
|
if (checkMidiChannel(inChannel, instance_id)) |
|
|
|
|
{ |
|
|
|
|
if (inNumber >= configuration.dexed[instance_id].note_start && inNumber <= configuration.dexed[instance_id].note_end) |
|
|
|
|
if (inNumber >= configuration.dexed[instance_id].lowest_note && inNumber <= configuration.dexed[instance_id].highest_note) |
|
|
|
|
MicroDexed[instance_id]->keydown(inNumber, inVelocity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -662,6 +667,7 @@ void handleNoteOff(byte inChannel, byte inNumber, byte inVelocity) |
|
|
|
|
{ |
|
|
|
|
if (checkMidiChannel(inChannel, instance_id)) |
|
|
|
|
{ |
|
|
|
|
if (inNumber >= configuration.dexed[instance_id].lowest_note && inNumber <= configuration.dexed[instance_id].highest_note) |
|
|
|
|
MicroDexed[instance_id]->keyup(inNumber); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1408,8 +1414,8 @@ void init_configuration(void) |
|
|
|
|
configuration.dexed[instance_id].midi_channel = DEFAULT_MIDI_CHANNEL; |
|
|
|
|
configuration.dexed[instance_id].bank = SYSEXBANK_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].voice = SYSEXSOUND_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].note_start = INSTANCE_NOTE_START_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].note_end = INSTANCE_NOTE_END_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].lowest_note = INSTANCE_LOWEST_NOTE_MIN; |
|
|
|
|
configuration.dexed[instance_id].highest_note = INSTANCE_HIGHEST_NOTE_MAX; |
|
|
|
|
configuration.dexed[instance_id].reverb_send = REVERB_SEND_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].chorus_send = CHORUS_SEND_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].delay_send = DELAY_SEND_DEFAULT; |
|
|
|
@ -1625,12 +1631,14 @@ void show_configuration(void) |
|
|
|
|
Serial.print(F(" MIDI-Channel ")); Serial.println(configuration.dexed[instance_id].midi_channel, DEC); |
|
|
|
|
Serial.print(F(" Bank ")); Serial.println(configuration.dexed[instance_id].bank, DEC); |
|
|
|
|
Serial.print(F(" Voice ")); Serial.println(configuration.dexed[instance_id].voice, DEC); |
|
|
|
|
Serial.print(F(" Lowest Note ")); Serial.println(configuration.dexed[instance_id].lowest_note, DEC); |
|
|
|
|
Serial.print(F(" Highest Note ")); Serial.println(configuration.dexed[instance_id].highest_note, DEC); |
|
|
|
|
Serial.print(F(" Reverb Send ")); Serial.println(configuration.dexed[instance_id].reverb_send, DEC); |
|
|
|
|
Serial.print(F(" Chorus Send ")); Serial.println(configuration.dexed[instance_id].chorus_send, DEC); |
|
|
|
|
Serial.print(F(" Delay Send ")); Serial.println(configuration.dexed[instance_id].delay_send, DEC); |
|
|
|
|
Serial.print(F(" Filter Cutoff ")); Serial.println(configuration.dexed[instance_id].filter_cutoff, DEC); |
|
|
|
|
Serial.print(F(" Filter Resonance ")); Serial.println(configuration.dexed[instance_id].filter_resonance, DEC); |
|
|
|
|
Serial.print(F(" Loudness ")); Serial.println(configuration.dexed[instance_id].sound_intensity, DEC); |
|
|
|
|
Serial.print(F(" Sound Intensity ")); Serial.println(configuration.dexed[instance_id].sound_intensity, DEC); |
|
|
|
|
Serial.print(F(" Panorama ")); Serial.println(configuration.dexed[instance_id].pan, DEC); |
|
|
|
|
Serial.print(F(" Transpose ")); Serial.println(configuration.dexed[instance_id].transpose, DEC); |
|
|
|
|
Serial.print(F(" Tune ")); Serial.println(configuration.dexed[instance_id].tune, DEC); |
|
|
|
@ -1646,6 +1654,7 @@ void show_configuration(void) |
|
|
|
|
Serial.print(F(" BreathCtrl Range ")); Serial.println(configuration.dexed[instance_id].bc_range, DEC); |
|
|
|
|
Serial.print(F(" Breathctrl Assign ")); Serial.println(configuration.dexed[instance_id].bc_assign, DEC); |
|
|
|
|
Serial.print(F(" Aftertouch Range ")); Serial.println(configuration.dexed[instance_id].at_range, DEC); |
|
|
|
|
Serial.print(F(" Aftertouch Assign ")); Serial.println(configuration.dexed[instance_id].at_range, DEC); |
|
|
|
|
Serial.print(F(" Portamento Mode ")); Serial.println(configuration.dexed[instance_id].portamento_mode, DEC); |
|
|
|
|
Serial.print(F(" Portamento Glissando ")); Serial.println(configuration.dexed[instance_id].portamento_glissando, DEC); |
|
|
|
|
Serial.print(F(" Portamento Time ")); Serial.println(configuration.dexed[instance_id].portamento_time, DEC); |
|
|
|
|