Forum rss-feed

Forum

Software: EigenD latency or sample buffer size setting

Most Recent

written by: Tenebrous

John, just want to add my appreciation and gratitude for the detailed response here. As Geert said, it's rare you get this these days.

written by: geert

Thu, 29 Apr 2010 14:32:10 +0100 BST

Hi,

This was discussed back in December when the Eigenharp just came out but it hasn't been followed up on since. Is it possible to configure the sample buffer size or latency in EigenD to make our own trade-off between CPU usage and latency? What is the sample buffer size set at now? I personally don't feel 128 samples of latency when playing live, so I would like to make sure to set it at that to allow my computer to have some headroom for processing, especially since I'm running other software besides EigenD on it also.

Thanks,

Geert


written by: john

Thu, 29 Apr 2010 16:28:13 +0100 BST

Hi Geert

The current buffer size is fixed at 512 samples. This equates to about 5mS at 96k sample rate (which I always use as it makes most things sound better, particularly software instruments and effects, and I don't find that 192k makes any further difference). This is the equivalent of around 1.5 metres of distance at the speed of sound, and I find this is completely unnoticeable when playing the instrument. You will find it a noticeable latency when singing through a computer audio system as the path length to your ears from your throat is near zero, so the latency pops up as a short slapback echo between your monitoring (and it feels worse if you use in-ear monitors), which takes some getting used to.

We do have a ticket in to allow users to set the buffer size, but it's not one of the pressing ones at the moment, and I have my doubts if EigenD would run that well at 128 samples of buffer - I also don't think that you'd be able to notice the difference when playing - I have trouble telling the difference between 5mS and 10mS of latency when playing, when you get to 15 or 20mS then I find it becomes more noticeable.

I do think it would be a good idea to make this settable though - I'll post here when we get to that ticket...

John


written by: geert

Thu, 29 Apr 2010 16:36:42 +0100 BST

Thanks John, I didn't realize it was already 512 ... quite interesting. With my guitar amp simulators I don't stand more than 128, but I always found the standard EigenD setting very responsive. I suppose that this is because I can feel that the guitar string vibrate against my body and that more than 128 samples becomes noticeable.

Take care,

Geert


written by: barnone

Thu, 29 Apr 2010 17:13:14 +0100 BST

But that's not the total latency in the system right?

If I'm using an Audio Unit instrument and an Audio Unit effect as well, then those will introduce more latency correct? Some of the modelled soft synths especially have lots of latency.

Most high end DAWs use delay compensation to make sure that say a drum loop that is playing dry is perfectly in time with audio being sent through an effects chain by shifting everything to the longest total offset.

5ms doesn't seem like a lot until it gets added together with all the other latency in the system.


written by: geert

Thu, 29 Apr 2010 17:14:16 +0100 BST

I think John's referring to total system latency ... at least I hope.


written by: john

Thu, 29 Apr 2010 20:29:10 +0100 BST

Latency is a bit of a weird thing, quite complicated. In audio processing land, all the plugins get the same buffer to process, in the same clock tick, so it's possible for the maximum latency to be the buffer length. For the playback of, say, a sample, this is the norm. But certain plugins introduce an actual latency (say a 'look ahead' compressor that needs to see a few milliseconds into the future) and this is what 'plugin delay compensation' helps with. Some EQ's can also introduce a latency, due to the signal processing architecture. The latency is not about the amount of processing they have to do - after all this processing has to get done sometime, why not in the current clock tick? It's a product of other things.

In a live situation you cannot do plugin delay compensation, it's a daft idea. Unless you have a time machine (which is possible with pre-recorded playback of course). So we process all information in the same clock tick. For a sound that starts up immediately this leaves you with a latency of somewhere between 6 and 7 milliseconds from keypress to the first sound coming out of the speaker (there's 1-2 milliseconds of time used in getting from the instrument to the PC). This, if you are familiar with instrument design, is very good. It took us a lot of effort to get the USB communication to be low enough latency to make this possible (USB always introduces at least 1ms of latency, its just the way it works). The difficulties of USB latency are also the only reason there isn't a Linux EigenD right now - Linux USB isn't that good and we have to write a kernel driver to make it low enough latency - something we haven't got to yet.

Of course, in the real world all this theory gets much more complicated. Take the example of a physics model, say our Clarinet. That's a whole physical system being modeled, with a large start up time entirely caused by the physics - a modeled tube requires a finite time for the injected 'energy' to begin to cause oscillation. This, and the quite low speed of sound, cause us all to be quite well evolved to deal with straightforward latency - we just learn to play a little in front of the beat (and if you think this is not real, remember that a drummer five metres away is also fifteen milliseconds away for sound). What we don't deal with terribly well is jitter (variations in latency) and weird cues that break our built in latency tolerance. The jitter intolerance is what causes old fashioned MIDI hardware to feel so latent from time to time (it could be woefully jittery as well as latent), and weird cues are what makes latency so intolerable for singers and, as I now know, guitarists playing through Au/VST processing.

Sorry, slight obsessive rant - I spent several years worrying about latency a lot while we designed the Eigenharps!

John


written by: barnone

Fri, 30 Apr 2010 03:07:21 +0100 BST

John,

No, it's really interesting. Thanks for the insight. I find the Alpha's latency to be really low and I know that wasn't easy to do. Also, there is a ton of other information flowing that needs low latency such as the key pressure and positioning. It's extremely impressive on the internal sample engine how much you can effect the sound envelopes with this input. With a really good AU it works wonders as well.

I think you said once how you don't need the complex but static samples because boring sounds come to life with the control over the sound envelopes and I think that is true.

Harder to communicate this to the public as everyone is quick to stereotype as just another midi controller.

I want to say though that you guys are getting better and better at the demos. Choosing sounds that may be extreme examples, but the control is coming through now in the videos which it didn't as much at first.


written by: fzzzy

Fri, 30 Apr 2010 03:19:58 +0100 BST

John,

Very interesting post. It blows my mind to think about the 5 meters is 15 ms thing, but now it seems totally obvious. Thanks.

It's crazy... even the light hitting our eyeballs is a representation of the past...


written by: geert

Fri, 30 Apr 2010 06:34:32 +0100 BST

Thanks John, I personally like the details you provide since I often learn something new. It's rare that this happens in a company forum ... so feel free to continue these kind of rants, it also saw the passion and great care that has gone and is going into the Eigenharps!


written by: stuwyatt

Fri, 30 Apr 2010 13:45:20 +0100 BST

I remember learning about audio/distance latency the hard way at a festival gig a few years ago. During a complex solo, I dived off stage to show off my newly-purchased radio pickup and started running around like a madman through the audience. I went too far from the main-stage, and it was impossible to play in time with the band.

A big thanks from me too John for your insightful posts. Muchly appreciated :)


written by: Tenebrous

Fri, 30 Apr 2010 14:02:30 +0100 BST

John, just want to add my appreciation and gratitude for the detailed response here. As Geert said, it's rare you get this these days.



Please log in to join the discussions