hi all,
i'm currently working on an external that's using the fftw3 library to replace pd's internal fft objects... the results are amazing, i reduced the cpu load for the real forward fft to 40-50%
but i realized that the imaginary output of the fftw library is negative, the imaginary output of pd's fft is positive ... or to be exact, the output of fftw and pd's fft are complex conjugated ...
any idea, what could cause this?
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
On Sun, 29 Feb 2004, Tim Blechmann wrote:
hi all,
i'm currently working on an external that's using the fftw3 library to replace pd's internal fft objects... the results are amazing, i reduced the cpu load for the real forward fft to 40-50%
but i realized that the imaginary output of the fftw library is negative, the imaginary output of pd's fft is positive ... or to be exact, the output of fftw and pd's fft are complex conjugated ...
any idea, what could cause this?
Just a guess, but this might be an interpretation issue of what a rfft is. As it just throws away half of the spectrum, it seems that they don't agree on which half has to be thrown away.
Are you going to release the objects as externals ? I think it would be better to have them in the pd sources, and let configure detect the availabilty of fftw, and compile accordingly.
Guenter
Are you going to release the objects as externals ? I think it would be better to have them in the pd sources, and let configure detect the availabilty of fftw, and compile accordingly.
i thought about that, but fftw3 is released under the gpl, pd under bsd licence, so i wasn't sure if i could write a pd-internal object to use the library ...
if it's possible, i can try to have a look at the pd-internal code and add them as internal replacements of the mayer-fft...
cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
Are you going to release the objects as externals ? I think it would be better to have them in the pd sources, and let configure detect the availabilty of fftw, and compile accordingly.
i thought about that, but fftw3 is released under the gpl, pd under bsd licence, so i wasn't sure if i could write a pd-internal object to use the library ...
i had a look at the other libraries, pd is using ... since most audio-i/o libraries are gpl (jack, portaudio, alsa), i don't see any problems to use the fftw library ... i'll start working on it in one week after my math exams ... i'm not familiar with the automake tools ... is there any online crash course i could have a look at?
cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
i'll start working on it in one week after my math exams ... i'm not familiar with the automake tools ... is there any online crash course i could have a look at?
http://www.heise.de/ct/03/21/208/default.shtml (Deutsch)
ciao
I think it would be better to have them in the pd sources, and let configure detect the availabilty of fftw, and compile accordingly.
i added it to cvs ... maybe miller can add it to the future releases ... if there are any problems / comments, please let me know ... i also have to add, that the results of fftw and pd's internal fft aren't exactly the same, they differ about a factor 1e-6 to 1e-7, so i doubt that anyone would realize unless he compares both ffts ...
i'm currently using the basic interface to call fftw, i hope i can change this to the guru interface soon, that should bring some additional performance ...
cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
hi all,
but i realized that the imaginary output of the fftw library is negative, the imaginary output of pd's fft is positive ... or to be exact, the output of fftw and pd's fft are complex conjugated ...
any idea, what could cause this?
Just a guess, but this might be an interpretation issue of what a rfft is. As it just throws away half of the spectrum, it seems that they don't agree on which half has to be thrown away.
i'm working on the guru interface that's working better on pd's way of handling complex numbers ... would there be any problem if we take fftw's complex conjugated output instead of pd's way of output? i don't know if it makes any difference on with dsp applications, and i don't want to change the behaviour of an internal object, unless there is no real difference between the two behaviours for pd users ... i mean using a rfft~ object with an rifft~ object would'n make any difference, but if you combine a real with a complex fft object, there could be some issues ...
the difference in cpu expenses would be a memcpy of the imaginary samples to a memcpy and inverting of the imaginary samples ... the inverting wouldn't be that expensive, but if we wouldn't need it at all, it wouldn't be that bad ...
cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac
hi all, i changed the code of the fftw objects, they know use the guru interface, which is better for pd's way of handling complex numbers,
i also added support for comments in .pdrc files (lines beginning with '#')
cheers...
Tim mailto:TimBlechmann@gmx.de ICQ: 96771783 -- The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!" Jack Kerouac