Introduction

In our latest assignment, we testing the efficacy of Jacktrip, a utility developed at CCRMA at Stanford for low-latency audio transmission between multiple clients. Jacktrip employs the Jack protocol, a high definition API for audio communication between applications. Jacktrip appears to be one of the few viable tools that, in theory, works on every operating system (Windows, macOS, Linux) which makes it a potentially worthwhile investment from the angle of usability and access alone. Could this software, built by leading researchers behind the Ivory walls of Stanford, be the skeleton key to our audio dreams. Let’s find out!

Installation and setup

It took us some time to set up Jacktrip. One of the reasons for that was due to the somewhat scattered documentation. At time of writing, Jacktrip version 1.2 has not been released as a standalone package, and needs to be built from the source code from here.

There are three main steps involved, which we will go through here.

1 - Downloading Jack

Jack is the underlying audio driver that Jacktrip is built on top of. There are maintained version of Jack. We will use Jack2. You should be able to just download it from the official webpage for all popular operating systems. However, we weren’t, so we’ll guide you through our alternative path.

MacOS

We found out that the easiest way to install Jack on MacOS is by using the package manager Homebrew. Homebrew is a highly recommended tool for anyone developing anything on a Mac, so it’s likely going to be useful for other things as well. With Homebrew installed, you can install Jack by typing the following into your terminal:

brew install jack

You can confirm that you have installed Jack by typing

jackd --version

For ease of use, you must also install a graphical Jack client called qjack. You can find other mirrors for this install in Ben Loveridge’s guide.

Once you have jack and qjack installed, open qjack, go to “Setup” and set /usr/local/bin/jackd (the location you installed the jack executable to) as the server path (see image below). Note that this is also where you can change other settings such as sample rate, audio interface, number of channels etc.

Settings

To confirm that Jack runs properly, press “Start”. It should look something like this:

Started

Now, by pressing “Connect”, there should be a patchin window showing sends and receives. If you connect as in the image below, you are sending your input to your output, so you should be able to hear yourself.

Loopback in Jack

2 - Dowloading Jacktrip

The GitHub repository contains the code for Jacktrip version 1.2. If you are comfortable with building the project from the source code, you can proceed by cloning and then the repository.

Otherwise, we advise you to just download version 1.1 from one of these release pages:

MacOS

https://ccrma.stanford.edu/software/jacktrip/osx/JackTrip.pkg

Windows

https://ccrma.stanford.edu/~cc/153resources/win10/jacktripInstaller/

Verify that you have installed jacktrip by typing the following in your terminal.

jacktrip --version

If you have version 1.1 (or 1.2 if you built it yourself), proceed to the next step.

3 - Configuring Jacktrip

In the most basic sense, Jacktrip could be as easy as:

  • one musician setting up a server with “-s”
    jacktrip -s # defaults to port 4464
    
  • another musician connecting with “-c”
    jacktrip -c <IP_ADDRESS>
    

If there is a successful connection, you can navigate to the “Connect” tab in qjack to route the incoming audio wherever you want.

Connect

However, making Jacktrip work for us involved quite a few technical steps, such as forwarding ports on our home router and testing network connections with iperf. For a detailed walthrough, we advice you to follow Ben Loveridge’s guide (alternatively available here). His guide is quite extensive and features a number of FAQ’s for any trouble one might run into during installation or optimization.

Troubleshooting

Ben Loveridge’s guide is the resource we recommend for troubleshooting most things with Jacktrip. For API documentation of Jacktrip you can read up on the documentation. However, the software documentation is old and is therefore likely to be outdated. Working with older software on newer operating systems, such as updates like macOS Catalina 10.15 that break functionality with a large number of apps, is always a challenge.

Testing and experience

After some initial struggles with setting everything up in the right way, we were able to test a connection from one client to the server.

After we managed to tune the correct settings (buffer size etc.) to get rid of artifacts, the audio quality was very good.

In order to test the latency, we played a steady drum track from the client, to which Thomas (the server) played guitar on top. The audio that Thomas sent back to the client was close to half a beat off, so we quickly concluded that the latency was too high to be able to play in synchronization with each other. However, the network specs on the client side was lower than what Ben Loveridge recommended in his guide, so it may be possible to do this if all peers have a sufficient internet connection.

We didn’t manage to connect the third peer (due to poor support for Jack on Windows), but as Jacktrip is peer-to-peer this would likely have required an even faster internet connection. In addition, this configuration requires an ethernet cable, which is a small but very important requirement for this technology. Because audio information must be sent in a continuous stream (for the audio itself to be coherent), a wireless connection is not an option as it allows packets to be lost compared to ethernet, a lossless connection.

Concluding thoughts

Here our some of out thoughts concerning Jacktrip:

  • Definitely not plug and play
  • The installation needs to be simplified extensively There were several people mentioning ways this could be done in this thread: https://groups.google.com/forum/m/#!topic/jacktrip-users/KrhojQxYy_w
  • Once everything was set up, it was fairly easy to understand how things were connected. However, even the patchbay GUI could be better designed
  • One needs an ethernet connection and decent internet connection
  • Fairly easy to use once the connection is made. JackTrip shows up as an audio device that you send/receive to, so it’s quite easy to configure for your own use.

Jacktrip might be the most robust project for large networked performances, but it is quite reliant on technical competence and a good internet connection from every party involved. It is also unfortunate that such an essential tools hasn’t been seriously updated/maintained for over a year, as it seems quite well referenced online.

Resources

  1. The official GitHub repository: https://github.com/jacktrip/jacktrip. Although there exist several versions of the Jacktrip repository, this seems to be the most recently maintained at the time of writing. Chris Chafe, the main author of Jacktrip, announced this in the Google Forum mentioned below
  2. The official GitLab repository: https://cm-gitlab.stanford.edu/cc/jacktrip
  3. Ben Loveridge. Networked Music performance: A step-by-step guide to real-time musical collaboration over the internet: https://docs.google.com/document/d/18pbu2xQRv521NKvHuYHjIVXRcLFqcDsqYnfKixyuyGg
  4. Google Forums for the Jacktrip user group: https://groups.google.com/forum/m/#!forum/jacktrip-users
  5. Jacktrip manual: https://sites.google.com/site/jacktripdocumentation/home