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