[music-dsp] Why 128 samples ?
Jon Watte
hplus at mindcontrol.org
Mon Apr 16 16:30:39 EDT 2001
128 frames is about 2.6 milliseconds at 48 kHz, which is
small enough that a softsynth using that block size is
not perceived as "sluggish". It's also small enough that
an in->out path will only take 5.2 milliseconds (plus the
time your converters take, of course) which is also low
enough to be useful.
Further, if you look at typical pro-grade converters today,
they typically run at 1-1.5 milliseconds latency each way,
so at 128 frames, your block size is on the order of the
same delay. Burning cycles processing smaller blocks will
quickly reach the point of diminishing returns when your
buffer size is smaller than the converter latency. I guess
128 frames is a "sweet spot" (although we had both 64 and
32 frame buffer going in BeOS at one time).
You should absolutely be talking about frames, because
that's the only measurement that makes sense. If you talk
about "bytes" and then work on 20-bit samples, how many
bytes per unit? 2.5 (single sample)? 3 (rounded single sample)?
5 (two packed samples)? 6 (two rounded single samples)?
8 (the processing-efficient storage mode)?
And when you go to 96 kHz, the time taken by one buffer will
be half that at 48 kHz, too.
Cheers,
/ h+
> -----Original Message-----
> From: owner-music-dsp at shoko.calarts.edu
> [mailto:owner-music-dsp at shoko.calarts.edu]On Behalf Of Andre Majorel
> Sent: Monday, April 16, 2001 4:48 AM
> To: music-dsp at shoko.calarts.edu
> Subject: [music-dsp] Why 128 samples ?
>
>
> I've noticed that quite often when people talk about audio
> latency, the value of 128 samples is mentioned. Why do people
> focus on that particular value and not, say, 64 or 256 ? Does it
> have to do with the sound hardware ?
>
> Also, does that privileged number depend on the number of
> channels ? For example, if there is only one channel, the same
> number of *bytes* will encode 256 *samples*.
>
> --
> André Majorel <amajorel at teaser.fr>
> http://www.teaser.fr/~amajorel/
>
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://shoko.calarts.edu/musicdsp/
>
dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/
More information about the music-dsp
mailing list