Test program for MIDI Library (Nucleo F446RE)

Dependencies:   MIDI mbed

Files at this revision

API Documentation at this revision

Comitter:
ryood
Date:
Fri May 04 22:10:20 2018 +0000
Parent:
0:418e035ba7e9
Commit message:
first MIDI OUT

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 418e035ba7e9 -r 2380cb43b3ae main.cpp
--- a/main.cpp	Fri May 04 21:54:39 2018 +0000
+++ b/main.cpp	Fri May 04 22:10:20 2018 +0000
@@ -16,14 +16,14 @@
 
 void handleNoteOn(byte inChannel, byte inNote, byte inVelocity)
 {
+    midi.sendNoteOn(inNote, inVelocity, inChannel);
     printNoteOnOff("On ", inChannel, inNote, inVelocity);
-    midi.sendNoteOn(inNote, inVelocity, inChannel);
 }
 
 void handleNoteOff(byte inChannel, byte inNote, byte inVelocity)
 {
+    midi.sendNoteOff(inNote, inVelocity, inChannel);
     printNoteOnOff("Off", inChannel, inNote, inVelocity);
-    midi.sendNoteOff(inNote, inVelocity, inChannel);
 }
 
 // -----------------------------------------------------------------------------