Changed to LiquidMenu library.

dev
Holger Wirtz 6 years ago
parent c1e18e3790
commit 8e6a00ff45
  1. 27
      MicroMDAEPiano.ino

@ -34,10 +34,10 @@
#else #else
#include "mdaEPianoData.h" #include "mdaEPianoData.h"
#endif #endif
//#include <Bounce.h> #include <Bounce.h>
//#include "Encoder4.h" #include "Encoder4.h"
//#include "LiquidCrystalPlus_I2C.h" #include <LiquidCrystal_I2C.h>
//#include "UI.h" #include <LiquidMenu.h>
#include "midi_devices.hpp" #include "midi_devices.hpp"
//************************************************************************************************* //*************************************************************************************************
@ -87,6 +87,10 @@ AudioConnection patchCord13(volume_l, 0, pt8211_1, 0);
// Objects // Objects
mdaEPiano* ep; mdaEPiano* ep;
LiquidCrystal_I2C lcd(LCD_I2C_ADDRESS, LCD_CHARS, LCD_LINES);
Encoder4 enc[2] = {Encoder4(ENC_L_PIN_A, ENC_L_PIN_B), Encoder4(ENC_R_PIN_A, ENC_R_PIN_B)};
int32_t enc_val[2] = {INITIAL_ENC_L_VALUE, INITIAL_ENC_R_VALUE};
Bounce but[2] = {Bounce(BUT_L_PIN, BUT_DEBOUNCE_MS), Bounce(BUT_R_PIN, BUT_DEBOUNCE_MS)};
// Variables // Variables
uint8_t midi_channel = DEFAULT_MIDI_CHANNEL; uint8_t midi_channel = DEFAULT_MIDI_CHANNEL;
@ -105,6 +109,11 @@ elapsedMillis cpu_mem_millis;
enum MDA_EP_PARAM { DECAY, RELEASE, HARDNESS, TREBLE, PAN_TREM, LFO_RATE, VELOCITY_SENSE, STEREO, MAX_POLY, TUNE, DETUNE, OVERDRIVE }; enum MDA_EP_PARAM { DECAY, RELEASE, HARDNESS, TREBLE, PAN_TREM, LFO_RATE, VELOCITY_SENSE, STEREO, MAX_POLY, TUNE, DETUNE, OVERDRIVE };
LiquidLine welcome_line1(1, 0, "MicroMDAEPiano");
LiquidLine welcome_line2(0, 1, "(c)parasiTstudio");
LiquidScreen welcome_screen(welcome_line1, welcome_line2);
LiquidMenu menu(lcd);
//************************************************************************************************* //*************************************************************************************************
//* SETUP FUNCTION //* SETUP FUNCTION
//************************************************************************************************* //*************************************************************************************************
@ -115,17 +124,14 @@ void setup()
Serial.begin(SERIAL_SPEED); Serial.begin(SERIAL_SPEED);
delay(220); delay(220);
/*
// LCD display setup // LCD display setup
lcd.init(); lcd.init();
lcd.blink_off(); lcd.blink_off();
lcd.cursor_off(); lcd.cursor_off();
lcd.backlight(); lcd.backlight();
lcd.noAutoscroll(); lcd.noAutoscroll();
lcd.clear();
lcd.display(); menu.add_screen(welcome_screen);
lcd.show(0, 0, 20, " MicroMDAEPiano");
lcd.show(1, 0, 16, "(c)parasiTstudio");
// Encoder setup // Encoder setup
enc[0].write(INITIAL_ENC_L_VALUE); enc[0].write(INITIAL_ENC_L_VALUE);
@ -134,7 +140,6 @@ void setup()
enc_val[1] = enc[1].read(); enc_val[1] = enc[1].read();
but[0].update(); but[0].update();
but[1].update(); but[1].update();
*/
// Debug output // Debug output
Serial.println(F("MicroMDAEPiano based on https://sourceforge.net/projects/mda-vst")); Serial.println(F("MicroMDAEPiano based on https://sourceforge.net/projects/mda-vst"));
@ -208,6 +213,8 @@ void setup()
mixer_l.gain(1, 0.3); mixer_l.gain(1, 0.3);
AudioInterrupts(); AudioInterrupts();
menu.update();
Serial.println(F("<setup end>")); Serial.println(F("<setup end>"));
#if defined (DEBUG) && defined (SHOW_CPU_LOAD_MSEC) #if defined (DEBUG) && defined (SHOW_CPU_LOAD_MSEC)

Loading…
Cancel
Save