#include #define LED 13 #define BUTTON 7 int val = 0; void setup() { pinMode(LED, OUTPUT); pinMode(BUTTON, INPUT); MIDI.begin(); } void loop() { val = digitalRead(BUTTON); if (val == HIGH) { digitalWrite(LED, HIGH); MIDI.sendNoteOn(36,127,1); // Send a Note (pitch 36, velo 127 on channel 1) delay(300); digitalWrite(LED, LOW); MIDI.sendNoteOff(36,0,1); // Stop the note delay(300); digitalWrite(LED, HIGH); MIDI.sendNoteOn(38,127,1); // Send a Note (pitch 36, velo 127 on channel 1) delay(300); digitalWrite(LED, LOW); MIDI.sendNoteOff(38,0,1); // Stop the note delay(300); } }