18.3 MIDI File Tools: midicvt, midiprint, midicomp

UP

18.3.1 midicvt

The Audio Library plays only Type 0 Standard MIDI files. You can use midicvt to convert from Type1 (which are generally output by most MIDI sequencers) to Type0.

midicvt is invoked as follows:

midicvt [-v] [-s] <input file> <output file>
Table 18-5 midicvt Command Line Options
Command Line Option Function
-v Turns on redundancy mode.
-s Strips out any messages that are not used by the Audio Library. These include text messages and system exclusives.
input file The name of a Type 0 or Type 1 Standard MIDI file.
output file The name for the Type 0 output file.

UP

18.3.2 midiprint

The midiprint tool prints a text listing of the time-based MIDI events in a Type 0 or Type 1 Standard MIDI file.

midiprint is invoked as follows:

midiprint [-v] -o <output file> <input file>
Table 18-6 midiprint Command Line Options
Command Line Option Function
-v Verbose mode.
-o<output file> The optional output file for the MIDI event text.
<input file> The name of the Type 0 or Type 1 Standard MIDI file to list.
UP

18.3.3 midicomp

The midicomp tool is used to compress midi files of either Type 0 or Type 1 to a format recognized by the compact sequence player.

UP

18.3.3.1 Invoking midicomp

midicomp is invoked as follows:

midicomp <input file> <output file>
Table 18-7 midicomp Command Line Options
Command Line Option Function
<input file> The name of the Type 0 or Type 1 Standard MIDI file to compress.
<output file> The name to use for the output file.
UP

18.3.3.2 Making Files that Will Compact Better

Compression ratio of a MIDI file may vary, depending upon the contents of the file. All files (except very small files) should be compressed at least somewhat. Because midicomp achieves compression by recognizing patterns and then compressing these, the greatest amounts of compression occur when the files are repetitive. Patterns and sections created in a sequencer using cut and paste are the ones most likely to be compressed.

UP