Skip to content

Instantly share code, notes, and snippets.

@smartmic
Created September 26, 2015 16:29
Show Gist options
  • Save smartmic/4d0150cccdac02b1468a to your computer and use it in GitHub Desktop.
Save smartmic/4d0150cccdac02b1468a to your computer and use it in GitHub Desktop.
loop2jack
#!/bin/sh
# script loop2jack, located in /usr/local/bin
# loop client creation
/usr/bin/alsa_out -j ploop -dploop -q 1 2>&1 1> /dev/null &
/usr/bin/alsa_in -j cloop -dcloop -q 1 2>&1 1> /dev/null &
# give it some time before connecting to system ports
sleep 1
# cloop ports -> jack output ports
jack_connect cloop:capture_1 system:playback_1
jack_connect cloop:capture_2 system:playback_2
# system microphone (Fast Track Pro analog input 1) to "ploop" ports
jack_connect system:capture_1 ploop:playback_1
jack_connect system:capture_1 ploop:playback_2
# done
exit 0
@UrbanDesimator
Copy link

Thanks very much for sharing it's so simple but works flawlessly combined with your .asoundrc. I get ZERO xruns :-)))))) ,
I run a pure alsa system no pulsing-wires or plumbers needed.
I load the script in qjackctrl after it starts jack.
I have setup 2 scripts in slackwares /etc/rc.d the 1st sets up the system then swap over asound.conf files from daily-use to loop2jack the 2nd swaps things back both from individual desktop-menu entries and ktsuss.
I am in process of writing a github page to do this in slackware on a full rt kernel and will share your gist info to give you credit.
UrbanMusic 22 year Slacker this year :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment