从命令行打印并连接 Jack Audio 和 MIDI 端口

nat*_*ath 5 linux command-line audio jack midi

如何从命令行打印和连接 jack-audio 和 midi 端口,类似于aconnect -ioaconnect 20:0 132:1用于 ALSA MIDI 的输入和输出?

nat*_*ath 6

jack_lsp [选项] [过滤字符串]

能够打印所有插孔端口(音频和MIDI)。


从帮助文本:

列出活动的插孔端口,并可选择显示额外信息。(可选)过滤与任何选项后提供的所有字符串匹配的端口。

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
Run Code Online (Sandbox Code Playgroud)

欲了解更多信息,请参阅http://jackaudio.org/


要从命令行连接端口,您可以使用jack_connect.

您可以获得jack_lsp这样的输出,显示所有当前的插孔端口:

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
Run Code Online (Sandbox Code Playgroud)

例如,您可以通过运行以下命令进行system:midi_capture_1连接amsynth:midi_injack_connect system:midi_capture_1 amsynth:midi_in

要查看连接了哪些端口,您可以使用jack_lsp -c并获得与此类似的输出:

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
Run Code Online (Sandbox Code Playgroud)