electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » How-tos » Tutorials
Working with JamKazam
Post new topic   Reply to topic
Page 1 of 1 [2 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
tbruce



Joined: Dec 03, 2017
Posts: 28
Location: Ithaca, NY USA

PostPosted: Mon Apr 20, 2020 4:20 am    Post subject: Working with JamKazam
Subject description: Getting set up to use JamKazam for remote collabs
Reply with quote  Mark this post and the followings unread

Friends:

Howard Moscovitz and Bill Fox asked if I’d post something about getting started with JamKazam, software that supports group jams over the Internet. I’ve already rattled on about it on my blog at https://tombrucemusic.space, but I thought it would be useful to do a post that just concentrates on the essentials. I've also posted this in parallel on my blog, which will give you access to all the hyperlinks as well -- it's at https://tombrucemusic.space/2020/04/20/jamkazam-again/

The first question people ask -- especially if they know anything about the Internet -- is, “How can this thing possibly work? Given the limits imposed by the speed of light, you can’t possibly overcome the latency in the network and get any kind of synchronization.” If the speed of transmission over the Internet were the only thing involved, that would be correct. Or at least it would be correct if you were trying to do Berlin-school heavily sequenced stuff, like putting each member of Kraftwerk in a different city thousands of miles apart.

But, as it turns out, psychoacoustics buys us a little time, and if you reduce latency in every part of the system as much as you possibly can, you can actually pull this off, at least within the continental United States. As it turns out, JK (as we’ll call it from here on in) insists on doing all the shaving it possibly can. If you’re interested in a thorough explanation of how human perception and network latency-shaving make all this possible, I suggest you read both the Wikipedia article on networked music performance, and Alexander Carot’s thesis, here: http://www.carot.de/Docs/dissertation_AC.pdf

Bottom line: it works. I’m in Ithaca, NY; I routinely collaborate with Charles Shriner in Indianapolis, with Karl Fury in Princeton, and with Jim Spitznagel up in Rochester. We’ve produced albums that way. There is a price for all of this, of course: JK achieves minimum latency by requiring a fairly speedy Internet connection end to end, and by taking over basically every aspect of audio routing in your system.

What you need:

+ A Windows or OS/X computer. Sadly, there is no version of JK for Linux, nor will it run in an emulator like WINE or in a virtual machine provided by something like VirtualBox. At least not for me.

+The JK software, downloadable from https://www.jamkazam.com/.

+ A hardline ethernet connection between your music rig and your cable modem or other in-house access point. JK does not like to run over WiFi. The faster you can make that connection, the better.

+ An audio-to-digital interface with minimal internal latency. People use different ones for different reasons. I’ve used both Focusrite Scarlett and MOTU Microbook interfaces. The MOTU is about 2 ms faster. I suppose you could equally well use the USB takeoff from a modern mix board, or anything else that will act like an interface. Whatever you use -- and I can’t say this often enough, or loudly enough -- you need to understand your interface thoroughly.

+ A video camera that works with your system, used to wave incoherently at your bandmates and display informative scribbles when nobody can hear anything. Any old webcam will do.

+ A microphone that you’ll use to chat with your bandmates (see notes on configuring this below)

+ Patience and persistence.

Setting up JK

JK does a pretty good job of walking you through the setup, starting with your audio interface, and I won’t try to detail the whole process here. They have videos, directly accessible during the setup process, that will help you. I do have two “pro tips”, though.

First, KNOW YOUR INTERFACE. You need to thoroughly understand how physical inputs are labeled, how they will appear in any internal software mixer that the interface uses, and how they will be named by the audio configuration and routing software in the host system that is running JK. Experience has taught me that it’s well worth taking the half-hour needed to make a little spreadsheet that describes how physical inputs and outputs map to the nomenclature used in the interface’s configuration software or software mixer, and to the nomenclature that appears in the host system’s audio routing setup (usually something informative like “input 1, input 2, input 3”, etc.) Doing this before you start will end up saving you a lot of time (and not just with JK). Sometimes (as with Focusrite interfaces or iConnectivity products) they’ve done part of the work for you in their documentation; sometimes (as with MOTU), they’ve provided minimal documentation and bitched things up with a confusing interface on their software mixer.

You also need to understand your options for monitoring input signals. Most modern interfaces offer some kind of “direct” monitoring -- a way to listen to incoming signal while incurring minimal latency through the interface itself. Focusrite products helpfully provide a switch -- either in hardware or software -- that takes then in and out of “direct monitoring” mode. MOTU does it in some way I have to confess that I don’t fully understand and have only figured out through trial and error. The bottom line is that you need to be able to switch direct monitoring off, and you need to make sure that the JK signal is reaching your headphones, or whatever you use to monitor the session, via one pathway only (more on that when we talk about level-setting later).

Final things it’s helpful to know: how to set the sample rate on your interface and in your host system, and how to set the sample buffer size on the host system (generally expressed with numbers like 128, 256, 512, and 1024). Buffer size trades off signal quality with latency -- small buffers tend to snap, crackle, and pop; larger ones incur more latency. A generally informative article from SoundOnSound is at :
https://www.soundonsound.com/techniques/optimising-latency-pc-audio-interface

Setup

JK walks you through the setup process. They’ll first ask you to run a network test; that determines whether or not your networking setup is running fast enough to please JK. Generally, as I said earlier, WiFi won’t.

Next, they’ll guide you through setting up your audio interface -- this is when you’ll need the map you made, just to understand what your options are and what you’re doing. It used to be that you needed to match your interface to a fixed sample rate of 48K that JK uses internally, just to remove the delay incurred by resampling. It now appears that JK matches the interface more or less automatically.

The setup process involves assigning inputs from your interface to JK “tracks”. I assign two inputs to a stereo track labelled “Computer”. During this process, you’ll be asked how you want to chat with your bandmates. JK incorporates a separate “chat channel”, and the setup allows you to assign one of your interface inputs to it as a “chat mic”. I strongly suggest that you NOT do this, but instead set up your chat mic as a separate music track labeled as “Vocal” or whatever. I’ve found that taking that approach makes it easier to mute and un-mute the mic during sessions, and also helps make sense of level-setting when playing with others. Using the “chat mic” facility seems to make routing much harder to understand, for reasons that would take far too long to describe here.

Once you’ve done all the configuration, go into JK’s “create session” pane and open a “quick start solo session”. This is the best way to test what you’ve done.

Other JK stuff

I could write 600 more pages about how to deal with setting up sessions, managing recordings, etc. That I will leave to JK’s pretty-good documentation. That leaves only two difficult topics.

Bowing to the inevitable

Once you’ve configured JK, you’ve essentially handed all control over audio routing to JK. It no longer matters what your interface is telling you. It no longer matters what your host configuration is telling you. JK has inserted its tentacles into every aspect of both, trying to minimize latency, and you will only drive yourself crazy if you try to “fix” anything. Trust me, I know this from bitter experience. The one thing you MUST do is ensure that your monitoring setup is getting signal ONLY from JK, as mentioned earlier. This may require some experimentation if (as with MOTU) the direct-monitoring signal path is not clearly identified. If you DON’T do this, you’ll get the sum of your input signal and what JK is putting out, which will make you sound a lot louder than you really are. And that brings me to the final problem.

Setting levels and monitoring

You’re going to need to spend time setting levels with your bandmates, especially for live performance. There’s no cutting corners on this, and the main reason is that EVERY SINGLE METER AND MONITORING LEVEL SETTING DEVICE IN JK IS EITHER USELESS BECAUSE IT LACKS RESOLUTION OR IS ACTIVELY LYING TO YOU. In theory, the first person into the session has control of a “session mix”; I’m not sure what that does, because I’ve never been able to get it to affect much of anything in any way that is useful. The horizontal meters that appear in the session window have so little resolution that they’re basically hopeless. And everybody has control over their own local monitoring levels, so they’re probably not hearing what you are. Experience provides a few hints to help you get this right, but it WILL take some messing with. We generally allow 45 minutes before a live-stream concert just to make sure everything’s working right and we can get some kind of balance. Here’s a kind of checklist/heuristic:

Everybody should identify a “master gain” they can use to control the final stereo send from their rig into JK, and use ONLY that to make adjustments during sound check. Any internal balancing within your rig, say for dealing with a particularly ‘hot’ instrument, needs to be done ahead of time.
Generally, the horizontal meters in the session window are useless, but it does actually help to use a “solo session” to preset gains so that “average” signal is showing two green bars and loud signals are not clipping.
Balancing is done the way you’d do it in any sound check -- by listening to average and extreme signal levels from one player at a time, listening carefully for clipping or distortion, and then playing together a bit to figure out if anyone’s overly hot. The trick here is figuring out WHERE you’re going to listen. For streamcasts via electro-music.com, we send signal to a test port and then listen to it as it comes back to us over the Internet. There’s significant lag -- on the order of 30 seconds -- but using that approach we can be sure that we hear what the audience is going to hear. While that’s going on, whoever is operating the “send” to the stream is the mix engineer and shot-caller -- what they say, goes.


Sending to a streaming service

You’ll be sending your work out to a streaming setup of some sort, either with or without visuals. What I describe here can be done either with OBS, or with something designed to send to an icecast or shoutcast server like electro-music.com. The bottom line is that you’re going to need a second computer to do that, because JK takes control of audio routing in ways that make it practically impossible to route JK output into anything else without ending up in an insane asylum (at least on OS/X, whose audio routing is horribly opaque anyway). I’m not saying that it’s impossible to get it to work -- I will happily learn from anyone who can get it to operate. I’m saying that I’ve spent hours trying without much success. In the end, what I’ve ended up doing is sending analog signal from the source I use to monitor the JK session via a USB interface into a second computer that’s sending out to the stream. If I’m using a Scarlett interface that has two headphone outs, I’ll just use one for my phones and one to send to the other computer. If I’m not, I have a small headphone splitter/amplifier that I can use to split the signal. It’s a lash-up, but it avoids interference from JK, and guarantees that I hear what the audience hears.


That’s all for now. Questions welcome. There’s more on this scattered through my blog at tombrucemusic.space/blog, especially here, here, and here.

Questions welcome, of course.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Apr 21, 2020 1:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Tom, this is informative - especially the PDF you linked to .. for a bit of a background on it.

It is probably not going to work over the atlantic ... although ping (roundtrip) times (from my home to the electro-music server in Canada) of 80 to 90 ms nowadays are way better than they used to be, that still seems troublesome .. adding a couple of tens of ms here and there for audio processing. (pings in NL are usualy under 5ms).

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1 [2 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » How-tos » Tutorials
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use