On Thu, Aug 2, 2012 at 3:33 PM, Paulo Sérgio Almeida
<
pssal...@gmail.com> wrote:
> In fact, I am still confused about these things, and I don't know how many
> kinds of "blocks" there are, because when SC boots I see
>
> SC_AudioDriver: sample rate = 44100.000000, driver's block size = 512
>
> but the "block" that I mean, corresponding to control rate is 64 samples ...
I think there are 3 different block sizes. The audio and control rate
block sizes which are used to communicate between ugens and over
busses, and the audio driver block size. I think the audio card fires
an interrupt when it needs data to fill the DSP buffer, which calls up
to the driver, which calls up to the registered application(s)
requesting audio data. This is the driver's block size, how big of an
array it hands you to fill on each interrupt. By using larger blocks
you get more time to process in between generating blocks (without
causing an underflow), but longer latency from the time you trigger a
synth to the time you first hear it.
The worst case latency will be 1 / (sample-rate / block-size):
512 ~ 12ms
256 ~ 6ms
128 ~ 3ms
From what I've read right around 10-12ms is the point where people
with acute hearing can start perceiving the delay. In Overtone since
we are also reading in the midi values, processing a bit, and then
triggering the synth, my guess is we are probably up around 20ms
currently. With the new internal server we can manipulate all of
these configuration values pretty easily though, so it's worth
experimenting with.
-Jeff