aboutsummaryrefslogtreecommitdiff
path: root/src/midiio/include/MidiFileWrite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/midiio/include/MidiFileWrite.h')
-rw-r--r--src/midiio/include/MidiFileWrite.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/midiio/include/MidiFileWrite.h b/src/midiio/include/MidiFileWrite.h
new file mode 100644
index 0000000..a213fdf
--- /dev/null
+++ b/src/midiio/include/MidiFileWrite.h
@@ -0,0 +1,61 @@
+//
+// Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu>
+// Creation Date: Sun Mar 15 10:55:56 GMT-0800 1998
+// Last Modified: Sun Mar 15 10:55:56 GMT-0800 1998
+// Filename: ...sig/code/control/MidiFileWrite/MidiFileWrite.h
+// Web Address: http://www-ccrma.stanford.edu/~craig/improv/include/MidiFileWrite.h
+// Syntax: C++
+//
+// Description: The MidiFileWrite class will write out a Type 0 MidiFile.
+// Used for recording MIDI data streams into Standard
+// MIDI files.
+//
+
+#ifndef _MIDIFILEWRITE_INCLUDED
+#define _MIDIFILEWRITE_INCLUDED
+
+
+#include "FileIO.h"
+
+
+class MidiFileWrite {
+ public:
+ MidiFileWrite (void);
+ MidiFileWrite (const char* aFilename, int startTime = -1);
+ ~MidiFileWrite ();
+
+ void close (void);
+ void setup (const char* aFilename, int startTime = -1);
+ void start (int startTime = -1);
+ void writeAbsolute (int aTime, int command, int p1, int p2);
+ void writeAbsolute (int aTime, int command, int p1);
+ void writeAbsolute (int aTime, int command);
+ void writeRaw (uchar aByte);
+ void writeRaw (uchar aByte, uchar Byte);
+ void writeRaw (uchar aByte, uchar Byte, uchar cByte);
+ void writeRaw (uchar aByte, uchar Byte, uchar cByte,
+ uchar dByte);
+ void writeRaw (uchar aByte, uchar Byte, uchar cByte,
+ uchar dByte, uchar eByte);
+ void writeRaw (uchar* anArray, int arraySize);
+ void writeRelative (int aTime, int command, int p1, int p2);
+ void writeRelative (int aTime, int command, int p1);
+ void writeRelative (int aTime, int command);
+ void writeVLValue (long aValue);
+
+
+ protected:
+ FileIO *midifile; // file stream for MIDI file
+ long trackSize; // size count for MIDI track
+ int lastPlayTime; // for calculating delta times
+ int openQ; // for checking file status
+
+};
+
+
+
+#endif /* _MIDIFILEWRITE_INCLUDED */
+
+
+
+// md5sum: 44ac572078bff648d096c7e7867d1b3c - MidiFileWrite.h =css= 20030102