mbedでmidi(Format 0)を再生

Revision:
0:7c17c3b3a8d7
Child:
1:250e7251f8fc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/midi.h	Tue Jul 15 09:45:03 2014 +0000
@@ -0,0 +1,35 @@
+#ifndef MBED_MIDI
+#define MBED_MIDI
+
+#include "mbed.h"
+#include <list>
+
+class midi {
+    public:
+        midi(PinName _bzr);
+        //~midi();
+        void read(const char *path);
+        void play();
+        
+    private:
+        list<int> tm;
+        //list<int> ev;
+        list<char> ca;
+        list<float> fq;
+        //list<float> vo;
+        list<char>::iterator pch;
+        list<int>::iterator pi;
+        list<float>::iterator pf;
+        Timer t;
+        PinName bzr;
+        int chmax;
+        char *path_c;
+        unsigned short int tracks;
+        unsigned short int crochet;
+        long int tempo;
+        float freq[12];
+        float *table;  
+        template<class X>
+        void change_endian(X *raw,int byte);
+};
+#endif
\ No newline at end of file