LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

arecordmidi

Record MIDI events to a Standard MIDI File

TLDR

List available sequencer ports
$ arecordmidi -l
copy
Record MIDI from a port (client:port) to a file
$ arecordmidi -p [20:0] [recording.mid]
copy
Record with a specific tempo (BPM)
$ arecordmidi -p [20:0] -b [120] [recording.mid]
copy
Record with a metronome on another port
$ arecordmidi -p [20:0] -m [128:0] [recording.mid]
copy

SYNOPSIS

arecordmidi -p client:port[,...] [options] midifile

DESCRIPTION

arecordmidi records MIDI data from ALSA sequencer ports to a Standard MIDI File. It captures note events, control changes, and other MIDI messages from connected keyboards or controllers.Ports are addressed as client:port (for example 20:0) or by name, as listed by the -l option. The tool is useful for capturing performances without running a full DAW application.

PARAMETERS

-p client:port[,...], --port client:port

Sequencer source port(s) to record from (required)
-l, --list
List possible input ports, then exit
-b bpm, --bpm bpm
Tempo in beats per minute (default: 120)
-t ticks, --ticks ticks
Timing resolution in ticks per beat (default: 384)
-f frames, --fps frames
Use SMPTE timing instead of musical ticks (24, 25, 29.97, or 30 fps)
-s, --split-channels
Write each MIDI channel to a separate track (format 1 file)
-m client:port, --metronome client:port
Play a metronome click on the specified port
-i num:den, --timesig num:den
Time signature; denominator must be a power of two (default: 4:4)

INSTALL

sudo apt install alsa-utils
copy
sudo dnf install alsa-utils
copy
sudo pacman -S alsa-utils
copy
sudo apk add alsa-utils
copy
sudo zypper install alsa-utils
copy
nix profile install nixpkgs#alsa-utils
copy

CAVEATS

Recording starts immediately; no countdown by default. arecordmidi reads from ALSA sequencer ports only, not raw MIDI devices, so connect raw hardware through the sequencer (for example with amidi or a virtual raw-MIDI port) first. Stop the recording with Ctrl-C; the file is written on exit.

HISTORY

arecordmidi is part of the ALSA utilities, providing basic MIDI recording capability since ALSA's introduction in the early 2000s.

SEE ALSO

aplaymidi(1), aconnect(1), amidi(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid