Advertisement
Guest User

Untitled

a guest
Apr 20th, 2024
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.00 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # switch patchbay connections
  4. #
  5.  
  6. set -x
  7.  
  8. if [ "$1" = "start" ]; then
  9.     aj-snapshot -rjx allout
  10.  
  11. elif [ "$1" = "quiet" ]; then
  12.     disco_left="sooperlooper:common_in_1"
  13.     disco_right="sooperlooper:common_in_2"
  14.     conn_left="system:playback_1"
  15.     conn_right="system:playback_2"
  16.  
  17. elif [ "$1" == "allout" ]; then
  18.     disco_left="system:playback_1"
  19.     disco_right="system:playback_2"
  20.     conn_left="sooperlooper:common_in_1"
  21.     conn_right="sooperlooper:common_in_2"
  22.  
  23. else
  24.     echo "invalid keyword"
  25.     exit 1
  26. fi
  27.  
  28. flag="L"
  29. # first zyn, then vox, then guitar
  30. for i in "zynaddsubfx:out_1" "zynaddsubfx:out_2" "Calf Studio Gear:Reverb Out #1" "Calf Studio Gear:Reverb Out #2" "gx_head_fx:out_0" "gx_head_fx:out_1"; do
  31.  
  32.     # use this flag to do the L-R association
  33.     if [ "$flag" = "L" ]; then
  34.         jack_disconnect "$i" "$disco_left" &
  35.         jack_connect "$i" "$conn_left" &
  36.         flag="R"
  37.     elif [ "$flag" = "R" ]; then
  38.         jack_disconnect "$i" "$disco_right" &
  39.         jack_connect "$i" "$conn_right" &
  40.         flag="L"
  41.     fi 
  42.  
  43. done
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement