Rachie
Rachie

Reputation: 443

MIDI loopback on Linux

I have a USB to MIDI adaptor, and I'm trying to implement a simple loopback. I want to read from the MIDI in, and echo it directly to the MIDI out.

I've been using amidi to both send and receive raw MIDI commands. Each operation works well independently, but I can't combine the two. The system throws an error because the first instance of the program blocks the second.

$ amidi -p hw:1,0,0 -S < `amidi -p hw:1,0,0 -d`
ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC1D0 failed: Device or resource busy
cannot open port "hw:1,0,0": Device or resource busy
-bash: `/usr/bin/amidi -p hw:1,0,0 -d`: ambiguous redirect

How can I echo MIDI in to out?

Upvotes: 1

Views: 2686

Answers (1)

CL.
CL.

Reputation: 180060

To connect MIDI ports, use aconnect; this also works for connecting a port to itself. (To get a list of possible ports, run aconnect -lio.)

Upvotes: 1

Related Questions