Hacker News new | ask | show | jobs
by alexlarsson 2234 days ago
I assume by real-time he meant "able to produce samples at a rate equal to or higher than the audio output sample rate".
2 comments

That's not what real time, means though. Real time processing means taking signals as they come in, and outputting the transformed result such that there is as close to no signal lag as possible. The output can in fact be wildly lower or higher resolution, real-time does not particularly say anything about that. It's all about whether the output plays (for practical purposes) at the perceived "same time" as the input signal. There will always be some delay, but that delay can't get perceivable, and for obvious reasons there can't be any (significant) buffering.
Is that your private definition of "real-time"? I think it is common to define real-time processing by a specified, finite time between input and output. Many real-time processes are concerned more with the consistency of the latency than with its absolute value.
For guitar pedals, there is an implied sub-perceptibility. The output needs to happen as I play - if the delay is too long, it's now a delay pedal.

So realtime might match your definition, but it is consistent in audio production.

For humans, you can start to notice the lag @ 50ms. (A selection of experimental results summarized here https://gamedev.stackexchange.com/a/74975)

Latency is much more noticeable when you’re playing a musical instrument; 25-30ms is the point at which it becomes distracting in my (anecdotal) experience as a keyboardist. 50ms would be literally unplayable —- I cannot keep in time if latency is that severe. And that’s total output latency from the moment a key is depressed to the moment the sound comes out the speakers, so it’s important for every component in the signal chain to have the lowest possible latency. A bunch of 5-10ms delays adds up really quickly.
>50ms would be literally unplayable

You can learn to play it. Pipe organs routinely have more than 50ms latency just from the distance the sound has to travel from the pipes to the organist. Add the time needed to set up steady oscillations in large pipes, and the slow pneumatic actions found in some organs, and >200ms latency is nothing unusual. The important thing is that the latency is consistent.

1ms is usually considered inaudible. 5ms is bearable. 10ms will start to annoy some people. 25ms is actually pretty bad.
Throw on some headphones, and mix your clean signal with the rest of the ensemble on a 50ms delay.

(jk)

I think "rate" in the parent comment was just referring to speed, not sample rate. But yes, latency is critical for anything used during recording or performance. However way back when I used to make my own music I used non-realtime plugins sometimes and it was okay.
RT does not necessarily mean a small latency but a guarantee on a maximum one, whatever that is.
Latency is equally important.