[linux-audio-user] jack connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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__

--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=connect-ap-pd

#!/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)




	

--zhXaljGHf11kAtnf--


[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux