[LAD] Fw: Re: Some questions about the Jack callback

From: Fons Adriaensen <fons@email-addr-hidden>
Date: Sat Sep 20 2014 - 23:40:05 EEST

On Sat, Sep 20, 2014 at 04:10:13PM -0400, Mark D. McCurry wrote:
> On 09-20, Fons Adriaensen wrote:
> > Having to do 256 1024-point FFTs just to start a note is insane.
> > It almost certainly means there is something fundamentally wrong
> > with the synthesis algorithm used.
>
> I agree with that notion.
> In typical patches something between 2-10 IFFTs is expected and even this
> cost strikes me as too high (zero IFFTs for pure PAD/SUB synth based).
> In terms of worst case scenarios ZynAddSubFX can have some rather insane
> characteristics given multiple parts, kits, voices, etc.
> For instance if a user decided to use all padsynth instances at max quality,
> they would need 12GB of memory just to store the resulting wavetables.
>
> Such extremes are not really seen in practice, but things are slowly getting
> optimized to avoid them when possible.

You should really look at this from an information theory POV,
combined with some psycho-acoustics.

Suppose you have to deliver 256 samples in a period when a note
starts. That amounts to around 5.3 ms at 48 kHz. That time limits
the amount of spectral detail that can be detected given the
output from the first period. Which means that there is no point
in generating more detail in the first period of a note.

Even on sustained notes the amount of spectral detail that can be
detected by a human listener is limited by the critical bandwidth
of human hearing (which increases with frequency). That means that
any set of harmonics that fall within a critical bandwidth can be
replaced by a single one with the same energy and nobody would be
able to hear the difference. All this means that you *never* need
256 harmonics, not even on bass notes below Fs / (2 * 256).

And if the final output is a weighted sum of those IFFT outputs
you can as well compute the weighted sum of the inputs and then
do a single IFFT - it's a linear transform after all.

Ciao,

-- 
FA
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)
----- End forwarded message -----
-- 
FA
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun Sep 21 00:15:03 2014

This archive was generated by hypermail 2.1.8 : Sun Sep 21 2014 - 00:15:03 EEST