6

How do I print and connect jack-audio and midi ports from the command line, similar to aconnect -io or aconnect 20:0 132:1 for inputs and outputs of ALSA MIDI?

1 Answer 1

6

jack_lsp [options] [filter string]

is able to print all jack ports (Audio and MIDI).


From the help-text:

List active Jack ports, and optionally display extra information. Optionally filter ports which match ALL strings provided after any options.

Display options:
        -s, --server <name>   Connect to the jack server named <name>
        -A, --aliases         List aliases for each port
        -c, --connections     List connections to/from each port
        -l, --latency         Display per-port latency in frames at each port
        -L, --latency         Display total latency in frames at each port
        -p, --properties      Display port properties. Output may include:
                              input|output, can-monitor, physical, terminal

        -t, --type            Display port type
        -h, --help            Display this help message
        --version             Output version information and exit

For more information see http://jackaudio.org/


to connect the ports from the command line, you can use jack_connect.

with jack_lsp you could get an output like this showing all current jack ports:

system:capture_1
system:capture_2
system:playback_1
system:playback_2
system:midi_capture_1
system:midi_playback_1
amsynth:L out
amsynth:R out
amsynth:midi_in
system:midi_playback_2
system:midi_capture_2

as an example you could connect system:midi_capture_1 with amsynth:midi_in by running: jack_connect system:midi_capture_1 amsynth:midi_in

To see which ports are connected you could use jack_lsp -c and get an output similar to this:

system:capture_1
system:capture_2
system:playback_1
   amsynth:L out
system:playback_2
   amsynth:R out
system:midi_capture_1
   amsynth:midi_in
system:midi_playback_1
amsynth:L out
   system:playback_1
amsynth:R out
   system:playback_2
amsynth:midi_in
   system:midi_capture_1
system:midi_playback_2
system:midi_capture_2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .