see http://mbed.org/users/okini3939/notebook/midi/

Dependencies:   MIDI USBDevice mbed

Fork of MIDI_sample by Suga koubou

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Mon Dec 03 14:24:33 2012 +0000
Child:
1:ecf5c3927710
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
--- /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
--- /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;
+        }
+    }
+}
--- /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