We needed a way of converting MIDI files to on/off instructions for our PVC robotic pipe organ. PHP libraries for working with MIDI files are few and of poor quality, however, we did find one to convert MIDIs to MusicXML, which is a bit easier to work with. There still aren't any good libraries for working with MusicXML files in PHP, though.
TODO: this.