#include <MIDI.h>
#include <Wire.h>
#include <SparkFun_Alphanumeric_Display.h>  //Click here to get the library: http://librarymanager/All#SparkFun_Qwiic_Alphanumeric_Display by SparkFun
HT16K33 display;
MIDI_CREATE_DEFAULT_INSTANCE();


void setup()
{

    MIDI.begin(5);           // Launch MIDI,  listening to channel 5.
    Serial.println("SparkFun Qwiic Alphanumeric - Example 8: Multi Display");
    Wire.begin(); //Join I2C bus

  if (display.begin(0x70, 0x71, 0x72) == false)  //three alphanumeric displays together
  {
    Serial.println("Device did not acknowledge! Freezing.");
    while(1);
  }
  Serial.println("Displays acknowledged.");
  display.setBrightness(5);

  display.print("RECOGNIZER"); //initial display

}

void loop()
{
    if (MIDI.read())                // Is there a MIDI message incoming ?
    {
        switch(MIDI.getType())      // Get the type of the message we caught
        {
            case midi::ProgramChange:        // If it is a Program Change,
                byte programValue = MIDI.getData1(); {
                switch(programValue)
                {case 1:
                display.clear();
                display.print("RHYTHM"); // print if program change 1
                break; 
                case 2:
                display.clear();
                display.print("LEAD"); // print if program change 2
                break; 
                case 3:
                display.clear();
                display.print("PARMESAN"); // print if program change 3
                break; 
                case 4:
                display.clear();
                display.print("SCHNITZEL"); // print if program change 4
                break;
                case 5:
                display.clear();
                display.print("GROUSERS"); // print if program change 5
                break;
                case 6:
                display.clear();
                display.print("VILLAIN"); // print if program change 6
                break;
                case 7:
                display.clear();
                display.print("GRIP"); // print if program change 7
                break;
                case 8:
                display.clear();
                display.print("DNTFUCKDUDES"); // print if program change 8
                break;  
                case 11:
                display.clear();
                display.print("RHYTHM"); // print if program change 8
                break;  
                case 12:
                display.clear();
                display.print("IRON MAIDEN"); // print if program change 8
                break;  
                case 13:
                display.clear();
                display.print("HARM-MAIDEN"); // print if program change 8
                break;      
                }
                }

        }
    }
}
    

