mbedでmidi(Format 0)を再生
Diff: midi.h
- Revision:
- 1:250e7251f8fc
- Parent:
- 0:7c17c3b3a8d7
--- a/midi.h Tue Jul 15 09:45:03 2014 +0000 +++ b/midi.h Sat Aug 09 09:29:31 2014 +0000 @@ -9,17 +9,20 @@ midi(PinName _bzr); //~midi(); void read(const char *path); - void play(); + void play(/*int repeat*/); + void play_realtime(const char *path/*, int repeat*/); private: - list<int> tm; + list<int> tm;//tempo //list<int> ev; - list<char> ca; - list<float> fq; + list<char> ca;//channel + list<float> fq;//frequency //list<float> vo; + list<int> no;//note list<char>::iterator pch; list<int>::iterator pi; list<float>::iterator pf; + list<int>::iterator pn; Timer t; PinName bzr; int chmax; @@ -27,9 +30,10 @@ unsigned short int tracks; unsigned short int crochet; long int tempo; - float freq[12]; - float *table; + double freq[12]; + double *table; template<class X> void change_endian(X *raw,int byte); + int powi(int a); }; #endif \ No newline at end of file