Last active
April 30, 2017 19:03
-
-
Save zenlor/9edc1460668eb775f79b91213262eedd to your computer and use it in GitHub Desktop.
VMS2 + xwax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/dash | |
[ "$TRACE" ] && set -x | |
DRIVER="alsa" | |
XWAX_OPTS="-k -q 40 -g 800x480 --no-decor" | |
LIBRARY_FOLDER="/media" | |
onexit() { | |
echo "SIGINT received" | |
echo "sending SIGTERM to all processes" | |
kill $pid | |
sleep 1 | |
} | |
xwaxrun() { | |
xwax $XWAX_OPTS $@ -l $LIBRARY_FOLDER & | |
pid="$!" | |
echo "XWAX PID $pid" | |
echo | |
} | |
if [ "$DRIVER" = "jack" ]; then | |
## Start Jackd2 | |
jack_control start | |
sudo schedtool -R -p 20 `pidof jackdbus` | |
jack_control eps realtime true | |
jack_control ds alsa | |
jack_control dps device hw:Device | |
jack_control dps rate 48000 | |
jack_control dps nperiods 2 | |
jack_control dps period 64 | |
## Start XWAX | |
xwaxrun "-j deck1 -j deck2" | |
sleep 2 | |
# connect jack ports | |
jack_connect system:capture_1 xwax:deck1_timecode_L | |
jack_connect system:capture_2 xwax:deck1_timecode_R | |
jack_connect system:playback_1 xwax:deck1_playback_L | |
jack_connect system:playback_2 xwax:deck1_playback_R | |
jack_connect system:capture_3 xwax:deck2_timecode_L | |
jack_connect system:capture_4 xwax:deck2_timecode_R | |
jack_connect system:playback_3 xwax:deck2_playback_L | |
jack_connect system:playback_4 xwax:deck2_playback_R | |
else | |
xwaxrun "-a vms2_deck1 -a vms2_deck2" | |
fi | |
trap onexit INT TERM | |
wait $pid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pcm.vms2_capture { | |
type dsnoop | |
ipc_key 1647 | |
slave { | |
pcm "hw:Device" | |
period_size 8 | |
buffer_size 65536 | |
rate 44100 | |
channels 4 | |
} | |
} | |
pcm.vms2_playback { | |
type dmix | |
ipc_key 1647 | |
slave { | |
pcm "hw:Device" | |
period_size 8 | |
buffer_size 65536 | |
rate 44100 | |
channels 4 | |
} | |
} | |
pcm.vms2_duplex { | |
type asym | |
playback.pcm vms2_playback | |
capture.pcm vms2_capture | |
} | |
pcm.vms2_deck1 { | |
type plug | |
ttable.0.0 1.0 | |
ttable.1.1 1.0 | |
slave.pcm vms2_duplex | |
} | |
pcm.vms2_deck2 { | |
type plug | |
ttable.0.2 1.0 | |
ttable.1.3 1.0 | |
slave.pcm vms2_duplex | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment