Caveats
This is a Mac-centric post, because that’s what I’ve got to work with. However this can also be done on Linux or Windows computers, although this cookbook doesn’t cover the specifics of how to do that. It’s written in 2016 — don’t count on updates.
This is all for free. I am not a service provider offering a service that requires fees. The software is open-source and you and your partner(s) will provide all the hardware and network resources.
This is a distillation of a fabulous “Online Jamming and Concert Technology” course offered by Kadenze. I highly recommend this course (which can be taken for free) if you want to go deeper.
Set up a good network connection between players
There are three ingredients for a successful connection between online-jam participants – direct connections between computers, enough bandwidth and good quality. Here’s the high-level recipe:
Configure routers and firewalls to permit direct connections between participant computers
Configure participant routers (and computer firewalls) to forward (and accept) UDP packets on ports 4464 and 4465. Wider ranges (eg. 4464-4470) allow for more than two simultaneous participants. Ports must be open on both ends of the connection.
Verify that there is enough bandwidth
A minimum of 2 mBits of bandwidth in both directions is required and more is better. The downstream requirement is generally easier for everybody to meet, it’s the upstream speed that’s harder/crucial.
Verify that the connection is of high enough quality
Sound takes about 1 ms to travel a foot, so every ms of latency in the connection equates to a foot of separation between musicians.
Test latency on the connection to determine whether musicians can play on their own, or need somebody to set the pace. 30ms of latency (30 “feet”) of separation is the practical maximum for jamming without somebody acting as the clock or conductor.
Test jitter on the connection to make sure that it will be below .500 milliseconds (ms). .500 ms (.5 “feet”) of variation of when packets arrive (aka jitter) is the practical limit to how much “distance” can change before musicians get cranky.
Click this link for detailed instructions on how to use IPERF to test port-forwarding, network performance and connection quality between participants in an online jam session.
Install software
Three programs are needed:
Jack server
Jack is a sound server that provides real-time, low-latency connections for audio data between applications on the local computer. Other audio applications beyond JackTrip (eg Audacity, Ableton Live) can see the inputs and outputs to Jack once it is running. They will appear as JackRouter.
TIPS:
– Use jackd -d coreaudio to launch the Jack server on a Mac (works on my Mojave machine)
qjackctl, the user-interface for the Jack server
While not the only option, this cookbook will focus on qjackctl as the user interface program that will configure and manage the Jack server. This program will be installed at the same time Jack is. May require a manual-start of the Jack server
TIPS:
– Error: “Could not connect to JACK server as client. Overall operation failed. Unable to connect to server.”
Fix: Ensure that QjackCtl setup and the audio interface have the same sample rate, then restart QjackCtl. Restart the DAW if it’s in the mix.
– Unable to connect to server.
JackTrip (server or client)
This is the software that supports networked music performance over the internet by connecting the Jack servers on each participant’s computer. This software is command-line only and will be installed separately. It will not run if the local Jack server isn’t running first.
Here are links to the downloads and instructions for Jack and JackTrip on various platforms. They should work similarly even though the focus of this scratchpad is the Mac versions.
– for Linux — https://ccrma.stanford.edu/software/jacktrip/linux/index.html
– for OSX — https://ccrma.stanford.edu/software/jacktrip/osx/index.html
– for Windows — https://ccrma.stanford.edu/software/jacktrip/windows/index.html
Links to Documentation
Jacktrip page at Stanford CCRMA – https://ccrma.stanford.edu/software/jacktrip/
Jack Audio Connection Kit – http://www.jackaudio.org
Jacktrip Manual – https://sites.google.com/site/jacktripdocumentation/videos
Jacktrip: Under the hood of an engine for network audio https://ccrma.stanford.edu/groups/soundwire/publications/papers/2009-caceres_chafe-ICMC-jacktrip.pdf