These notes came from attending Chris Chafe's Music 153b class online via Zoom in April 2020, when it became more important than ever to do online jamming for "obvious reasons".
These notes are informal and assume you are familiar with linux, macOS and audio apps.
Chris Chafe, Matt Wright and others are the experts in this area, these are just my preliminary notes and they are not intended to be part of any official CCRMA/jack documentation, which is here:
JACK Trip blog
Jack Trip Setup video
Please feel free to comment and correct and clarify - Nick Porcaro 4/25/2020 nick at ccrma dot stanford dot edu
- Restart your internet connection from scratch - Login into Linode: https://www.linode.com/ - Create a server in your area from a backup - Once it's running ssh onto the linode server and start jackd and jacktrip ssh root@IPADDR cd jacktrip/builddir jackd -ddummy -r48000 -p128 & ./jacktrip -Sz -p4 -q24 - Then on the mac: - Start Logic: Use blackhole16 - Start qjackctl: Use aggregate device (eg: NickDevice which has iPad, Tascam, mic and blackhole16) - Make sure the round trip time is reasonable: ping IPADDR - Start jacktrip using the compressor if you can: jacktrip -Oow -C IPADDR -q8 -n1 - But if not: jacktrip -C IPADDR -n1 -q8
- Setup Jack and jacktrip by following these instructions: https://ccrma.stanford.edu/software/jacktrip/osx/index.html - Connect to CCRMA and start jackd using qjackctl: - Terminal on local computer ssh -Y email@example.com - Terminal at CCRMA killall jackd qjackctl & cd ~cc/jacktrip/src ./jacktrip -Sz -p4 -q24 - Open another terminal at CCRMA and start meterbridge if you want to see levels meterbridge -t dpm x x x x x x x x - Ask other people for their ip addresses, so you can meter them: curl ifconfig.me | sed -e 's/$//g' - Start the qjackctl.app on your mac, do a mic check: jacktrip -C cmn11.stanford.edu -n1 -q8 If you are on the jos branch as of 11/13/2020 you can do this to see a histogram display: jacktrip -x2 -Oow -n2 -C cmn11.stanford.edu If the Internet is dicey, then sacrifice the test channel: jacktrip -Oow -n1 -C cmn11.stanford.edu - Start your DAW and connect to JackRouter - Make sure all the qjackctl connections are correct.
This will make it so that when you connect to a CCRMA server the user interface for X windows applications running on a CCRMA server like qjackctl and audacity appear on your local computer.
I think you have to launch /Applications/Utilities/XQuartz.app (or wherever it gets installed) one time for this to work. You'll know it worked if you see a DISPLAY environment variable in your shell. It will lool something like this:
mac% echo $DISPLAY /private/tmp/com.apple.launchd.tENDl65IcI/org.macosforge.xquartz:0
Note that X’s service is putting a graphical window in front of a user’s face and receiving keypresses and mouse clicks.
This is the opposite of the usual “server is a machine in the cloud; client is the machine in my pocket” scenario we’re used to. So in this case the CCRMA Linux. workstation is the X *client* and the MacBook is the *server*. For details see: https://en.wikipedia.org/wiki/X_Window_System
Note the -Y option is required to get server-based X windows applications to run locally, it "Enables trusted X11 forwarding". See the man page for ssh for more info.
mac% ssh -Y firstname.lastname@example.org Supply ccrma password - See: https://ccrma.stanford.edu/docs/system/password.html ccrma% qjackctl &
Now the qjackctl running the CCRMA server will start on your mac For the particular machine in this example, I used these settings in qjackctl, your settings might be different:
Interface=hw:US2x2,0, sample rate=48k, frames/period=1024,periods/buffer==2 driver=alsa
ccrma% ps axwwwu|fgrep jackd nick 2277 0.0 0.0 215744 896 pts/0 S+ 18:41 0:00 grep -F --color=auto jackd
ccrma% killall jackd
(-p4 means you hear system capture through jack)
ccrma% cd ~cc/jacktrip-aaron ccrma% ./jacktrip -Sz -p2 -q24
ccrma% meterbridge -t dpm x x x x x x x x
And then in the CCRMA server qjackctl window connect all the signals you'd like to meter.
Note: changing which clients are connected might completely reset all jack connections on the machine (hence getting rid of the meter bridge connections every time a new client connects.
Hit the setup button and make sure everything is what you want it to be. The most common problems I've seen so far is the setting for the output device and buffer size. I have tried coreaudio, buffer sizes of 128,256,512 and 1024. Whatever you setup on the server has to match here.
qjackctl is a graphical interface to jackd - the jack daemon. You could start jackd from the command line. See the man page for jackd for details.
Make sure you can hear your audio. Be careful of feedback here if you have speakers on in the room!
mac% jacktrip -C 22.214.171.124 -n1 -q8
I did a session with a musician in Pleasanton while I was in Palo Alto, both of us were on comcast hard wired. It kind of worked to do a slow blues at 512 using -n1 -q6
Note that JackRouter will appear once jackd has started, it is independent from jacktrip having started.
For example, if you’re making sound in a coreaudio application such as Logic, here’s where you can sound check your sound by selecting JackRouter in Logic and routing Logic’s outputs to the system playback channels in Jack.
A note regarding Logic: Say you have a large Logic sound library on a Catalina partition and you want to see it on your Mojave partition, you can do something like this:
mac% ln -s /Volumes/internal/Library/Application\ Support/Logic /Volumes/mojave/Library/Application\ Support/Logic
Where /Volumes/internal would be the Catalina partition and /Volumes/mojave would be the mojave partition. This way you can have a smaller mojave partition because you are not duplicating the disk space needed for the Logic libraries, which can be rather large, 60GB for me as of this writing.
For that I'm not sure what to do. Matt says: "For Catalina you can kludge around it with Blackhole or Soundflower, etc, but you have to be much more careful", but I have yet to verify this
Here's how Matt recommends recording from Jack into Ableton without JackRouter:
0. Have SOundflower (which I see from your video that you do) 1. Use Audio MIDI Setup to create an aggregate device consisting of your audio hardware plus Soundflower (2ch) 2. In qjackctl to the right of “Interface” select your aggregate device 3. Now when you start jack and look in the Connections window you should see four “writable clients” under system: playback_1 through playback_4. Two of them will be your audio interface, to use as you do now, and the other two will be soundflower’s two inputs. Make the connections so you hear what you want to hear and you’re recording what you want to record. 4. In Ableton select soundflower as the input device
I found that doing this command in your mac terminal will print your static ip address on the last line, which in the example below means my ip address is: 126.96.36.199
mac% curl ifconfig.me | sed -e 's/$//g' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11 100 11 0 0 120 0 --:--:-- --:--:-- --:--:-- 120 188.8.131.52
To Kill any jack processes running the CCRMA server or your computer:
ccrma% ps axwu | fgrep jack matt 30683 0.0 0.0 216384 3320 pts/1 T 15:20 0:00 /bin/sh ./jackd-tascam 256 matt 30684 0.0 0.0 0 0 ? Zs 15:20 0:00 [jackd]
nick 32274 0.0 0.0 215744 892 pts/0 S+ 15:48 0:00 grep -F --color=auto jack ccrma% killall jackdmp ccrma% killall jackd
But you can't kill someone else's processes, you have to ask them to do it.
Also, the other person might need to kill the processes indivually In the case above, Matt could do this to get rid of the jackd process
ccrma% kill -9 30683