File: writemidi.h

package info (click to toggle)
audacity 1.2.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 22,600 kB
  • ctags: 20,360
  • sloc: ansic: 139,525; cpp: 55,197; sh: 24,963; lisp: 3,772; makefile: 1,679; python: 272
file content (36 lines) | stat: -rwxr-xr-x 740 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// writemidi.h

#ifndef __WRITE_MIDI__
#define __WRITE_MIDI__

#include "allegro.h"

class WriteMIDI {
public:
  WriteMIDI(Seq_ptr seq);
  ~WriteMIDI();

  void           Write(FILE *fp /* , midiFileFormat = 1 */);

private:
  void           CreateEventList();
 
  FILE           *mOutFile;
  
  Seq_ptr        mSeq;

  int            mNumTracks; // number of tracks not counting tempo track
  int            mDivision;
  int            mInitialTempo;
  
  Allegro_event  **mEvents;
  int            mNumEvents;
  int            mMaxEvents;
  
  void           WriteVarinum(int num);
  void           Write16bit(int num);
  void           Write24bit(int num);
  void           Write32bit(int num);
};

#endif // #define __SIMPLE_MIDI_OUT__