[linux-audio-user] jack connections
Frank Barknecht
fbar at footils.org
Thu Mar 13 08:10:00 EST 2003
Hallo,
Levi Burton hat gesagt: // Levi Burton wrote:
> Is there a command line interface to jack connections? Something similar to
> aconnect? qjackconnect is broken for me. Besides, I would like to know what
> is going on "under the hood" so to speak.
jack_lsp and jack_(dis)connect are included in the jack archive.
Attached is a simple Python-script I just wrote, that automates some
connections I use for DJ'ing:
I run two alsaplayer instances and Pd. The players' output should go
to the 4 Pd inputs to wreck havoc with them in Pd before they go to
jack.
"connect-ap-pd" first disconnects both alsaplayers from their
alsa-outs, and then connects them to Pd.
I also couldn't build qjackconnect with g++-3.2, so I made this script
solution.
have fun
--
Frank Barknecht _ ______footils.org__
-------------- next part --------------
#!/usr/bin/python
import os,string
PD=["pure_data_0:input0", "pure_data_0:input1", "pure_data_0:input2", "pure_data_0:input3"]
ALSA=["alsa_pcm:playback_1", "alsa_pcm:playback_2"]
AP=os.popen("/usr/bin/jack_lsp | grep alsaplayer ")
ap = map(string.strip, AP.readlines())
AP.close()
print ap
for i in range(len(ap)):
ai = i % 2
cmd = "jack_disconnect %s %s" % (ap[i],ALSA[ai])
print cmd
os.system(cmd)
cmd = "jack_connect %s %s" % (ap[i],PD[i])
print cmd
os.system(cmd)
More information about the Linux-audio-user
mailing list