Maximum amplitude of a FFT signal...HELP!!!

Luca's icon

Hello everybody,
I want to analyze an audio signal in real time with MAX/MSP 5, using fft (or better pfft). What I want to do is to find the maximum amplitude value (in dB) of the fft signal, and the relative frequency.

Has someone already created a similar patch?

I am able to get the amplitude and the frequency values but I am not able to find the maximum...The amplitude (converted by cartopol) is a signal....how can I get the maximum of a single signal?

I attached 2 patches I created. Feel free to modify them!

Thanks in advance

jvkr's icon

You are trying to achieve something that isn't impossible but not easy either. There's a few options
1. get everything out of the signal domain in order to perform calculations on lists; this is rather dirty
2. program your own objects in C or mxj~ that do what you want
3. have a look at FTS from ircam, which is designed for doing these type of things.

_
johan

Luca's icon

Hi,
thanks a lot for the answer.
I am trying to write an object using the MAX SDK.

Anyway, why do you think is "dirty" to use lists of numbers coming out the fft?

What is exactly FTS? I am searching in google but I ask you please to you explain exactly what it is and why it can help me.

Thanks a lot!

jvkr's icon

Quote:What is exactly FTS? I am searching in google but I ask you please to you explain exactly what it is and why it can help me.

Sorry, that's a mistake, it's FTM, an extension to max/msp.

Dirty because, you can never be sure of receiving a list for every analysis frame, and there not really a method for collecting a number of values into a list in the first place. You could use poke~ and uzi the values out, but, yuck.

_
johan

Luca's icon

Thanks a lot.

Has someone else other suggestions?

Thanks in advance

Pierre Alexandre Tremblay's icon

another suggestion

read the manual at the pfft~ tutorial (26), heading called:
cartesian to polar conversion.

it is all there.

pa

jvkr's icon

Quote:Has someone else other suggestions?

Thinking of it a little longer, yes. Jitter.

_
johan

Max Patch
Copy patch and select New From Clipboard in Max.

Jean-Francois Charles's icon

Yes, Jitter.
Record the sonogram in a jitter matrix, then explore the sonogram, find maximums, etc.
Jean-François Charles.