arecordmidi -p client:port[,...] [options] midifile
arecordmidi is a command-line utility that records a Standard MIDI File from one or more ALSA sequencer ports.
To stop recording, press Ctrl+C.
A client can be specified by its number, its name, or a prefix of its name. A port is specified by its number; for port 0 of a client, the ":0" part of the port specification can be omitted.
Metronome sounds are played on channel 10, MIDI notes 33 & 34 (GM2/GS/XG metronome standard notes), with velocity 100 and duration 1.
The time signature is specified as usual with two numbers, representing the numerator and denominator of the time signature as it would be notated. The denominator must be a power of two. Both numbers should be separated by a colon. The time signature is 4:4 by default.
Clemens Ladisch <email@example.com>