Microprocessor and embedded system 2/2018 project

Dependencies:   mbed BSP_DISCO_F746NG DISCO_F746NG_USBDevice

Committer:
60010049
Date:
Sat May 11 04:49:19 2019 +0000
Revision:
0:2256ced8af52
without board

Who changed what in which revision?

UserRevisionLine numberNew contents of line
60010049 0:2256ced8af52 1 #include "mbed.h"
60010049 0:2256ced8af52 2 #include "LCD_DISCO_F746NG.h"
60010049 0:2256ced8af52 3 #include "USBMIDI.h"
60010049 0:2256ced8af52 4
60010049 0:2256ced8af52 5 #define FastSpeedInterface 0
60010049 0:2256ced8af52 6 #define HighSpeedInterface 1
60010049 0:2256ced8af52 7
60010049 0:2256ced8af52 8 Serial pc(USBTX, USBRX);
60010049 0:2256ced8af52 9 LCD_DISCO_F746NG lcd;
60010049 0:2256ced8af52 10
60010049 0:2256ced8af52 11 USBMIDI midi(FastSpeedInterface);
60010049 0:2256ced8af52 12 AnalogIn Ain(A0);
60010049 0:2256ced8af52 13
60010049 0:2256ced8af52 14 int main()
60010049 0:2256ced8af52 15 {
60010049 0:2256ced8af52 16 char ch;
60010049 0:2256ced8af52 17 pc.baud(9600);
60010049 0:2256ced8af52 18 pc.format(8, SerialBase::None, 1); //default
60010049 0:2256ced8af52 19 pc.printf("\n\r"); //Newline
60010049 0:2256ced8af52 20 pc.printf("This is Keyboard to the Keyboard"); //Transmit a string
60010049 0:2256ced8af52 21 pc.printf("\n\r");
60010049 0:2256ced8af52 22 pc.printf("By Tar, Gift, Tarn");
60010049 0:2256ced8af52 23 pc.printf("\n\r");
60010049 0:2256ced8af52 24 pc.printf("LCD will shows sign that you press on the key board");
60010049 0:2256ced8af52 25 pc.printf("\n\r");
60010049 0:2256ced8af52 26 pc.printf("Color LIGHTBLUE is for Octave 1,");
60010049 0:2256ced8af52 27 pc.printf("\n\r");
60010049 0:2256ced8af52 28 pc.printf("Color LIGHTRED is for Octave 2,");
60010049 0:2256ced8af52 29 pc.printf("\n\r");
60010049 0:2256ced8af52 30 pc.printf("Color LIGHTMAGENTE is for Octave 3,");
60010049 0:2256ced8af52 31 pc.printf("\n\r");
60010049 0:2256ced8af52 32 pc.printf("Color LIGHTGREEN is for Octave 4,");
60010049 0:2256ced8af52 33 pc.printf("\n\r");
60010049 0:2256ced8af52 34 pc.printf("Color ORANGE is for Octave 5,");
60010049 0:2256ced8af52 35 pc.printf("\n\r");
60010049 0:2256ced8af52 36 pc.printf("AND Color YELLOW is for Octave 6");
60010049 0:2256ced8af52 37 pc.printf("\n\r");
60010049 0:2256ced8af52 38 pc.printf("ENJOY :)");
60010049 0:2256ced8af52 39 pc.printf("\n\r");
60010049 0:2256ced8af52 40 while(1)
60010049 0:2256ced8af52 41 {
60010049 0:2256ced8af52 42 char str1[1];
60010049 0:2256ced8af52 43 int i;
60010049 0:2256ced8af52 44 lcd.Clear(LCD_COLOR_BLACK);
60010049 0:2256ced8af52 45 lcd.SetBackColor(LCD_COLOR_BLACK);
60010049 0:2256ced8af52 46 lcd.SetTextColor(LCD_COLOR_WHITE);
60010049 0:2256ced8af52 47
60010049 0:2256ced8af52 48 ch = pc.getc();
60010049 0:2256ced8af52 49 pc.putc(ch);
60010049 0:2256ced8af52 50 sprintf(str1,"%c",ch);
60010049 0:2256ced8af52 51 lcd.DisplayStringAt(0, LINE(2), (uint8_t *) str1, CENTER_MODE);
60010049 0:2256ced8af52 52
60010049 0:2256ced8af52 53 //firstblock without shift
60010049 0:2256ced8af52 54 if(ch=='s')
60010049 0:2256ced8af52 55 {
60010049 0:2256ced8af52 56 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 57 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 58 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 59 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"C 1", CENTER_MODE);
60010049 0:2256ced8af52 60 i=24;
60010049 0:2256ced8af52 61 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 62 wait(0.3);
60010049 0:2256ced8af52 63 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 64 }
60010049 0:2256ced8af52 65 if(ch=='c')
60010049 0:2256ced8af52 66 {
60010049 0:2256ced8af52 67 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 68 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 69 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 70 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Db 1", CENTER_MODE);
60010049 0:2256ced8af52 71 i=25;
60010049 0:2256ced8af52 72 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 73 wait(0.3);
60010049 0:2256ced8af52 74 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 75 }
60010049 0:2256ced8af52 76 if(ch=='d')
60010049 0:2256ced8af52 77 {
60010049 0:2256ced8af52 78 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 79 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 80 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 81 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"D 1", CENTER_MODE);
60010049 0:2256ced8af52 82 i=26;
60010049 0:2256ced8af52 83 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 84 wait(0.3);
60010049 0:2256ced8af52 85 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 86 }
60010049 0:2256ced8af52 87 if(ch=='3')
60010049 0:2256ced8af52 88 {
60010049 0:2256ced8af52 89 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 90 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 91 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 92 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Eb 1", CENTER_MODE);
60010049 0:2256ced8af52 93 i=27;
60010049 0:2256ced8af52 94 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 95 wait(0.3);
60010049 0:2256ced8af52 96 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 97 }
60010049 0:2256ced8af52 98 if(ch=='e')
60010049 0:2256ced8af52 99 {
60010049 0:2256ced8af52 100 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 101 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 102 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 103 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"E 1", CENTER_MODE);
60010049 0:2256ced8af52 104 i=28;
60010049 0:2256ced8af52 105 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 106 wait(0.3);
60010049 0:2256ced8af52 107 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 108 }
60010049 0:2256ced8af52 109 if(ch=='w')
60010049 0:2256ced8af52 110 {
60010049 0:2256ced8af52 111 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 112 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 113 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 114 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F 1", CENTER_MODE);
60010049 0:2256ced8af52 115 i=29;
60010049 0:2256ced8af52 116 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 117 wait(0.3);
60010049 0:2256ced8af52 118 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 119 }
60010049 0:2256ced8af52 120 if(ch=='2')
60010049 0:2256ced8af52 121 {
60010049 0:2256ced8af52 122 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 123 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 124 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 125 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F# 1", CENTER_MODE);
60010049 0:2256ced8af52 126 i=30;
60010049 0:2256ced8af52 127 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 128 wait(0.3);
60010049 0:2256ced8af52 129 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 130 }
60010049 0:2256ced8af52 131 if(ch=='q')
60010049 0:2256ced8af52 132 {
60010049 0:2256ced8af52 133 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 134 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 135 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 136 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G 1", CENTER_MODE);
60010049 0:2256ced8af52 137 i=31;
60010049 0:2256ced8af52 138 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 139 wait(0.3);
60010049 0:2256ced8af52 140 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 141 }
60010049 0:2256ced8af52 142 if(ch=='1')
60010049 0:2256ced8af52 143 {
60010049 0:2256ced8af52 144 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 145 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 146 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 147 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G# 1", CENTER_MODE);
60010049 0:2256ced8af52 148 i=32;
60010049 0:2256ced8af52 149 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 150 wait(0.3);
60010049 0:2256ced8af52 151 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 152 }
60010049 0:2256ced8af52 153 if(ch=='a')
60010049 0:2256ced8af52 154 {
60010049 0:2256ced8af52 155 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 156 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 157 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 158 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"A 1", CENTER_MODE);
60010049 0:2256ced8af52 159 i=33;
60010049 0:2256ced8af52 160 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 161 wait(0.3);
60010049 0:2256ced8af52 162 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 163 }
60010049 0:2256ced8af52 164 if(ch=='z')
60010049 0:2256ced8af52 165 {
60010049 0:2256ced8af52 166 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 167 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 168 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 169 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Bb 1", CENTER_MODE);
60010049 0:2256ced8af52 170 i=34;
60010049 0:2256ced8af52 171 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 172 wait(0.3);
60010049 0:2256ced8af52 173 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 174 }
60010049 0:2256ced8af52 175 if(ch=='x')
60010049 0:2256ced8af52 176 {
60010049 0:2256ced8af52 177 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 178 lcd.SetBackColor(LCD_COLOR_LIGHTBLUE); //Set bg color
60010049 0:2256ced8af52 179 lcd.SetTextColor(LCD_COLOR_DARKBLUE); //Set char color
60010049 0:2256ced8af52 180 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"B 1", CENTER_MODE);
60010049 0:2256ced8af52 181 i=35;
60010049 0:2256ced8af52 182 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 183 wait(0.3);
60010049 0:2256ced8af52 184 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 185 }
60010049 0:2256ced8af52 186
60010049 0:2256ced8af52 187 //firstblock with shift
60010049 0:2256ced8af52 188 if(ch=='S')
60010049 0:2256ced8af52 189 {
60010049 0:2256ced8af52 190 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 191 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 192 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 193 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"C 4", CENTER_MODE);
60010049 0:2256ced8af52 194 i=60;
60010049 0:2256ced8af52 195 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 196 wait(0.3);
60010049 0:2256ced8af52 197 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 198 }
60010049 0:2256ced8af52 199 if(ch=='C')
60010049 0:2256ced8af52 200 {
60010049 0:2256ced8af52 201 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 202 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 203 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 204 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Db 4", CENTER_MODE);
60010049 0:2256ced8af52 205 i=61;
60010049 0:2256ced8af52 206 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 207 wait(0.3);
60010049 0:2256ced8af52 208 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 209 }
60010049 0:2256ced8af52 210 if(ch=='D')
60010049 0:2256ced8af52 211 {
60010049 0:2256ced8af52 212 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 213 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 214 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 215 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"D 4", CENTER_MODE);
60010049 0:2256ced8af52 216 i=62;
60010049 0:2256ced8af52 217 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 218 wait(0.3);
60010049 0:2256ced8af52 219 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 220 }
60010049 0:2256ced8af52 221 if(ch=='#')
60010049 0:2256ced8af52 222 {
60010049 0:2256ced8af52 223 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 224 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 225 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 226 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Eb 4", CENTER_MODE);
60010049 0:2256ced8af52 227 i=63;
60010049 0:2256ced8af52 228 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 229 wait(0.3);
60010049 0:2256ced8af52 230 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 231 }
60010049 0:2256ced8af52 232 if(ch=='E')
60010049 0:2256ced8af52 233 {
60010049 0:2256ced8af52 234 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 235 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 236 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 237 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"E 4", CENTER_MODE);
60010049 0:2256ced8af52 238 i=64;
60010049 0:2256ced8af52 239 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 240 wait(0.3);
60010049 0:2256ced8af52 241 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 242 }
60010049 0:2256ced8af52 243 if(ch=='W')
60010049 0:2256ced8af52 244 {
60010049 0:2256ced8af52 245 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 246 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 247 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 248 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F 4", CENTER_MODE);
60010049 0:2256ced8af52 249 i=65;
60010049 0:2256ced8af52 250 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 251 wait(0.3);
60010049 0:2256ced8af52 252 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 253 }
60010049 0:2256ced8af52 254 if(ch=='@')
60010049 0:2256ced8af52 255 {
60010049 0:2256ced8af52 256 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 257 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 258 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 259 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F# 4", CENTER_MODE);
60010049 0:2256ced8af52 260 i=66;
60010049 0:2256ced8af52 261 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 262 wait(0.3);
60010049 0:2256ced8af52 263 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 264 }
60010049 0:2256ced8af52 265 if(ch=='Q')
60010049 0:2256ced8af52 266 {
60010049 0:2256ced8af52 267 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 268 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 269 lcd.SetTextColor(LCD_COLOR_WHITE); //Set char color
60010049 0:2256ced8af52 270 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G 4", CENTER_MODE);
60010049 0:2256ced8af52 271 i=67;
60010049 0:2256ced8af52 272 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 273 wait(0.3);
60010049 0:2256ced8af52 274 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 275 }
60010049 0:2256ced8af52 276 if(ch=='!')
60010049 0:2256ced8af52 277 {
60010049 0:2256ced8af52 278 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 279 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 280 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 281 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G# 4", CENTER_MODE);
60010049 0:2256ced8af52 282 i=68;
60010049 0:2256ced8af52 283 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 284 wait(0.3);
60010049 0:2256ced8af52 285 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 286 }
60010049 0:2256ced8af52 287 if(ch=='A')
60010049 0:2256ced8af52 288 {
60010049 0:2256ced8af52 289 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 290 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 291 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 292 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"A 4", CENTER_MODE);
60010049 0:2256ced8af52 293 i=69;
60010049 0:2256ced8af52 294 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 295 wait(0.3);
60010049 0:2256ced8af52 296 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 297 }
60010049 0:2256ced8af52 298 if(ch=='Z')
60010049 0:2256ced8af52 299 {
60010049 0:2256ced8af52 300 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 301 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 302 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 303 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Bb 4", CENTER_MODE);
60010049 0:2256ced8af52 304 i=70;
60010049 0:2256ced8af52 305 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 306 wait(0.3);
60010049 0:2256ced8af52 307 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 308 }
60010049 0:2256ced8af52 309 if(ch=='X')
60010049 0:2256ced8af52 310 {
60010049 0:2256ced8af52 311 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 312 lcd.SetBackColor(LCD_COLOR_LIGHTGREEN); //Set bg color
60010049 0:2256ced8af52 313 lcd.SetTextColor(LCD_COLOR_DARKGREEN); //Set char color
60010049 0:2256ced8af52 314 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"B 4", CENTER_MODE);
60010049 0:2256ced8af52 315 i=71;
60010049 0:2256ced8af52 316 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 317 wait(0.3);
60010049 0:2256ced8af52 318 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 319 }
60010049 0:2256ced8af52 320
60010049 0:2256ced8af52 321 //second block without shift
60010049 0:2256ced8af52 322 if(ch=='g')
60010049 0:2256ced8af52 323 {
60010049 0:2256ced8af52 324 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 325 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 326 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 327 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"C 2", CENTER_MODE);
60010049 0:2256ced8af52 328 i=36;
60010049 0:2256ced8af52 329 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 330 wait(0.3);
60010049 0:2256ced8af52 331 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 332 }
60010049 0:2256ced8af52 333 if(ch=='n')
60010049 0:2256ced8af52 334 {
60010049 0:2256ced8af52 335 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 336 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 337 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 338 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Db 2", CENTER_MODE);
60010049 0:2256ced8af52 339 i=37;
60010049 0:2256ced8af52 340 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 341 wait(0.3);
60010049 0:2256ced8af52 342 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 343 }
60010049 0:2256ced8af52 344 if(ch=='h')
60010049 0:2256ced8af52 345 {
60010049 0:2256ced8af52 346 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 347 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 348 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 349 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"D 2", CENTER_MODE);
60010049 0:2256ced8af52 350 i=38;
60010049 0:2256ced8af52 351 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 352 wait(0.3);
60010049 0:2256ced8af52 353 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 354 }
60010049 0:2256ced8af52 355 if(ch=='6')
60010049 0:2256ced8af52 356 {
60010049 0:2256ced8af52 357 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 358 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 359 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 360 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Eb 2", CENTER_MODE);
60010049 0:2256ced8af52 361 i=39;
60010049 0:2256ced8af52 362 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 363 wait(0.3);
60010049 0:2256ced8af52 364 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 365 }
60010049 0:2256ced8af52 366 if(ch=='y')
60010049 0:2256ced8af52 367 {
60010049 0:2256ced8af52 368 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 369 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 370 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 371 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"E 2", CENTER_MODE);
60010049 0:2256ced8af52 372 i=40;
60010049 0:2256ced8af52 373 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 374 wait(0.3);
60010049 0:2256ced8af52 375 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 376 }
60010049 0:2256ced8af52 377 if(ch=='t')
60010049 0:2256ced8af52 378 {
60010049 0:2256ced8af52 379 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 380 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 381 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 382 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F 2", CENTER_MODE);
60010049 0:2256ced8af52 383 i=41;
60010049 0:2256ced8af52 384 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 385 wait(0.3);
60010049 0:2256ced8af52 386 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 387 }
60010049 0:2256ced8af52 388 if(ch=='5')
60010049 0:2256ced8af52 389 {
60010049 0:2256ced8af52 390 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 391 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 392 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 393 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F# 2", CENTER_MODE);
60010049 0:2256ced8af52 394 i=42;
60010049 0:2256ced8af52 395 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 396 wait(0.3);
60010049 0:2256ced8af52 397 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 398 }
60010049 0:2256ced8af52 399 if(ch=='r')
60010049 0:2256ced8af52 400 {
60010049 0:2256ced8af52 401 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 402 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 403 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 404 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G 2", CENTER_MODE);
60010049 0:2256ced8af52 405 i=43;
60010049 0:2256ced8af52 406 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 407 wait(0.3);
60010049 0:2256ced8af52 408 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 409 }
60010049 0:2256ced8af52 410 if(ch=='4')
60010049 0:2256ced8af52 411 {
60010049 0:2256ced8af52 412 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 413 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 414 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 415 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G# 2", CENTER_MODE);
60010049 0:2256ced8af52 416 i=44;
60010049 0:2256ced8af52 417 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 418 wait(0.3);
60010049 0:2256ced8af52 419 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 420 }
60010049 0:2256ced8af52 421 if(ch=='f')
60010049 0:2256ced8af52 422 {
60010049 0:2256ced8af52 423 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 424 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 425 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 426 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"A 2", CENTER_MODE);
60010049 0:2256ced8af52 427 i=45;
60010049 0:2256ced8af52 428 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 429 wait(0.3);
60010049 0:2256ced8af52 430 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 431 }
60010049 0:2256ced8af52 432 if(ch=='v')
60010049 0:2256ced8af52 433 {
60010049 0:2256ced8af52 434 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 435 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 436 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 437 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Bb 2", CENTER_MODE);
60010049 0:2256ced8af52 438 i=46;
60010049 0:2256ced8af52 439 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 440 wait(0.3);
60010049 0:2256ced8af52 441 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 442 }
60010049 0:2256ced8af52 443 if(ch=='b')
60010049 0:2256ced8af52 444 {
60010049 0:2256ced8af52 445 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 446 lcd.SetBackColor(LCD_COLOR_LIGHTRED); //Set bg color
60010049 0:2256ced8af52 447 lcd.SetTextColor(LCD_COLOR_DARKRED); //Set char color
60010049 0:2256ced8af52 448 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"B 2", CENTER_MODE);
60010049 0:2256ced8af52 449 i=47;
60010049 0:2256ced8af52 450 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 451 wait(0.3);
60010049 0:2256ced8af52 452 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 453 }
60010049 0:2256ced8af52 454
60010049 0:2256ced8af52 455 //secondblock with shift
60010049 0:2256ced8af52 456 if(ch=='G')
60010049 0:2256ced8af52 457 {
60010049 0:2256ced8af52 458 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 459 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 460 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 461 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"C 5", CENTER_MODE);
60010049 0:2256ced8af52 462 i=72;
60010049 0:2256ced8af52 463 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 464 wait(0.3);
60010049 0:2256ced8af52 465 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 466 }
60010049 0:2256ced8af52 467 if(ch=='N')
60010049 0:2256ced8af52 468 {
60010049 0:2256ced8af52 469 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 470 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 471 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 472 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Db 5", CENTER_MODE);
60010049 0:2256ced8af52 473 i=73;
60010049 0:2256ced8af52 474 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 475 wait(0.3);
60010049 0:2256ced8af52 476 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 477 }
60010049 0:2256ced8af52 478 if(ch=='H')
60010049 0:2256ced8af52 479 {
60010049 0:2256ced8af52 480 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 481 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 482 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 483 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"D 5", CENTER_MODE);
60010049 0:2256ced8af52 484 i=74;
60010049 0:2256ced8af52 485 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 486 wait(0.3);
60010049 0:2256ced8af52 487 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 488 }
60010049 0:2256ced8af52 489 if(ch=='^')
60010049 0:2256ced8af52 490 {
60010049 0:2256ced8af52 491 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 492 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 493 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 494 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Eb 5", CENTER_MODE);
60010049 0:2256ced8af52 495 i=75;
60010049 0:2256ced8af52 496 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 497 wait(0.3);
60010049 0:2256ced8af52 498 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 499 }
60010049 0:2256ced8af52 500 if(ch=='Y')
60010049 0:2256ced8af52 501 {
60010049 0:2256ced8af52 502 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 503 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 504 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 505 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"E 5", CENTER_MODE);
60010049 0:2256ced8af52 506 i=76;
60010049 0:2256ced8af52 507 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 508 wait(0.3);
60010049 0:2256ced8af52 509 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 510 }
60010049 0:2256ced8af52 511 if(ch=='T')
60010049 0:2256ced8af52 512 {
60010049 0:2256ced8af52 513 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 514 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 515 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 516 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F 5", CENTER_MODE);
60010049 0:2256ced8af52 517 i=77;
60010049 0:2256ced8af52 518 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 519 wait(0.3);
60010049 0:2256ced8af52 520 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 521 }
60010049 0:2256ced8af52 522 if(ch=='%')
60010049 0:2256ced8af52 523 {
60010049 0:2256ced8af52 524 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 525 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 526 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 527 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F# 5", CENTER_MODE);
60010049 0:2256ced8af52 528 i=78;
60010049 0:2256ced8af52 529 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 530 wait(0.3);
60010049 0:2256ced8af52 531 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 532 }
60010049 0:2256ced8af52 533 if(ch=='R')
60010049 0:2256ced8af52 534 {
60010049 0:2256ced8af52 535 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 536 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 537 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 538 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G 5", CENTER_MODE);
60010049 0:2256ced8af52 539 i=79;
60010049 0:2256ced8af52 540 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 541 wait(0.3);
60010049 0:2256ced8af52 542 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 543 }
60010049 0:2256ced8af52 544 if(ch=='$')
60010049 0:2256ced8af52 545 {
60010049 0:2256ced8af52 546 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 547 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 548 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 549 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G# 5", CENTER_MODE);
60010049 0:2256ced8af52 550 i=80;
60010049 0:2256ced8af52 551 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 552 wait(0.3);
60010049 0:2256ced8af52 553 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 554 }
60010049 0:2256ced8af52 555 if(ch=='F')
60010049 0:2256ced8af52 556 {
60010049 0:2256ced8af52 557 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 558 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 559 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 560 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"A 5", CENTER_MODE);
60010049 0:2256ced8af52 561 i=81;
60010049 0:2256ced8af52 562 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 563 wait(0.3);
60010049 0:2256ced8af52 564 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 565 }
60010049 0:2256ced8af52 566 if(ch=='V')
60010049 0:2256ced8af52 567 {
60010049 0:2256ced8af52 568 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 569 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 570 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 571 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Bb 5", CENTER_MODE);
60010049 0:2256ced8af52 572 i=82;
60010049 0:2256ced8af52 573 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 574 wait(0.3);
60010049 0:2256ced8af52 575 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 576 }
60010049 0:2256ced8af52 577 if(ch=='B')
60010049 0:2256ced8af52 578 {
60010049 0:2256ced8af52 579 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 580 lcd.SetBackColor(LCD_COLOR_ORANGE); //Set bg color
60010049 0:2256ced8af52 581 lcd.SetTextColor(LCD_COLOR_BROWN); //Set char color
60010049 0:2256ced8af52 582 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"B 5", CENTER_MODE);
60010049 0:2256ced8af52 583 i=83;
60010049 0:2256ced8af52 584 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 585 wait(0.3);
60010049 0:2256ced8af52 586 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 587 }
60010049 0:2256ced8af52 588
60010049 0:2256ced8af52 589 //thirdblock without shift
60010049 0:2256ced8af52 590 if(ch=='k')
60010049 0:2256ced8af52 591 {
60010049 0:2256ced8af52 592 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 593 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 594 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 595 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"C 3", CENTER_MODE);
60010049 0:2256ced8af52 596 i=48;
60010049 0:2256ced8af52 597 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 598 wait(0.3);
60010049 0:2256ced8af52 599 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 600 }
60010049 0:2256ced8af52 601 if(ch=='.')
60010049 0:2256ced8af52 602 {
60010049 0:2256ced8af52 603 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 604 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 605 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 606 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Db 3", CENTER_MODE);
60010049 0:2256ced8af52 607 i=49;
60010049 0:2256ced8af52 608 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 609 wait(0.3);
60010049 0:2256ced8af52 610 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 611 }
60010049 0:2256ced8af52 612 if(ch=='l')
60010049 0:2256ced8af52 613 {
60010049 0:2256ced8af52 614 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 615 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 616 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 617 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"D 3", CENTER_MODE);
60010049 0:2256ced8af52 618 i=50;
60010049 0:2256ced8af52 619 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 620 wait(0.3);
60010049 0:2256ced8af52 621 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 622 }
60010049 0:2256ced8af52 623 if(ch=='9')
60010049 0:2256ced8af52 624 {
60010049 0:2256ced8af52 625 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 626 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 627 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 628 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Eb 3", CENTER_MODE);
60010049 0:2256ced8af52 629 i=51;
60010049 0:2256ced8af52 630 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 631 wait(0.3);
60010049 0:2256ced8af52 632 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 633 }
60010049 0:2256ced8af52 634 if(ch=='o')
60010049 0:2256ced8af52 635 {
60010049 0:2256ced8af52 636 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 637 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 638 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 639 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"E 3", CENTER_MODE);
60010049 0:2256ced8af52 640 i=52;
60010049 0:2256ced8af52 641 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 642 wait(0.3);
60010049 0:2256ced8af52 643 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 644 }
60010049 0:2256ced8af52 645 if(ch=='i')
60010049 0:2256ced8af52 646 {
60010049 0:2256ced8af52 647 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 648 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 649 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 650 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F 3", CENTER_MODE);
60010049 0:2256ced8af52 651 i=53;
60010049 0:2256ced8af52 652 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 653 wait(0.3);
60010049 0:2256ced8af52 654 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 655 }
60010049 0:2256ced8af52 656 if(ch=='8')
60010049 0:2256ced8af52 657 {
60010049 0:2256ced8af52 658 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 659 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 660 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 661 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F# 3", CENTER_MODE);
60010049 0:2256ced8af52 662 i=54;
60010049 0:2256ced8af52 663 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 664 wait(0.3);
60010049 0:2256ced8af52 665 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 666 }
60010049 0:2256ced8af52 667 if(ch=='u')
60010049 0:2256ced8af52 668 {
60010049 0:2256ced8af52 669 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 670 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 671 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 672 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G 3", CENTER_MODE);
60010049 0:2256ced8af52 673 i=55;
60010049 0:2256ced8af52 674 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 675 wait(0.3);
60010049 0:2256ced8af52 676 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 677 }
60010049 0:2256ced8af52 678 if(ch=='7')
60010049 0:2256ced8af52 679 {
60010049 0:2256ced8af52 680 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 681 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 682 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 683 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G# 3", CENTER_MODE);
60010049 0:2256ced8af52 684 i=56;
60010049 0:2256ced8af52 685 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 686 wait(0.3);
60010049 0:2256ced8af52 687 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 688 }
60010049 0:2256ced8af52 689 if(ch=='j')
60010049 0:2256ced8af52 690 {
60010049 0:2256ced8af52 691 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 692 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 693 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 694 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"A 3", CENTER_MODE);
60010049 0:2256ced8af52 695 i=57;
60010049 0:2256ced8af52 696 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 697 wait(0.3);
60010049 0:2256ced8af52 698 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 699 }
60010049 0:2256ced8af52 700 if(ch=='m')
60010049 0:2256ced8af52 701 {
60010049 0:2256ced8af52 702 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 703 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 704 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 705 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Bb 3", CENTER_MODE);
60010049 0:2256ced8af52 706 i=58;
60010049 0:2256ced8af52 707 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 708 wait(0.3);
60010049 0:2256ced8af52 709 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 710 }
60010049 0:2256ced8af52 711 if(ch==',')
60010049 0:2256ced8af52 712 {
60010049 0:2256ced8af52 713 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 714 lcd.SetBackColor(LCD_COLOR_LIGHTMAGENTA); //Set bg color
60010049 0:2256ced8af52 715 lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); //Set char color
60010049 0:2256ced8af52 716 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"B 3", CENTER_MODE);
60010049 0:2256ced8af52 717 i=59;
60010049 0:2256ced8af52 718 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 719 wait(0.3);
60010049 0:2256ced8af52 720 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 721 }
60010049 0:2256ced8af52 722
60010049 0:2256ced8af52 723 //thirdblock with shift
60010049 0:2256ced8af52 724 if(ch=='K')
60010049 0:2256ced8af52 725 {
60010049 0:2256ced8af52 726 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 727 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 728 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 729 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"C 6", CENTER_MODE);
60010049 0:2256ced8af52 730 i=84;
60010049 0:2256ced8af52 731 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 732 wait(0.3);
60010049 0:2256ced8af52 733 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 734 }
60010049 0:2256ced8af52 735 if(ch=='>')
60010049 0:2256ced8af52 736 {
60010049 0:2256ced8af52 737 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 738 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 739 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 740 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Db 6", CENTER_MODE);
60010049 0:2256ced8af52 741 i=85;
60010049 0:2256ced8af52 742 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 743 wait(0.3);
60010049 0:2256ced8af52 744 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 745 }
60010049 0:2256ced8af52 746 if(ch=='L')
60010049 0:2256ced8af52 747 {
60010049 0:2256ced8af52 748 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 749 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 750 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 751 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"D 6", CENTER_MODE);
60010049 0:2256ced8af52 752 i=86;
60010049 0:2256ced8af52 753 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 754 wait(0.3);
60010049 0:2256ced8af52 755 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 756 }
60010049 0:2256ced8af52 757 if(ch=='(')
60010049 0:2256ced8af52 758 {
60010049 0:2256ced8af52 759 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 760 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 761 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 762 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Eb 6", CENTER_MODE);
60010049 0:2256ced8af52 763 i=87;
60010049 0:2256ced8af52 764 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 765 wait(0.3);
60010049 0:2256ced8af52 766 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 767 }
60010049 0:2256ced8af52 768 if(ch=='O')
60010049 0:2256ced8af52 769 {
60010049 0:2256ced8af52 770 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 771 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 772 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 773 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"E 6", CENTER_MODE);
60010049 0:2256ced8af52 774 i=88;
60010049 0:2256ced8af52 775 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 776 wait(0.3);
60010049 0:2256ced8af52 777 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 778 }
60010049 0:2256ced8af52 779 if(ch=='I')
60010049 0:2256ced8af52 780 {
60010049 0:2256ced8af52 781 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 782 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 783 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 784 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F 6", CENTER_MODE);
60010049 0:2256ced8af52 785 i=89;
60010049 0:2256ced8af52 786 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 787 wait(0.3);
60010049 0:2256ced8af52 788 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 789 }
60010049 0:2256ced8af52 790 if(ch=='*')
60010049 0:2256ced8af52 791 {
60010049 0:2256ced8af52 792 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 793 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 794 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 795 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"F# 6", CENTER_MODE);
60010049 0:2256ced8af52 796 i=90;
60010049 0:2256ced8af52 797 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 798 wait(0.3);
60010049 0:2256ced8af52 799 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 800 }
60010049 0:2256ced8af52 801 if(ch=='U')
60010049 0:2256ced8af52 802 {
60010049 0:2256ced8af52 803 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 804 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 805 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 806 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G 6", CENTER_MODE);
60010049 0:2256ced8af52 807 i=91;
60010049 0:2256ced8af52 808 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 809 wait(0.3);
60010049 0:2256ced8af52 810 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 811 }
60010049 0:2256ced8af52 812 if(ch=='&')
60010049 0:2256ced8af52 813 {
60010049 0:2256ced8af52 814 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 815 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 816 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 817 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"G# 6", CENTER_MODE);
60010049 0:2256ced8af52 818 i=92;
60010049 0:2256ced8af52 819 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 820 wait(0.3);
60010049 0:2256ced8af52 821 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 822 }
60010049 0:2256ced8af52 823 if(ch=='J')
60010049 0:2256ced8af52 824 {
60010049 0:2256ced8af52 825 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 826 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 827 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 828 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"A 6", CENTER_MODE);
60010049 0:2256ced8af52 829 i=93;
60010049 0:2256ced8af52 830 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 831 wait(0.3);
60010049 0:2256ced8af52 832 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 833 }
60010049 0:2256ced8af52 834 if(ch=='M')
60010049 0:2256ced8af52 835 {
60010049 0:2256ced8af52 836 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 837 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 838 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 839 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"Bb 6", CENTER_MODE);
60010049 0:2256ced8af52 840 i=94;
60010049 0:2256ced8af52 841 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 842 wait(0.3);
60010049 0:2256ced8af52 843 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 844 }
60010049 0:2256ced8af52 845 if(ch=='<')
60010049 0:2256ced8af52 846 {
60010049 0:2256ced8af52 847 lcd.SetFont(&Font16); //set font size
60010049 0:2256ced8af52 848 lcd.SetBackColor(LCD_COLOR_LIGHTYELLOW); //Set bg color
60010049 0:2256ced8af52 849 lcd.SetTextColor(LCD_COLOR_DARKYELLOW); //Set char color
60010049 0:2256ced8af52 850 lcd.DisplayStringAt(0,LINE(6),(uint8_t *)"B 6", CENTER_MODE);
60010049 0:2256ced8af52 851 i=95;
60010049 0:2256ced8af52 852 midi.write(MIDIMessage::NoteOn(i));
60010049 0:2256ced8af52 853 wait(0.3);
60010049 0:2256ced8af52 854 midi.write(MIDIMessage::NoteOff(i));
60010049 0:2256ced8af52 855 }
60010049 0:2256ced8af52 856 }
60010049 0:2256ced8af52 857 }
60010049 0:2256ced8af52 858
60010049 0:2256ced8af52 859