Advice for low latency audio

Status
Not open for further replies.

tobzoska

Member
Hi!

This is my first post here, although I've spent many hour browsing this forum over the years and learned lots of things here!

Anyway, here is my issue:
I’m contemplating a project that requires one or two simple delay lines with decent audio quality. My problem is that I need a minimum delay time of ~0.5ms or shorter, including the latency of the system itself. Also, the delay time needs to be continuously variable with high resolution, so I’ll probably have to sample the input as fast as possible. From what I’ve gathered, this rules out the audio library and it’s block based processing scheme, as well as the audio board, because of the delay in the ADCs/DACs filters.

Since all the filtering and mixing will be done with analogue circuitry, there’s not a lot left to do for the processor. Get a value from the ADC, feed it into a ring buffer, lookup the correct position for the read pointer, interpolate between two adjacent samples and pass the result to a DAC, that’s about it.

Here’s my questions:
Do you think that per-sample processing at, let’s say 196kHz is a realistic goal for a otherwise simple task like this? If so, what kind of converters should I be looking at?

Apart from dabbling around with the teensy+audio board or the Axoloti, I don’t have any experience with embedded DSP, especially when it comes to the hardware setup, so I’d be happy for every suggestion!

Thanks in advance,

Robin
 
You could try editing AudioStream to set the block size to something small, like 16 samples. There's also some delay in the ADC and DAC, assuming you use the audio shield or similar hardware.

Most of the audio library will adapt to smaller block size. The delay effect will. Some stuff, like SD card playing and FFT also work in blocks and depend on fixed ratio between block sizes, so those tend to fail if you edit AudioStream.h.

so I’d be happy for every suggestion!

How about the suggestion to consider whether such a short delay is meaningful? The speed of sound is approx 1 foot per millisecond, so a 0.5 ms delay corresponds to moving your ear only several inches relative to the speaker.
 
Hi Paul, thanks for the quick reply!

How about the suggestion to consider whether such a short delay is meaningful? The speed of sound is approx 1 foot per millisecond, so a 0.5 ms delay corresponds to moving your ear only several inches relative to the speaker.

You are right of course, I should have explained my need for such short delays in my first post. The goal is to implement Karplus Strong and other physical modelling techniques within a (mostly) analog modular synthesizer. So, 0.5ms equals a pitch of 2kHz in my case. Fully digital implementations are great and I use them a lot, but I still think it would be worthwhile to experiment with these things in a analog and freely patchable system. Right now I'm using a BBD-based device to do this, but I'd love to have a more "hifi" option available.

Yes, I'm aware of the inherent latency of audio codec ICs. Since there will be an analog filter involved in my circuit anyway, I thought about using regular converters instead. I'm looking into alternatives that will offer a good compromise between speed and accuracy (low noise) right now, but the vast amount of different converters out there makes this difficult. So before I go out and buy several expensive ADCs/DACs, I thought it would be a good idea to ask around for a bit of advice on this first.

Also, since there is not a lot of processing to do in my case, I was unsure if there's any benefit in using a block based approach at all. I though I might get away with doing everything per sample instead? However, a blocksize of 16 samples at 88kHz would leave me with a latency of ~0.18ms on the processor side, so that's not too bad either.

Robin
 
Status
Not open for further replies.
Back
Top