[Stk] Re: frequency analyzer for stk library

jean marc Mercier jeanmarc.mercier@free.fr
Tue, 01 Oct 2002 12:32:18 +0200 (MEST)


Dear All,
Thanks for your interest in this project.
I have written down a quick and dirty first trial using the stk library for the 
real time sampling, using your advises and metaphors.
The real FFT method comes from the numerical recipes.
With my ooooold 1,5 gHz PC, a set of parameters that seems to use about 90% of 
processor computation time (thus the real time input sampling should not be 
slowered) are
* sample rate to 44000 Hz.
* Buffer size for the FFT input 16384 (must be a power of 2, sigh...)
So that it capture frequencies from 0  to 22000 Hz with a precision of 
22000/16384 Hz.
* A computation of the FFT Each 128 ticks
So that it refreshes frequencies computations every 128 /44000 = 2 ms
yours,
jean marc mercier


En réponse à Dan Timis <timis@rahul.net>:

> >This sort of breaks the single sample tick metaphor that
> >pervades STK.  Real time has been an important consideration
> >in STK.  This would make it more confusing having some classes
> >that do real-time via tick() and others that may or may not.
> >
> 
> Sometimes, a delay of one FFT window is acceptable.  For instance, there
> 
> are several commercial VST plug-ins that use the FFT.  An FFT class
> could 
> still use the one sample tick metaphor, but buffer the input samples 
> internally.
> 
> Dan Timis
> 
> p.s.  BTW Perry, I am enjoying your new book a lot.  Great job.
> 



jean marc Mercier