Latency - what's new?

Status
Not open for further replies.

Mortjo

Member
Hi all

I searched this forum to find the lowest obtainable end-to-end latency using Teensy 4.0, the audio adapter board and the audio library. I found some posts a few years old, but no very new. Obviously both buffer size and sample rate are important. With Teensy and the most recent audio library, what is achievable? How many buffers will always be in processing when using the library? 2? More?

Am I right in assuming that: minimal latency = 2 * blocksize / samplerate? And that 16 sample buffers at 44.1 kHz is no problem on Teensy 4.0 when only doing 'light' processing (simple iir filters and some nonlinear distortion).

Best,

Morten Joehnk
 
Oh and by the way: I know that latencies below 5-10 ms are imperceptible. My issue is that comb filtering effects when mixing the delayed signal and the unprocessed signal are noticeable even at very low latencies.

A bonus question, that I forgot in the first post: Can the stereo channel of the SGTL5000 be split in two totally independent channels or are they somehow tied to each other? I would like to do something like: Audio in -> A/D -> digital processing part 1 -> D/A -> analog processing -> A/D -> digital processing part 2 -> D/A -> Audio out.

/MJ
 
Latency should be exactly the same as with Teensy 3.x. Same code, same codec hardware = same latency.

Reducing the block size is the way to get low latency. Some latency exists within the codec. As I recall, it's under 1ms, but there's nothing you can do about it. Best guess is it's mostly due to the digital filters needed after sigma-delta... but they give almost no info about how the chip works internally, so that's just guesswork.

Yes, the stereo input and output can be used as 2 mono channels.
 
Hi @Mortjo,

A bit of practical feedback from a live audio effect project that I've been working on. I had same issue with mixing dry and wet signals giving a noticable clangy chorus effect on output.

I measured 12.2.ms latency to start with which is very noticeable, the project has about 20 objects (effects, filters, mixers etc).

Re-ordering the order objects are created in took that down to 9.1ms.

Reducing AUDIO_BLOCK_SAMPLES to 32 took it to 2.7ms and then to 16 took it to 1.7ms.

All the objects that I used worked fine at 16 samples per block and 1.7ms latent sounds fine to my ears.

This was on a teensy 3.2 which was also doing a fair bit of work on inputs/outputs ( button pads, leds, knobs etc).

Only thing to watch is when you update you need to remember to change the block size in the library again if it's overwritten, Cheers, Paul
 
Hi

Thanks to both of you for fast replies. I'll order a Teensy 4.0 and a rev D audio adapter when the latter becomes available here in Europe and try my luck.

Is there any documentation on how the number and ordering of objects changes the number of buffers in flight and thus latency?

Cheers,

Morten
 
Status
Not open for further replies.
Back
Top