ttyMIDI is a GPL-licensed program that allows external serial devices to interface with the ALSA sequencer.