MIDI interpreter using mbed

Dependencies:   MIDI TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
kayekss
Date:
Fri Jun 14 12:41:54 2013 +0000
Parent:
0:93868ff6d1b1
Commit message:
Fixed pitchbend byte order

Changed in this revision

RingBuffer.h Show annotated file Show diff for this revision Revisions of this file
parser.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 93868ff6d1b1 -r af9dd50ffbc2 RingBuffer.h
--- a/RingBuffer.h	Fri Jun 14 09:25:58 2013 +0000
+++ b/RingBuffer.h	Fri Jun 14 12:41:54 2013 +0000
@@ -99,9 +99,8 @@
 
 template <class T>
 int RingBuffer<T>::find(T key) {
-    int pos = 0;
-
     uint32_t p = readPos;
+    
     for (uint32_t i = 0; i < itemCount; i++) {
         if (buffer[p] == key) {
             return i;
diff -r 93868ff6d1b1 -r af9dd50ffbc2 parser.cpp
--- a/parser.cpp	Fri Jun 14 09:25:58 2013 +0000
+++ b/parser.cpp	Fri Jun 14 12:41:54 2013 +0000
@@ -139,7 +139,7 @@
                       "Pitch bend", runningStatus ? '*' : ' ',
                       c, dataBytes[0], dataBytes[1]);
             #endif
-            setPitchBend(c, dataBytes[0] << 7 | dataBytes[1]);
+            setPitchBend(c, dataBytes[1] << 7 | dataBytes[0]);
             lastStatusByte = c;
         }
         break;