| Fixed. For the moment I am only allowing power-of-two
fftsizes. I don't think it would be necessary to add support
for non-power-of-two. I can do if people find it necessary.
Thanks for spotting it. It's my first time using the code
in fftlib.c.
Victor
>
> This code may be buggy:
>
> if (!(fftsize & (fftsize - 1))){
> csound->RealFFT(csound, signal, fftsize);
> csound->RealFFT(csound, diffsig, fftsize);
> } else {
> csound->RealFFTnp2(csound, signal, fftsize);
> csound->RealFFTnp2(csound, diffsig, fftsize);
> }
>
> The problem is that csoundRealFFT() and csoundRealFFTnp2()
> have different output formats.
>
> csound->RealFFT(csound, buf, N);
>
> this requires 'buf' to have enough space for N elements,
> and stores the real part of the Nyquist frequency bin in
> buf[1]
>
> csound->RealFFTnp2(csound, buf, N);
>
> 'buf' should have enough space for N + 2 elements, and
> this time the Nyquist frequency component is stored in
> buf[N]; buf[1] and buf[N+1] will be zero.
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux
> Migration Strategies from IBM. Find simple to follow
> Roadmaps, straightforward articles, informative Webcasts
> and more! Get everything you need to get up to speed,
> fast.
> http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |