05-02-2020, 03:33 AM
(05-02-2020, 02:29 AM)marhdeth Wrote:(05-01-2020, 11:37 PM)MattBarr Wrote:(04-27-2020, 02:48 PM)djs Wrote: Interesting information Matt. I am starting to wonder if there is a difference between how (where) the buffer if accounted for on Mac vs PC. You saying that you did not see a change in your latency when changing buffer settings makes me think that it is possibly being factored into the internet latency rather than the audio interface latency (which is where I believe it should be, but who cares).
If you can join a session with someone else, have them look at the different latency numbers as you change the buffer and see what happens. This would also explain how some PC users are seeing 0.0 interface latency. I can't change the buffer on the Mac (core audio) so I can't test this, but I have a feeling that the buffer is factored into my interface latency (because it is higher than it should be with just my interface). Oh, and also that some Focusrite users have reported that their interface latency went down with the use of the Focusrite buffer app. I could be wrong though. It would be great if someone from JK could clarify for us so we don't have to keep guessing.
That's an interesting observation, I will try that at some point. I did do some two-participant testing between a desktop and a laptop, but hadn't seen your post yet.
I'm still waffling on audio interface gear, I play sax and use a mic. For now I am taking tape out from a PA head into the 3.5 mm line in jack on my desktop PC. It's a higher-end Gigabyte mobo with decent on board audio. Output is from the 3.5 mm speaker/headphone jack. Windows Recording and Playback devices are both set for 16 bits at 48000 Hz. I'm using the ASIO4ALL driver with buffer size 128, frame size 2.5, buffers in/out are 2/2. Reported solo session diagnostic latency is 6.8 ms. Input/output jitter dither between green and yellow, but I'll take it.
When I connect a scope to the line in and headphone out connections and tap the mic to create an impulse I measure a 6.6 ms delay. This corresponds nicely with the reported solo session diagnostic latency.
A LOT of gear setup trial and error went into getting to this point! I tried using a cheap USB audio adapter, it works but I can't get the same latency. Long term I plan to get a real audio interface with ASIO driver support, that should improve sound quality and give me some headphone amplification that I'm lacking right now. (My audio receiver is sadly on the other side of the room...)
I created a dummy JamKazam account to test a two-participant session. I set up a similar configuration on my laptop with the same latency, and joined a session I started from desktop. When I look at the "other live tracks" session diagnostics at each end I get a sea of green dots, again with some of the jitter measurements going yellow from time to time but generally well behaved. With horn mic connected to desktop I play along with a drum loop that plays on the laptop, recording and saving at both ends. I've done this with headphones plugged into desktop and into laptop, I don't have any rhythm sync or time keeping problems, I feel like I'm playing in time and the recordings at each end sound like what I'm hearing when I play.
The two participant session diagnostics for desktop and laptop each report 9 ms total latency. When I repeat the scope measurement from line in at the desktop to headphones out at the laptop (mic -> desktop -> internet -> laptop -> headphones) I get a delay of total 17.8 ms. That's basically the sum of the two total latencies, I don't know if that's expected or coincidental, but again I'll take it! Not a high audio quality solution, but CD/DVD quality with low latency.
That 17.8 ms number is pretty incredible to me. I ran netstat on desktop and laptop to make sure I couldn't find a LAN connection between the two! I am quite sure the digital audio traffic is bouncing off the JamKazam server, both machines have a connection to the IPv4 address shown when I ping jamkazam.com. It's probably worth mentioning that my ISP is Frontier FiOS, formerly Verizon. We're subscribed for 75 Mbps up and down, and I typically measure 80 Mbps up/down with latency in the 10 ms ballpark using common speed test utilities like speedtest.net.
Mr. Augustesen is right, don't take the 0 number for internet latency too literally!
One quick note - as far as everything I've seen and heard, session audio is strictly peer to peer, JamKazam servers are uninvolved. So while you may not be connected via LAN, its likely not getting very far through Verizons network before it turns back around to you. Wireshark will probably be more telling what those connections to JK servers are vs where the UDP streams come from.
Thanks very much for this, peer to peer and UDP both make a lot of sense for these audio connections, interesting. I'll fire up Wireshark and see what I can see, I'm curious.
I can't tell you how impressed I am with the work that's gone into JamKazam. Just finished a quick first session with guitar player who also played a drum track, it went very well. He's about 9 miles away, we use different ISPs. He had a default WDM setup with his M-Audio interface, frame size 10 and "poor" latency reported as 20 ms, but we still had no problems keeping time or playing together. We both felt like we were playing live in a studio, great stuff.