Constructor
File
__construct
( $timeDivision, [ $format = null])
Creates a file header chunk
FileHeader
createFileHeader
(
int $format,
int $numTracks,
int $timeDivision)
-
int
$format: The MIDI file format
-
int
$numTracks: The number of tracks in the file
-
int
$timeDivision: The number of MIDI clock ticks per quarter note
Creates a file object in "wb" mode suitable for save()
SplFileObject
createFileObject
(string $file)
-
string
$file: A file path
Gets the binary data for the MIDI file
string
getData
()
Gets a timer for the file's time division
Saves the MIDI file to the specified file
int
save
(SplFileObject|string $file)
-
SplFileObject|string
$file: A file path, or a file object opened in "wb" mode