News for hackers. Stuff that matters.
Re:Show HN: Low-latency jamming over the internet by analog31 on Saturday October 23, 2021 @10:11AM (#28968693)
Thanks for making this. It looks worth giving a try.

Some friends and I get together roughly weekly using Jamulus. We're playing mostly jazz standards. We have gotten latency down into the 20 ms range, when we are all in the same town. That's the ping time. Add another ~ 40 ms that seems to be eaten up by my local computer and wired home network.

With that said, online jamming is hard work. I'm the bassist. Fortunately I can set my double bass aside and use my electric bass, so I'm not hearing my acoustic and delayed sound at once. The wind instruments and singer, not so lucky. For the bassist it's a constant chore to hold the tempo, leaving little room for anything expressive.

I'm glad to be doing this, beats not playing at all, but yet there is still no substitute for playing together in person.

Re:Show HN: Low-latency jamming over the internet by wmwmwm on Saturday October 23, 2021 @04:11PM (#28971800)
I had a look into how Jamulus works under the hood. It’s more of a hub and spoke model with the central server receiving, buffering and resending the stream out to each client. This has some advantages (kinder to bandwidth especially as the number of clients increases) but it does mean that there are two sets of recv buffers (server and client) which need to be deep enough to avoid too many missed packets due to jitter. My personal experience was that even when running it all on a lan I couldn’t get much below 16-20ms with an ideal near zero latency network. Once you add in geographic latency and internet jitter then it goes up considerably.

(Full disclosure: Weepy and I played with Jamulus then he had a crack at building sub.live)

Re:Show HN: Low-latency jamming over the internet by capableweb on Saturday October 23, 2021 @10:23AM (#28968806)
> Add another ~ 40 ms that seems to be eaten up by my local computer and wired home network.

Maybe you have a weak computer? Having 40ms being eaten up by your local network would be absolutely bananas, the latency should be closer to 1-3ms if not lower. If I ping 8.8.4.4 it's not until the switch outside the city I live in that the latency comes up to above 10ms, so something sounds wrong/broken in your setup if it's really your local LAN having 40ms latency.

Re:Show HN: Low-latency jamming over the internet by weepy on Saturday October 23, 2021 @10:40AM (#28968959)
If you are on Windows you need to use an ASIO soundcard ?
Re:Show HN: Low-latency jamming over the internet by capableweb on Saturday October 23, 2021 @10:44AM (#28969007)
Ah, it's possible analog31 isn't using ASIO card, I assumed they are as they seem to have tried to jam before so also assumed they were a musician and I haven't met many who doesn't use ASIO in the first place.
Re:Show HN: Low-latency jamming over the internet by analog31 on Saturday October 23, 2021 @10:53AM (#28969083)
Ah, that's interesting. I'm using a USB audio interface. It claims to be ASIO compatible. Oddly enough I tried the same interface in different computers, and have tried other computers, but haven't dug much further than that. I've also tried all of this on a decent Ubuntu box, and I've now got it running on a Raspberry Pi 3 since the overall latency has been more less the same in all cases.

We're all analog musicians playing alcohol powered instruments. ;-) Some of us are techies, others not. While I'm a techie, that side of my life has always been somewhat separate from the musical side, so I haven't paid that much attention to the digital technology until the pandemic came along. But I'm happy to learn, especially if something simple can make it work better.

Re:Show HN: Low-latency jamming over the internet by colossal on Saturday October 23, 2021 @07:30PM (#28973418)
You need to switch the drivers from WDM to ASIO. Most DAWs have this as an explicit choice with WDM as the default.
Re:Show HN: Low-latency jamming over the internet by adzm on Saturday October 23, 2021 @08:36PM (#28973783)
I think WASAPI has comparable latency to ASIO drivers. I can get around 20-30ms latency with WASAPI though ASIO takes me down to 10-15. Granted I'm using a dedicated USB audio interface though.
Re:Show HN: Low-latency jamming over the internet by namibj on Monday October 25, 2021 @01:20PM (#28990488)
You should be able to easily sustain below 5ms buffer size, and RT_PREEMPT Linux has no problems keeping a few hundred microseconds of buffer filled (a suitable PCIe soundcard should easily make 100us buffer level reliable; that's 9.6 samples at 96kHz sample rate).

Yes, sub-ms latency is hard. But the infrastructure exists.

Re:Show HN: Low-latency jamming over the internet by weepy on Saturday October 23, 2021 @10:42AM (#28968983)
I did actually add a way to play a backing track for some drums or similar . It does make it much easier for everyone to stay together .
Re:Show HN: Low-latency jamming over the internet by analog31 on Saturday October 23, 2021 @10:59AM (#28969138)
That would be nice, a click track. I suppose adding a second "user" that generates a click would do the job.
Re:Show HN: Low-latency jamming over the internet by weepy on Saturday October 23, 2021 @11:51AM (#28969603)
You could - but you can also just drag in an audio loop already.
Re:Show HN: Low-latency jamming over the internet by seba_dos1 on Saturday October 23, 2021 @10:39AM (#28968952)
When the server is in the same town, it's not hard for me to get 10-15 ms total latency in Jamulus. 60 ms is a lot - borderline unplayable. I get better latency than that over WiFi.