You are here

Do higher sample rates generally mean lower latency?

All about the tools and techniques involved in capturing sound, in the studio or on location.

Do higher sample rates generally mean lower latency?

Postby mjfe2 » Sun Jun 20, 2010 4:26 pm

Seems counter-intuitive, but whenever I set the buffer size & sample rate for my Mackie 400f I've noticed the higher I put the sample rate, the smaller the latency becomes. Is this a general rule for latency?
User avatar
mjfe2
Frequent Poster
Posts: 612
Joined: Sun Oct 11, 2009 12:00 am
Location: London, UK

Re: Do higher sample rates generally mean lower latency?

Postby Stan » Sun Jun 20, 2010 4:33 pm

64-bit floating point processing on that beast - it could be it is optimised to function at higher sample rates -
i'll wait for the experts
User avatar
Stan
Regular
Posts: 483
Joined: Mon Jan 17, 2005 1:00 am

Re: Do higher sample rates generally mean lower latency?

Postby GaryM » Sun Jun 20, 2010 4:46 pm

Nothing to do with optimisation - it's simple maths. At 44.1 kHz each sample lasts for 1/44100th of a second, so a buffer of 256 samples would hold 256 x 1/44100 = 5.8 ms. If you change the sample rate to 88.2 kHz then the same buffer would hold 256 * 1/88200 = 2.9 ms.
GaryM
Regular
Posts: 339
Joined: Thu Nov 06, 2008 1:00 am
Location: Dundee, UK

Re: Do higher sample rates generally mean lower latency?

Postby mjfe2 » Sun Jun 20, 2010 5:01 pm

Ah yes, thanks!
User avatar
mjfe2
Frequent Poster
Posts: 612
Joined: Sun Oct 11, 2009 12:00 am
Location: London, UK

Re: Do higher sample rates generally mean lower latency?

Postby Hugh Robjohns » Sun Jun 20, 2010 10:08 pm

Yes, and the inherent delay through the A-D and D-A conversion filters is also halved if you double the sample rate.

Hugh
User avatar
Hugh Robjohns
Moderator
Posts: 26278
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

Re: Do higher sample rates generally mean lower latency?

Postby Martin Walker » Mon Jun 21, 2010 12:51 pm

Agreed.

Just be aware that since you’re processing twice as much audio data with 88.2kHz than 44.1kHz sample rate, your hard drive requirements will double, as will the processor overheads of any plug-ins/softsynths you’re running.

No such thing as a free lunch I’m afraid :headbang:


Martin
User avatar
Martin Walker
Moderator
Posts: 15130
Joined: Wed Jan 13, 2010 9:44 am
Location: Cornwall, UK

Re: Do higher sample rates generally mean lower latency?

Postby Mixedup » Thu Jun 24, 2010 3:44 pm

Funnily, this is one of those obvious things I'd never really stopped to think about... I'd never really noticed a huge difference recording at different sample rates (as opposed to bit-depth) in terms of sound quality, but hadn't considered the impact on latency. I suppose it offers a justification for tracking (or playing V-Drums etc) at higher sample rates when in search of lower latency, where previously I'd seen none — even if you later convert down to lower sample rates for a mix.
User avatar
Mixedup
Jedi Poster
Posts: 4403
Joined: Wed Sep 03, 2003 12:00 am
Location: Cambridgeshire, UK

Re: Do higher sample rates generally mean lower latency?

Postby Martin Walker » Fri Jun 25, 2010 12:04 pm

Indeed it is Matt - I know some musicians who insist on working at 96kHz simply to get headphone vocal monitoring latency as low as possible (presumably they have no ‘zero’ latency monitoring features built into their interfaces, or insist on monitoring with plug-in effects).


Martin
User avatar
Martin Walker
Moderator
Posts: 15130
Joined: Wed Jan 13, 2010 9:44 am
Location: Cornwall, UK

Re: Do higher sample rates generally mean lower latency?

Postby Mixedup » Sun Jun 27, 2010 9:50 am

Yes... I've never found zero-latency monitoring on any interface much good unless working with outboard gear - compression, comfort reverbs etc. Even when overdubbing a guitar part onto an existing mix, you end up having to fiddle with the DAW output levels to avoid drowning out the unprocessed DI part you're playing in.

It's also particularly useful to get latency as low as possible when playing BFD etc via V-Drums.
User avatar
Mixedup
Jedi Poster
Posts: 4403
Joined: Wed Sep 03, 2003 12:00 am
Location: Cambridgeshire, UK

Re: Do higher sample rates generally mean lower latency?

Postby dmills » Sun Jun 27, 2010 9:30 pm

If only things were reliably that simple!

AD and DA decimation/interpolation latencies MAY be reduced, but it depends on the filtering.

On the PC side, the key issue is the time between the interrupt and the user space code running. Doubling the sample rate with the SAME size buffers will double the interrupt rate and thus double the overhead while halving the latency, however the same effect could be achieved by simply running with a smaller buffer at the old rate.
If the machine can cope with sample rate 2F at buffer size B then it can probably cope better with sample rate F at buffer size B/2....

CPU cost for convolution effects also rises as sample rate squared given a constant temporal length of impulse, so convolution reverbs and models can become very expensive.

What the best approach is depends strongly on exact hardware and software details and is usually best determined by experiment on a case by case basis.

Regards, Dan.
dmills
Frequent Poster
Posts: 1552
Joined: Fri Aug 25, 2006 12:00 am
Location: High Wycombe, UK

Audiophiles use phono leads because they are unbalanced people!


Re: Do higher sample rates generally mean lower latency?

Postby Exalted Wombat » Sun Jun 27, 2010 9:41 pm

Myles Eastwood wrote:Seems counter-intuitive, but whenever I set the buffer size & sample rate for my Mackie 400f I've noticed the higher I put the sample rate, the smaller the latency becomes. Is this a general rule for latency?

Other things being equal, yes. But, of course,other things never ARE equal :-)
Exalted Wombat
Jedi Poster
Posts: 5724
Joined: Sat Feb 06, 2010 1:00 am
Location: London UK
You don't have to write songs. The world doesn't want you to write songs. It would probably prefer it if you didn't. So write songs if you want to. Otherwise, dont bore us with beefing about it. Go fishing instead.

Re: Do higher sample rates generally mean lower latency?

Postby TEMPUSFUGITSTUDIO » Sun Jul 11, 2010 4:32 pm

Hope I'm not getting off track to far; if the CPU can handle it, what are the best settings for the overall sound? Higher sample rates sound better I assume? What do most people sit at for the best sound overall? Buffer sizes probably don't actually affect the sound at all. Am I right?
TEMPUSFUGITSTUDIO
New here
Posts: 9
Joined: Wed Jun 30, 2010 12:00 am

Re: Do higher sample rates generally mean lower latency?

Postby Exalted Wombat » Sun Jul 11, 2010 4:56 pm

TEMPUSFUGITSTUDIO wrote:Hope I'm not getting off track to far; if the CPU can handle it, what are the best settings for the overall sound? Higher sample rates sound better I assume? What do most people sit at for the best sound overall? Buffer sizes probably don't actually affect the sound at all. Am I right?


Higher sample rates up to 2X the highest frequency your equipment can produce, record and reproduce sound better. That basically means - don't go lower than 44.1KHz. Beyond that.. well, let's just say it's questionable :-) If someone swears his 96KHz recording sounds better than a CD (which is 44.1 KHz) make sure he can HEAR the difference, every time, and with his eyes closed. I think it's generally accepted that anything even higher than that is just plain silly, or is only justified in very special cases.

You have a LOT of other things to worry about in getting audio quality before even thinking of whether a rate over 44.1KHz might sound better.

Buffer size only affects the sound if it's wrong enough to cause glitches.
Exalted Wombat
Jedi Poster
Posts: 5724
Joined: Sat Feb 06, 2010 1:00 am
Location: London UK
You don't have to write songs. The world doesn't want you to write songs. It would probably prefer it if you didn't. So write songs if you want to. Otherwise, dont bore us with beefing about it. Go fishing instead.

Re: Do higher sample rates generally mean lower latency?

Postby Martin Walker » Mon Jul 12, 2010 4:10 pm

Quite right - buffer size don't change the sound at all.

However, there are definitely situations where increasing from 44.1/48kHz to 96kHz can provide audible improvements - depending on what audio interface you’re running, what plug-ins you’re running...

However, as EW mentions, this is what I like to call a ‘suck it and see scenario’ i.e. try it, and if you can hear the improvments and are happy with doubling the CPU overheads then go for it. If you can’t hear the difference stick with 44.1kHz :beamup:


Martin
User avatar
Martin Walker
Moderator
Posts: 15130
Joined: Wed Jan 13, 2010 9:44 am
Location: Cornwall, UK