Skip to content

robbie-cao/midi-class-php

Repository files navigation

MIDI CLASS

Description

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 commandline 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.

Applications

  • audio toys
  • mixers
  • sequencers
  • ringtone creators
  • musical education/training
  • ...

Demos

manipulate.php

demonstrates manipulation of MIDI data (imported MIDI file) in various ways

sequencer.php

little online sequencer, 4 drum tracks, 4 instrument tracks, 1 bar only, result can be saved (simple mix format: serialized post array).

mid2txt.php

demonstrates binary MIDI file to text (MF2T/T2MF format) conversion

txt2mid.php

demonstrates text (MF2T/T2MF format) to binary MIDI file conversion

mid2xml.php

demonstrates binary MIDI file to MIDI XML conversion

xml2mid.php

demonstrates MIDI XML to binary MIDI file conversion

meta.php

shows content of all meta events in the first track of a MIDI file. These events are often used for song title, copyright informations etc. (like ID3 tags in mp3 files).

duration.php

demonstrates how to find the duration of a MIDI file.

convert.php

converts MIDI files of type 1 to type 0.

mid2rttl.php

demonstrates (simple) binary MIDI file to RTTL ringtone conversion (uses the RTTL extension, see downloads).

rttl2mid.php

demonstrates RTTL ringtone to binary MIDI file conversion (uses the RTTL extension, see downloads).

Related Links

Contact

fluxus@freenet.de

About

MIDI Class: Read, write and manipulate MIDI files and data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published