Playing with others over the internet

The technology for playing music with others over the internet has been around for many years, but only recently, during the pandemic, has there been widespread interest. The problem for musicians is that video platforms like zoom do not handle audio in a way that is conducive to playing music together with another person at the same time – it works fine if one person is muted and one not, but if two people try to play at the same time, there is a lag (called “latency”) that makes it very difficult to play together.

The main reason for this latency has to do with the way data (in this case, your sound) travels on the internet. All data that travels on the internet travels in “packets”. When you click on a link to go to a web site, the data to load that page on your computer arrives in small packets, and then they are assembled by your modem and computer to display the web page. Sometimes those packets take different routes and arrive at different times, but it’s generally not an issue for most of what we do on the internet (loading websites, reading emails, watching videos, etc) but for musicians to play together, we need to send audio in two directions as quickly as possible- we need to hear each other as we would if we were in the same room, not with a lag (A.K.A. “Latency”).

The speed of light dictates how quickly we can send data to other places so distance, (along with the speed of your internet connection, network traffic and your audio setup) are factors that contribute to the latency. Most people find that playing together with under 15 milliseconds of latency is workable, but depending on the type of music being played, a higher latency may be tolerable. Anything over 30 ms will make playing together much more difficult and latency over 75ms is impossible. For this reason, we make every effort to reduce latency for a better musical experience.

Here’s an explanation of Latency from the SonoBus website: Even if all the Internet equipment your audio passes through were capable of operating with no processing time, the speed of light, (186,282 miles per second) means a sound played in San Diego, CA would travel to Sydney, Australia, a trip of 7500 miles, in 0.040 seconds (40 ms). For comparison, consider an in person session, where the same sound travels at 1100 feet per second (the speed of sound in air). That 40 ms delay would be the equivalent of playing with someone sitting 44 feet away.

Fortunately, there are ways to “tune” your connection to your music partner to reduce (but not eliminate) the latency. The quality of the audio affects latency because higher quality audio requires more data to be sent which can increase latency, while lower quality audio requires less data and therefore can decrease latency, but at the cost of your audio quality.

When we make these adjustments, we can control is the size of the packets. The term for this is different in various programs; it can be called “Frames per Packet” or “Frames per Period” or “Samples”, “Buffer” etc. The idea is that choosing a larger audio buffer size sends bigger “chunks” of audio in each packet, which take longer to pass through the entire system, which creates a longer delay/latency, but provides higher quality audio. So, larger audio buffer size means more latency but higher audio quality and a smaller audio buffer size means less latency but lower audio quality.

There are some best practices (regardless of which method you use) that will reduce your latency and improve your experience:

  •  If at all possible use a direct, wired connection to your modem instead of WiFi –  WiFi connections are generally slower.
  • Wear headphones or earbuds when you’re playing- this will eliminate echo problems and reduces latency due to the short distance between your ears and the speakers.
  •  Use a separate microphone – you will get a better sound on your voice or instrument and and it reduces latency due to the short distance between the sound source and the microphone.

 

 

 

Here are some applications for playing music over the internet

(I will attempt to keep this page updated as my research continues) 

 

JackTrip Studio: (https://www.jacktrip.org/studio.html)

JackTrip Studio offers a “plug-and-play” system for playing music with others. It was originally designed for non-technical people, so it makes the process much more simple than other methods. It consists of a proprietary raspberry-pi audio interface and all settings are on their audio servers (although they do provide the option for people to make their own audio servers).

 

JackTrip Pros:

  • Easy to use (“plug-and-play”)
  • You don’t need an audio interface
  • Allows control of Audio Quality (sample rate), Samples (A.K.A. “frames-per-period”), Queue (size of jitter buffer)
  • Includes Reverb, Compression, Limiting & auto-pan features.

 

JackTrip Cons:

  • Requires purchase of proprietary hardware (~$150)
  • They charge for server time (but at $1 per hour for under 10 participants isn’t bad)
  • Audio servers are sometimes buggy (but improving rapidly)

 

 

 

 

SonoBus: (https://sonobus.net/)

SonoBus is a free application for streaming high-quality, low-latency peer-to-peer audio between devices over the internet. It is extremely configurable, but requires some skill to tune the settings successfully.

 

SonoBus Pros:

  • Software is free (no hardware to buy)
  • Allows control of Send Format & Quality & Size of Jitter buffer (for received audio)
  • Includes Recording, Reverb, Compression, Limiting & Gate features
  • Peer-to-peer (doesn’t require an audio server)

SonoBus Cons:

  • A learning curve for people not familiar with the software or the underlying principles.
  • Works best if you have an audio interface and a microphone.