Midirecord is a simple command-line application to
record a MIDI file with your MIDI keyboard. It
also features automatic recording to a MIDI file
when you play electric piano, and thus it may be
used as a "recording daemon".
Information regarding Project Releases and Project Resources. Note that the information here is a quote from Freecode.com page, and the downloads themselves may not be hosted on OSDN.
The code of this version has been completely rewritten. This version records all MIDI events coming from MIDI keyboards, not just note-ons. It uses the system timer to obtain timing, which makes it more accurate and removes the dependence on MIDI clock events from the keyboard. This version doesn't require ALSA libraries.