Recording and playing FFT-analysis files.

Dec 7, 2006 at 2:23pm

Recording and playing FFT-analysis files.

Hi!

I would very much like to convert a wave-file into some kind of FFT-analysis file. Then I’d like to be able to play this FFT file and convert it back to regular sound.

I’ve tried recording the FFT-data coming from an fftin~ object (within a pfft ~ subpatch) witth sfrecord~, and then playing it with sfplay~, sending the signal trough an fftout~ object, but that doesn’t work. I do get some kind of crackle-sound; I think that the frequencies and phases etc get all mixed up because the computer doesn’t know where a frame starts or ends.

How do I overcome this problem?

ps. If anyone wants to know WHY I’m doing this: I’d like to use this FFT-data to be able to skip to any point in the file and immediately know what the FFT-analysis gives me at that point, without me having to play a little bit first and sending this through an fftin~ object.

– TB

#29091
Dec 7, 2006 at 2:57pm

You miguht find it worthwhile to check out Gabor and FTM. They would
enable you to do non-realtime FFT analysis of buffers. Search the
Ircam.fr site for it.

Best,
Trond

Tarik wrote:
> Hi!
>
> I would very much like to convert a wave-file into some kind of FFT-analysis file. Then I’d like to be able to play this FFT file and convert it back to regular sound.
>
> I’ve tried recording the FFT-data coming from an fftin~ object (within a pfft ~ subpatch) witth sfrecord~, and then playing it with sfplay~, sending the signal trough an fftout~ object, but that doesn’t work. I do get some kind of crackle-sound; I think that the frequencies and phases etc get all mixed up because the computer doesn’t know where a frame starts or ends.
>
> How do I overcome this problem?
>
> ps. If anyone wants to know WHY I’m doing this: I’d like to use this FFT-data to be able to skip to any point in the file and immediately know what the FFT-analysis gives me at that point, without me having to play a little bit first and sending this through an fftin~ object.
>
> – TB

#90064
Dec 7, 2006 at 4:41pm

Thanks, I see that theoretically you’re right. And FTM looks… very good actually! But in the cold and harsh reality, Gabor and FTM keep crashing on me, especially when I’m trying to analyze large wave files. I’m gonna keep on trying ( I still have hope) but if anybody has another idea on how to do this, please keep me posted!!

– TB

#90065
Dec 7, 2006 at 6:56pm

#90066
Dec 7, 2006 at 7:03pm

> Thanks, I see that theoretically you’re right. And FTM looks… very good actually! But in the cold and harsh reality, Gabor and FTM keep crashing on me, especially when I’m trying to analyze large wave files. I’m gonna keep on trying ( I still have hope) but if anybody has another idea on how to do this, please keep me posted!!

Somehow, this sounds like a good SDIF application. It would take some big wrangling, though.

I’m surprised that recording a 3-track sound file didn’t work. I might try wrangling with Jitter, using a 3 (index, real, complex) by fft-sized matrix.

Let us know if it works.

mz

#90067
Dec 12, 2006 at 1:28pm

http://www.cycling74.com/section/tutorials …yes, that was exactly what I needed. It doesn’t record any FFT-stuff but it does give me the tools to do everything I wanted to do.

Now I also have a much better understanding of the way that FFT works within max, which makes me see why my recording of FFT-data wouldn’t work: I didn’t properly make sure that the exact right sample was being played at the right time, so my frequencies got all f*cked up.

– Tb

#90068
Dec 12, 2006 at 2:03pm

#90069

You must be logged in to reply to this topic.