Tech News
← Back to articles

Squidcasa/midipipe: ALSA Sequencer to plain text and back

read original related products more articles

midipipe - MIDI from stdin and to stdout

midipipe (1) is a Linux program that accepts MIDI events in a plain text format on stdin, and sends them to a MIDI device or client using the ALSA sequencer API, and vice versa.

echo 'ch 1 note_on 60 127' | midipipe | grep 'ch 2 cc'

It keeps a persistent client, so while you can send a single message like in this example, you can also continuously stream messages in or out, which is where midipipe shines.

Use it in your shell scripts, or really anywhere where you don't have a proper MIDI API available, but you are able to shell out and write to/from a sub-process. It also makes a great "MIDI monitor", to see exactly the messages a device or program is emitting.

Events are always sent in (or near) real time, midipipe does not handle timestamps.

Installation

There are per-built binaries available on the releases page, or build it from source (see below).

Design and Usage

midipipe - MIDI message to and from plain text pipe OPTIONS: -i, --input Connect device for input -o, --output Connect device for output -d, --device Connect device for input and output -c, --client Name of the ALSA client, default 'midipipe' -v, --version Print version information and exit -l, --list List devices -h, --help Show this output

... continue reading