FFTW in a msp external

Apr 2, 2009 at 11:31pm

FFTW in a msp external

Hello,
do you have an example of C code of an object that use fftw?

Just to learn the basic use and not taking wrong ways…

Thanks in advance

#43175
Apr 3, 2009 at 12:43am

This isn’t a max/msp external “proper” (and it’s also C++), but the RTcmix fft instruments can be compiled using fftw. See genlib/Offt.cpp for the source.

brad
http://music.columbia.edu/~brad

#154793
Apr 3, 2009 at 9:04am

Hi brad thanks for answering.
I want to perform a fft inside the object.
My goal is to take the maximum magnitude and the relative frequency of an FFT audio signal.

So according to your experience which is the best way? It is the use of fftw?

I searched the RTcmix fft but I have not understood its relation with the fftw!
Could you please explain me?

Can you please also give me some specific useful links where I can study these stuffs you suggested?

Finally wher I can get genlib/Offt.cpp?

Thanks

#154794
Apr 3, 2009 at 1:09pm

Luca –

You may be able to do what you want using the ‘standard’ max/msp objects (fftin~/fftout~/pfft~), or I’m also a fan of Eric Lyon’s FFTease objects:

http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/FFTease/

but I tend to use the RTcmix/rtcmix~ fft routines because I know them better. But that also assumes you will be doing most of your work “within” rtcmix, which may or may not be what you want.

But if you’d like to see the code, download the main RTcmix source package from here:

http://rtcmix.org/

and after you unpack it, go to the RTcmix/genlib folder, that’s where the Offt.cpp source code is. To use fftw, you need to set up a ‘plan’ (real-to-complex, complex-to-real) and then execute it on incoming frames of samples (or frames of FFT data). It’s fairly easy to use, as fftw provides functions for doing all this.

For info, check out some of the links here under “FFT Information”:

http://music.columbia.edu/cmc/courses/g6610/fall2008/resources.html

They’re kind of old, but they may help.

brad
http://music.columbia.edu/~brad

#154795

You must be logged in to reply to this topic.