Open In App

arecordmidi Command in Linux with Examples

Last Updated : 24 Jul, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

arecordmidi command in Linux is a utility command which is used to record a standard MIDI file from any number of ALSA sequencer ports. ALSA stands for Advanced Linux Sound Architecture which is a software framework built into the Linux kernel. The ALSA sequencer interface provides a platform to deliver MIDI like events between clients and ports.

Syntax:

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

Example:

arecordmidi -p 14:0 geeks.midi

The above command records from port 14:0 into the geeks.midi file. Recording continues until Ctrl+C is pressed by the user. No output is displayed for this command. The -p option is mandatory which specifies the client port.

Options:

1. -l Option (List):

This option is used to display all the possible input ports to the user.

arecordmidi -l

2. -b Option (Beats – Musical Tempo):

In the below example,  recording takes place from port 14:0 and is saved to geek.midi file with a tempo of 150 beats per minute.

arecordmidi -p 14:0 -b 150 geek.midi

No verbal output is displayed for this command in the terminal. The recording continues until stopped.

3. -f Option (Frame):

arecordmidi -p 14:0 -f 25 geek.midi

In this particular example, recording happens from input port 14:0 and is saved to geek.midi file with a configuration of 25 frames per second.

No verbal output is displayed for this command in the terminal. The recording continues until stopped.

4. -m Option (Metronome):

arecordmidi -p 14:0 -m 14:0 geek.midi

In this particular example, a metronome signal is given to port 14:0.

No verbal output is displayed for this command in the terminal. The recording continues until stopped.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads