amidi
Send and receive MIDI messages
SYNOPSIS
amidi -p port [-S hex_data | -R [-d]] [options]
amidi -l
PARAMETERS
-p port
Specifies the ALSA raw MIDI port to use. The port can be identified by its full name (e.g., "hw:1,0,0"), its card/device/subdevice numbers, or an ALSA sequencer port name.
-S hex_data
Sends hexadecimal MIDI data to the specified port. The data should be provided as a continuous string of hexadecimal bytes, e.g., "F07E7F0901F7".
-R
Receives raw MIDI data from the specified port. It will continuously listen and print incoming data until interrupted.
-d
Used in conjunction with -R. Dumps the received raw MIDI data in hexadecimal format to standard output.
-l
Lists all available ALSA raw MIDI devices and their capabilities. This is useful for identifying the correct port to use with -p.
-h
Displays a brief help message and exits.
-v
Displays the version information and exits.
DESCRIPTION
amidi is a command-line utility provided by the ALSA (Advanced Linux Sound Architecture) project. Its primary purpose is to facilitate the sending and receiving of raw MIDI data to and from ALSA raw MIDI ports. This makes it an invaluable tool for debugging MIDI hardware, testing MIDI software, or sending specific MIDI messages like System Exclusive (SysEx) dumps directly to a device. Unlike applications that interpret MIDI messages, amidi operates at a lower level, handling raw byte streams, which offers precise control over MIDI communication. It can be used to send pre-defined hexadecimal MIDI data, or to listen for and dump incoming MIDI messages from a specified port, showing them in hexadecimal format.
CAVEATS
amidi handles raw MIDI data; it does not interpret or process MIDI messages (e.g., notes, control changes) beyond their raw byte representation.
It requires direct access to ALSA raw MIDI devices, which might not be available or correctly configured in all systems.
When receiving data (-R), it will continue to run until manually stopped (e.g., Ctrl+C).
COMMON USE CASES
amidi is frequently used for:
Sending SysEx messages to update firmware or configure hardware.
Troubleshooting MIDI communication issues by monitoring raw MIDI traffic.
Sending specific MIDI commands not easily accessible through higher-level applications.
HISTORY
amidi is part of the ALSA Utilities package, which provides command-line tools for managing and interacting with the Advanced Linux Sound Architecture (ALSA). ALSA replaced the older OSS (Open Sound System) as the default sound system in Linux and has been the standard since the early 2000s. amidi specifically addresses the need for low-level interaction with ALSA's raw MIDI devices, allowing developers and power users to directly manipulate MIDI streams.
SEE ALSO
aplaymidi(1), arecordmidi(1), aseqdump(1), aconnect(1), alsamixer(1)