Ported from Arduino MIDI library Orignal: http://www.arduino.cc/playground/Main/MIDILibrary use Serial (UART)

Dependencies:   MIDI mbed

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Mon Dec 03 14:24:33 2012 +0000
Commit message:
1st build;

Changed in this revision

MIDI.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 1a4d28e63bef MIDI.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MIDI.lib	Mon Dec 03 14:24:33 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/okini3939/code/MIDI/#713ef38fead1
diff -r 000000000000 -r 1a4d28e63bef main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Dec 03 14:24:33 2012 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "MIDI.h"
+
+DigitalOut led1(LED1), led2(LED2);
+
+MIDI midi(p9, p10);
+
+int main() {
+    midi.begin(4);    
+
+    for (;;) {
+        if (midi.read()) {
+            led1 = 1;
+            midi.sendNoteOn(42,127,1);  // Send a Note (pitch 42, velo 127 on channel 1)
+            wait(1);
+            midi.sendNoteOn(42,0,1);   // Stop the note
+            led1 = 0;
+        }
+    }
+}
diff -r 000000000000 -r 1a4d28e63bef mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Dec 03 14:24:33 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b60934f96c0c
\ No newline at end of file