From the ALSA wiki
Apologies for this not being strictly an ALSA utility but the end result of using it with MIDI files certainly requires ALSA.
MidiComp is a program to manipulate SMF (Standard MIDI File) files and will both read and write SMF files in 0 or format 1 and also read and write it's own plain text format. This means a SMF file can be turned into easily parseble text, edited with any text editor or filtered through any script language, and "recompiled" back into a binary SMF file.
The package can be downloaded from http://midicomp.opensrc.org/
Please add any notes, comments or patches here or email to markc at renta dot net.
2005-01-29 Some other similar packages are available submitted by Pedro Lopez-Cabanillas to the Linux Audio Users mailing-list... It is nice to know that there are several alternatives to choose. I've found more references at linux-sound.org:
Folly: a text-to-MIDI program written in Perl/Tk Dead link, http://homepage.ntlworld.com/serissa/
Midge: Midi sequencing from the comfort of your text editor http://www.dmriley.demon.co.uk/code/midge/ (This is a Perl based programming tool)
GMC: Guenthers Midi Compiler, a tool to convert text to midi. http://www.geocities.com/SiliconValley/Software/8918/linux/index.html
A PHP based class http://staff.dasdeck.de/valentin/midi/
MIDICSV: MIDI files to CSV (Comma-Separated Value) format, by John Walker. http://www.fourmilab.com/webtools/midicsv/
Both Midge and GMC are based on some kind of music description languages. In this area is worth to mention Lilypond because it generates MIDI files and nice scores at the same time, using also an input text describing the music. OTOH, midicomp and midicsv are very similar, based on a text format representation very near to the SMF format.
Retrieved from "http://alsa.opensrc.org/MidiComp"