comparison data/fileio/MIDIFileReader.h @ 301:73537d900d4b

* Add MIDI file export (closes FR#1643721)
author Chris Cannam
date Thu, 04 Oct 2007 11:52:38 +0000
parents 084ae1c213ee
children 183ee2a55fc7
comparison
equal deleted inserted replaced
300:5877d68815c7 301:73537d900d4b
31 31
32 #include <QObject> 32 #include <QObject>
33 33
34 class MIDIEvent; 34 class MIDIEvent;
35 35
36 typedef unsigned char MIDIByte;
37
36 class MIDIFileReader : public DataFileReader 38 class MIDIFileReader : public DataFileReader
37 { 39 {
38 Q_OBJECT 40 Q_OBJECT
39 41
40 public: 42 public:
42 virtual ~MIDIFileReader(); 44 virtual ~MIDIFileReader();
43 45
44 virtual bool isOK() const; 46 virtual bool isOK() const;
45 virtual QString getError() const; 47 virtual QString getError() const;
46 virtual Model *load() const; 48 virtual Model *load() const;
47
48 typedef unsigned char MIDIByte;
49 49
50 protected: 50 protected:
51 typedef std::vector<MIDIEvent *> MIDITrack; 51 typedef std::vector<MIDIEvent *> MIDITrack;
52 typedef std::map<unsigned int, MIDITrack> MIDIComposition; 52 typedef std::map<unsigned int, MIDITrack> MIDIComposition;
53 typedef std::pair<RealTime, double> TempoChange; // time, qpm 53 typedef std::pair<RealTime, double> TempoChange; // time, qpm