LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

amidi

Send and receive raw MIDI data

TLDR

List MIDI hardware ports
$ amidi -l
copy
Send a MIDI file to a port
$ amidi -p [hw:1,0,0] -s [file.syx]
copy
Receive MIDI data to file
$ amidi -p [hw:1,0,0] -r [output.syx]
copy
Dump incoming MIDI messages
$ amidi -p [hw:1,0,0] -d
copy
Send system exclusive data
$ amidi -p [hw:1,0,0] -S "F0 43 10 4C 00 00 7E 00 F7"
copy

SYNOPSIS

amidi [-l] [-p port] [-s file] [-r file] [-S hex] [-d] [options]

DESCRIPTION

amidi is an ALSA utility for sending and receiving raw MIDI data. It works at the byte level, making it suitable for sending system exclusive (SysEx) messages, firmware updates to MIDI devices, or capturing MIDI dumps.Unlike higher-level MIDI sequencers, amidi doesn't interpret MIDI timing or song structure; it transfers raw data to and from hardware ports.

PARAMETERS

-l, --list-devices

List available hardware MIDI ports
-L, --list-rawmidis
List all RawMIDI definitions (useful when debugging configuration files)
-p port, --port=port
RawMIDI port to use (e.g., hw:1,0,0). Defaults to port 0 on card 0
-s file, --send=file
Send the raw MIDI commands in file to the port (e.g., a .syx file)
-r file, --receive=file
Receive data from the port and write it to file
-S hex, --send-hex=hex
Send the bytes given as hexadecimal numbers to the port
-d, --dump
Print received data as hexadecimal bytes
-t seconds, --timeout=seconds
Stop receiving when no data arrives for the given time
-a, --active-sensing
Do not ignore Active Sensing bytes (FEh)
-c, --clock
Do not ignore Clock bytes (F8h)
-i ms, --sysex-interval=ms
Add a delay between each SysEx message sent, useful for firmware updates

CAVEATS

Works only with hardware MIDI ports, not virtual/software ports. SysEx transfers can be large and slow. Some devices require specific timing between messages.

HISTORY

amidi is part of the ALSA utilities, providing low-level MIDI access since ALSA replaced OSS in the Linux kernel in the early 2000s.

SEE ALSO

RESOURCES

Copied to clipboard
Kai