/midi-converter-php

MIDI Converter PHP

Primary LanguagePHP

MIDI Converter

Convert MIDI to others by PHP using midi.class.php.

MIDI Class

midi.class.php is a class for reading, writing, analyzing, modifying, creating, downloading and playing (embedding) standard MIDI files (*.mid, *.rmi) of type 0 or 1.

MIDI songs are internally represented as lists of tracks, where each track is a list of messages, and each message is a string. The message string format is the same as the one used by the command line tools MF2T/T2MF created by Piet van Oostrum.

The class provides methods to generate and manipulate MIDI data and to import and export binary midi files (SMF, *.mid), text in the MF2T/T2MF format and MIDI XML.

Online Tools

Usage

php midi2xml.php xxx.mid [> xxx.xml]
php midi2txt.php xxx.mid [> xxx.txt]
php midi2score.php xxx.mid

Reference