|
|
|
@ -164,18 +164,22 @@ extern LCDMenuLib2 LCDML; |
|
|
|
|
extern uint8_t menu_state; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
|
void change_disp_sd(bool disp) |
|
|
|
|
{ |
|
|
|
|
digitalWrite(SDCARD_CS_PIN, disp); |
|
|
|
|
digitalWrite(U8X8_CS_PIN, !disp); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
void setup() |
|
|
|
|
{ |
|
|
|
|
//while (!Serial) ; // wait for Arduino Serial Monitor
|
|
|
|
|
Serial.begin(SERIAL_SPEED); |
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
|
pinMode(SDCARD_CS_PIN, OUTPUT); |
|
|
|
|
pinMode(U8X8_CS_PIN, OUTPUT); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
|
setup_ui(); |
|
|
|
@ -251,7 +255,9 @@ void setup() |
|
|
|
|
SPI.setMOSI(SDCARD_MOSI_PIN); |
|
|
|
|
SPI.setSCK(SDCARD_SCK_PIN); |
|
|
|
|
#endif |
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
|
change_disp_sd(false); |
|
|
|
|
#endif |
|
|
|
|
if (!SD.begin(SDCARD_CS_PIN)) |
|
|
|
|
{ |
|
|
|
|
Serial.println(F("SD card not accessable.")); |
|
|
|
@ -290,7 +296,9 @@ void setup() |
|
|
|
|
// load default SYSEX data
|
|
|
|
|
load_sysex(configuration.bank, configuration.voice); |
|
|
|
|
} |
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
|
change_disp_sd(true); |
|
|
|
|
#endif |
|
|
|
|
// Init effects
|
|
|
|
|
if (!modchorus.begin(delayline, MOD_DELAY_SAMPLE_BUFFER)) { |
|
|
|
|
Serial.println(F("AudioEffectModulatedDelay - right channel begin failed")); |
|
|
|
@ -426,7 +434,6 @@ void loop() |
|
|
|
|
{ |
|
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
|
// LCD Menu
|
|
|
|
|
delay(1); |
|
|
|
|
LCDML.loop(); |
|
|
|
|
|
|
|
|
|
// initial starts voice selection menu as default
|
|
|
|
|