Latency Tip

Why not tell us a little bit about yourself? Welcome to the community!

Moderators: MattKingUSA, khz

Gps
Established Member
Posts: 1136
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 332 times
Been thanked: 112 times

Re: Latency Tip

Post by Gps »

I have been wondering why I see many negative reactions about Behringer.

I know somebody who was a radio pirate, and he loves Behringer. (studio monitors)

Behringer just made it to my possible DAC options.

I already know though I need to go to the music store and listen.
Right now don't have the money though.
User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: Latency Tip

Post by bluzee »

Well, Behringer has made a lot of crap. Their original analogue mixers had pretty noisy pre amps and power supply issues along with switches that became noisy very quickly. I am not impressed with their amp sims or stomp boxes. I wouldn't recommend their power amps either. I probably still also would not particularly recommend a Xenyx mixer.

Since then they have bought out Midas. Their USB interfaces and digital mixers are built on this tech. The bang for buck with these devices can't be beat. Sure they are not the best pre amps but they hold their own with devices that cost double.

They also bought out Aston. I have not tried an Aston Microphone but I read some very good reviews. Their old Behringer line of condenser mics I also would probably pass on.

Regarding the RT kernel discussion I would just mention that you are not limited to installing just one type of kernel. Changing to a kernel specialized for a particular function is just a reboot away. I have a generic kernel for day to day use. When I want to do some audio work I just reboot to an RT kernel. I also have a kernel that has been specifically patched to turn my DVB device into a spectrum analyzer. I boot into that when I need to point a satellite dish.

Not all high end companies are anti Linux. Some involved in broadcast equipment have been quite pro Linux. Digigram, Merging....
WforWoollyMammoth
Established Member
Posts: 118
Joined: Thu Oct 24, 2019 4:32 pm
Has thanked: 3 times
Been thanked: 16 times

Re: Latency Tip

Post by WforWoollyMammoth »

asbak wrote: Wed Jan 26, 2022 10:45 pm
bluzee wrote: Wed Jan 26, 2022 8:08 pm I'd be pretty unhappy if the RME did not provide lower latency.
I have a RME HDSP 9652, the last time I had it running in Linux it was nothing special in the low-latency department and sending data to its own MIDI interfaces to play softsynths always caused massive xruns. I have no idea why. It worked OK as long as a separate MIDI interface was used. Maybe I just had my setup misconfigured, or maybe other 9652 owners can relate their experiences.
My RME HSPEe AIO has problems with MIDI too. I wouldn't describe the amount of xruns "massive", but it does produce them regularly (at least one per 1.5-2 min even under under marginal load - and I get a loud snap each time!). Others have reported them too.

My RME Babyface Pro doesn't seem to have problems with MIDI, although that's one of the very few things I consider positive about that unit when used in class compliant mode with Linux. Yeah, the converters might be fast and the preamps are good for built-in prempas, but the way the monitoring is done in class compliant mode is just horrible. :)
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: Latency Tip

Post by asbak »

Thanks Woolly, that's interesting to hear.
I can only surmise it must be some weird driver bug. Just to be clear about what I was doing:

- Started Jack, loaded softsynths, attempted to play them via a MIDI controller connected to the HDSP 9652 and the end result was that the HDSP 9652 would not stop xrunning and exhibit glitchy behaviour.
- This problem appeared to go away (it was years ago, so my recollections are vague) when I used a third party MIDI interface instead.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Latency Tip

Post by merlyn »

WforWoollyMammoth wrote: Wed Jan 26, 2022 5:49 pm Kernel 5.11.018-lowlatency

RME Babyface Pro

128 / 2 sync = 13.040 ms - QjackCtl reports 5.33 ms
128 / 2 async = 15.707 ms - QjackCtl reports 5.33 ms
128 / 3 sync = 19.207 ms - QjackCtl reports 8 ms
128 / 3 async = 21.873 ms - QjackCtl reports 8 ms
256 / 2 sync = 21.123 ms - QjackCtl reports 10.7 ms
256 / 2 async = 26.457 ms - QjackCtl reports 10.7 ms
256 / 3 sync = 27.207 ms - QjackCtl reports 16 ms
256 / 3 async = 32.540 ms - QjackCtl reports 16 ms

Yamaha MG10XU

128 / 2 sync = 16.530 ms - QjackCtl reports 5.33 ms
128 / 2 async = 19.239 ms - QjackCtl reports 5.33 ms
128 / 3 sync = 21.301 ms - QjackCtl reports 8 ms
128 / 3 async = 24.947 ms - QjackCtl reports 8 ms
256 / 2 sync = 28.114 ms - QjackCtl reports 10.7 ms
256 / 2 async = 33.468 ms - QjackCtl reports 10.7 ms
256 / 3 sync = 36.614 ms - QjackCtl reports 16 ms
256 / 3 async = 41.905 ms - QjackCtl reports 16 ms
That looks like you did it right. Those results show the extra buffer ALSA puts in with USB audio. According to this post the extra buffer has been removed in kernel 5.15.7.

QjackCtl is reporting the calculated playback latency, which is simply ((number of periods * number of samples per period)/sample rate).

For 128/2 sync this gives 256/48000 = 5.333... ms. QjackCtl does give a different result when the number of periods is changed. 128/3 sync is given as 8ms which is 384/48000.

Taking the first result of 13ms. The latency of one period is 128/48000 = ~2.7ms. There are at least 3 periods when measuring round trip latency. 1 input period and 2 output periods. This gives a minimum of 8ms at 48k. If ALSA added another 2 periods that would give a total of 5 periods, giving a latency of 640/48000, which is 13.3ms.

That would suggest to me that ALSA adds another 1 period, making a total of 4 periods and a latency of 512/48000 = 10.6ms plus ~3ms for USB overhead, internal buffering and propagation delay through the convertors. Propagation delay is small and less than 1ms.

The question is then where does the extra 3ms come from on the MG10XU? 3ms is ~128 samples, so one possibility is that the MG10XU has internal input and output buffers of 64 samples. You could work this out by changing the sample rate, and seeing how the difference scales. Latency due to a buffer will change with sample rate, fixed latency like propagation delay won't change with sample rate.

In this case more expensive does mean lower latency. However we aren't comparing like with like. As it's a mixer the MG10XU may intentionally have a different design.

I had a loan of a Behringer UMC404 and tested the latency at 48k with 64/2 sync (I think, it was a while ago)

Code: Select all

 373.710 frames      7.786 ms total roundtrip latency
	extra loopback latency: 119 frames
	use 59 for the backend arguments -I and -O

It's in the ballpark of the Babyface, as the minimum the Babyface could do is 6.5ms at 64 samples (halving the latency for 128), and I think it would be higher than that as there is latency due to USB overhead, internal buffers and propagation delay.
christobal
Established Member
Posts: 108
Joined: Sun Sep 01, 2019 12:58 pm
Has thanked: 21 times
Been thanked: 11 times

Re: Latency Tip

Post by christobal »

Just thought I'd chime in with my latency results, or the best I could get where it was stable for use.

Focusrite Scarlet 2i4:

48k/64 - 4 periods: 389.430 frames 8.113 ms -- qjack reports 5.33ms
48k/32 - 4 periods: 290.828 frames 6.059 ms -- qjack reports 2.67ms


I found 4 periods to give me the best results with this card. I'm on Manjaro "stock" kernel with all the config options to make realtimeconfigscan pass on all points.
OS: Manjaro
Amp: Echolette M40 / NG51S Tape Echo
Strings: Martin D15M, Yamaha FG-180, Alhambra 5P, Yamaha Revstar
latency-fun
Established Member
Posts: 13
Joined: Mon Oct 25, 2021 5:07 am

Re: Latency Tip

Post by latency-fun »

What is this? 6 Months later .. and all you wankers do is talk about usb interfaces????

STILL WORKING. For the same gig I was doing... not a blip .. well there was one or two.. a few video calls dropped after a update... and my screen locker bombed once and shutdown. Really small shit. My guess 700 hours of work. Xruns when you turn wifi on/off. So start the cadence/jack server after wifi turned on.

Arch-Zen Kernel... for AMD.... with cheapo edirol on the in ... and mobo audio on the out.

That's all the post was about.

And.. it's still 4ms round trip.


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

FYI
Qjack wasn't working on a bunch of stuff before .. I wouldnt trust Qjack for latency with all the buggy stuff I ran into. Several distro's blew for audio... Headaches for weeks.

Arch Linux worked better. (for audio, for me). Not as fast as the other distro's on benchmarks.. but stable. Clear linux - if it wasn't made by intel and didn't bug out on basic shit (ever tried the built in repair?) ..plus they bundle/package software together rather allowing users to unintsall spooky working software -- wonder why... with such awesome comrades as HP.... I would love to try them for audio.. if it wasn't for all that. Maybe after they get all the pipewire shit worked out... UBUNTU is spooky... like someone works on the back end of the distro's after people install them.. without consent (do I know that for sure? no - but spooky problems with their distros several times -- several distro's went bad) Fedoro's distro's are sometimes really good though -- but audio problems were real. Latency stuff wasn't so breezy. I strip the fedora's as much as possible.. everything imporoves. Remove everything almost from the init... systemctl.. Debians... same SPOOKY shit. I don't know what else to say... Arch seems to be keepin is simple and safe.


The Arch RT kernel has it's own maintainer- not officially supported.. worked once/twice... bombed after an update.The Zen kernel is a preempt kernel too. No problems with it. (I know.. it's ubu tweaks in it)


AND yes.. I'll do the loopback test .. this year...

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Also FYI .. if your new to digi audio - or the whole latency thing - read (usually) the last pages of ---- https://gearspace.com/board/music-compu ... -base.html

Look for the most recent recent results for about ? 30-40 cards/interfaces -- We need good round trip L in linux too. And "easy" - verifiable testing tools. That would help alot of people.

Who gives good L ?
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Latency Tip

Post by merlyn »

To me this reads like an episode of Rick and Morty. (Charming opening gambit by the way.) Which alternate dimension are you posting from?

Using one interface for the input and a different one for the output generally doesn't work well. I don't know exactly why this is working for you. It could be pure random chance that the two interfaces have clocks that run at very nearly the same rate. When I have tried this I got too many xruns for the setup to be usable. You could have found the exception that proves the rule.

It is possible to use a different interface for input and output if they're synced with SPDIF or wordclock.

Gearspace is a Windows shop. As explained above the situation is totally different on Windows because every manufacturer writes their own drivers. (Not entirely true. Sometimes they use the drivers that come with the USB audio controller chip. So a lot of budget interfaces use exactly the same drivers.)

Linux audio drivers are part of the kernel, so they must have had at least a cursory glance from Linus, who would not let absolute garbage into the kernel. I use a PCI card so this is mostly academic for me. Where the action is at the moment is the removal of the dreaded 'ALSA extra buffer' which I don't have the hardware to test, but I think may be in kernel 5.15.7+.
latency-fun
Established Member
Posts: 13
Joined: Mon Oct 25, 2021 5:07 am

Re: Latency Tip

Post by latency-fun »

What dimension?


The one where I have to rely on my computer for my audio job(s).

Mac/Osx did-does "aggregate audio devices" too. You can use Cadence to do aggregate devices on linux.

And no... they don't need to be synced with a wordclock.
That doesn't mean that an external clock does not help - lot's of people use them.

Try Arch .. it's working fine.

As a matter of fact, lot's of osx owners did the same from time to time -- audio device-and motherboard audio at the same time --
-- going back ... 17 years!?

Or two or three usb/firewire audio devices.. Because the usb/firewire devices could sometimes get bogged down.

Osx- They started the aggregate audio devices option in 10.3 or 10.4 I think.. (2005?) research it.

I think I used it for a thousands of hours of play time... my guess. It works fine.. even on a core duo.

And those numbers I posted are important.. Gearspace is win/osx & a few linux users. But how fast the ad/da
works.. and how good it sounds ... how fast it is on the in -- and how fast it is the out... which drivers...on a given device--
is extremely important for music production/synthesis. Not all hardware works the same. The chips are different.
The speeds are different. The bandwidth is different. HUGE difference.

So a camparison of audio cards (just like there used to be a few linux audio hardware sites that did this) is not a bad thing.


Neither is trying aggregate audio devices.

Again .. what is this whole "resistence thing" to something a bunch of people use everyday & is available on linux software too?

Look up aggregate audio devices.

What dimension are the nay-sayers in ?

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&


*more people should try plain arch for music. That's the only other thing I can recommend. I used almost all the major & many minor branches for testing. On a few different machines. -- something like 30+ Distro's...

Anything "ify" I moved to a different distro. So far with plain arch, no "ify" trouble. Manjaro - had two that lost a boot partition.. barely repaired.. and the AUR got spooky stuff sometimes too - but manjaro makes it stupid easy to load stuff from the aur. Encryption software used on manjaro -- wouldn't decrypt on same software other systems -- stuff like that..

CentOS worrked great -- they install some analytics though -- without telling people -- you have to be careful with updates.. tries to reinstall it --- slowwwws the computer down --- but was solid on some stuff.

Fedora - Well .. Redhat (main developer of the kernel) was bought by IBM. Who owns IBM ??? Major shareholders are the same as Microsoft/Apple.. Same people who own the controlling shares of the biggest private prisons and major big box stores-- etc. Could they have conflicts of interest -- ??? Could they be paying deverlopers to undermine solutions ? Like audio ? A lot of money in the audio market.. and tons of strange latency problems on several fedora's .... Big comapnies paying indivuduals to undermine open source is documented. So, your guess is as good as mine.


So... for all you musicians out their looking for some audio to work right. Arch was the one I kept for it. And then try the different officially supported kernels. Been a breeze since I switched.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Latency Tip

Post by merlyn »

latency-fun wrote: Mon Mar 21, 2022 5:30 am Mac/Osx did-does "aggregate audio devices" too. You can use Cadence to do aggregate devices on linux.
Not exactly. On a Mac an aggregate device is produced by software that lines all the buffers up and can do resampling to bring the clocks into sync. The latency becomes the latency of the slowest device with the buffers of the faster devices padded out. Cadence does not do this. The equivalent of an aggregate device on Linux is using alsa_in, zita-a2j or audioadapter all three of which use resampling to sync the streams.
And those numbers I posted are important..
You're talking about this :

Image

Important for Windows users. Half of those interfaces aren't going to work on Linux. What would be important is the same chart for interfaces that work on Linux. You can forget e.g. the Presonus Quantum as it's Thunderbolt.
The bandwidth is different.
USB 2.0 has more than enough bandwidth for most folks.
So a camparison of audio cards (just like there used to be a few linux audio hardware sites that did this) is not a bad thing.
Agreed.
Kott
Established Member
Posts: 818
Joined: Thu Mar 21, 2013 12:55 am
Location: Vladivostok
Has thanked: 65 times
Been thanked: 122 times

Re: Latency Tip

Post by Kott »

@merlyn , what that DAWbench latency chart measure?
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Latency Tip

Post by merlyn »

Kott wrote: Mon Mar 21, 2022 1:04 pm @merlyn , what that DAWbench latency chart measure?
It's a calculated figure from stress tests and how low the round trip latency will go. It's explained here :

http://www.original.dawbench.com/audio- ... tency2.htm

DAWbench was intended as a Windows audio version of something like Phoronix -- an audio stress test to rate hardware. In the beginning to rate CPUs, and how many plugins could be run, later used along with the RTL utility to produce these ratings of interfaces.

There are two factors -- how low the latency will go and when the interface falls over i.e. starts xrunning.
User avatar
tapenade
Established Member
Posts: 37
Joined: Sun Apr 17, 2022 6:08 pm
Has thanked: 29 times
Been thanked: 4 times

Re: Latency Tip

Post by tapenade »

Interest first page of this topic.
Although different topic, it reminds me of how in Cockos Reaper, audio settings, if you set the number of hardware inputs to 0 (if you don't need them), and keep the outputs at 2 or whatever, there's some performance gain.

This is an old reference, it might not work anymore, but it's here in case anybody needs it:
Image
$ totally bogus bullsh*t > /dev/null
latency-fun
Established Member
Posts: 13
Joined: Mon Oct 25, 2021 5:07 am

Re: Latency Tip

Post by latency-fun »

Holy moly! Stop right there Merlyn -- are you bad at magic? What comes next ?? Did you 777 me for my use of the word aggregate audio device??


I think my 'beef'...... with some of the responses on here ......... last time I was on here anyway - is this; it seems like you guys are part of the old/new far right "negate all helpful people" corporate business model...


Are you ???? It's a valid point at this point -- it's like an army of fake responders all over the web.

Are the responders being told/asked/paid --- to 'negate' helpful solutions??? Are you another crowley-ite programmer ... Out to help corporate America by "doing your own will" while pretending to be left while secretly espousing far right ideology ??? Like half of of tech.



To get to the point.

Read my last message - or the first -- it's really simple. And it's still working. And a REEEEAAAAALY average soultion.

And merlyns response ???


Negater paraphrased;
""""""" It's not the same" Bla bla bla those numbers don't count - there is no climate change! The earth is flat and corporate America got things right!

What point is there with all these actual musicians using Dawbench for general latencies???? What if hardware is not equal!!! Those drivers are different too!!!

And the word "aggregate" shouldn't be used here -- even if it works the same.. and does the same thing.""""""""""





No system/os works the same under the hood. OK we/I get it!

So --- If I "aggregate" the audio through Cadence with two devices.. and it works the same ... and I call it aggregating -- whats the difference ???

Seems like a valid point.





How many people are getting paid to negate ??? Professional negaters.

Do you guys work for IBM ? Or Microsoft ? Or Apple ?? Or Blackrock/Vanguard ???? Which audio gear company?? Maybe All of the above ????

Anyway, my solution still works 100% and 100% of the time... the only thing that's changed, less xruns - mostly none.. Read all my messages if you want to try it -- alot of little details made it work better.

It was fun. And non-latent.
User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: Latency Tip

Post by sunrat »

@latency-fun WTF? :?
Post Reply