A class that converts byte streams into MIDI messages, and stores them in a FIFO. This is useful if you wish to read MIDI messages via polling instead of interrupts. The class supports every type of MIDI message, and System Realtime messages can be interleaved with regular ones.

Revision:
1:1c3f0c6ea0fb
Parent:
0:69cbdcd5d770
Child:
2:cbd43ba7f842
--- a/MIDIparser.h	Wed Aug 03 16:22:22 2016 +0000
+++ b/MIDIparser.h	Thu Aug 04 12:02:12 2016 +0000
@@ -70,9 +70,20 @@
 public:
 
     MIDIparser();
-
-    void parse(uint8_t);
-    bool available();
+    
+    /** Input a byte to the parser
+     *  @param data The byte to parse
+     */
+    void parse(uint8_t data);
+    
+     /** Determine if a MIDI message is in the queue
+     *  @return 1 if something is ready, 0 otherwise
+     */
+    uint32_t available();
+    
+    /** Grab the next MIDI message
+     *  @return The next MIDI message
+     */
     MIDIMessage grab();
 };