writing fft analysis data to wav

Jan 5, 2013 at 12:37am

writing fft analysis data to wav

Hello dear forum people.
I made a patcher that does fft analysis of an audio-file with pfft. I can playback, or resynthesize the data just fine. It’s stored in a buffer with chan 1 amp data and chan 2 phase differences.
The kind of weird problem i have is, when i store the data as an aiff, or wave, load it in again, everything is workiing, but it sounds very bandlimited. Any ideas?
Thanks a lot!
PS: i didn’t post the patch because it doesn’t seem very helpful, 2. it needs some work.. you know, i din’t want to post a mess. also these are about 4 patches i think.
But i will post it if you think that migth help.

#65905
Jan 5, 2013 at 2:54am

what?
i’m asking for help here, you can have the patcher if you like, but i wrote that already.
i mean, what?

#237351
Jan 5, 2013 at 2:56am

ah.. now i get it.. damn good spam bot!

#237352
Jan 5, 2013 at 8:51am

The kind of weird problem i have is, when i store the data as an aiff, or wave, load it in again, everything is workiing, but it sounds very bandlimited. Any ideas?

you need to store your data in a float format. have a look at the samptype message to buffer.
integer formats will clip the values between -1 and 1 before casting to int.

#237353
Jan 5, 2013 at 9:16am

It seems offline FFT-ing is a common need for many folks out there. I’ve just finished an external that does almost the same as yours. It’s very weird that offline FFT processing is not provided out-of-the-box by Max (yes, I know there’s [jit.fft], but it requires a lot of patching if one wants to use it for audio stuff).

Cheers,
Ádám

#237354
Jan 5, 2013 at 2:59pm

Ah, thanks a lot, i’ve assumed it must be something like this. I’ve tried “format float64″, but not samptype… cheers!

#237355
Apr 2, 2013 at 12:24pm

Hello,
I have been using samptype float32 buffer~ for years to store FFT data and was pretty happy with it… but last friday something awful happened inside my work computer (Win7 PC) and now there is no way that buffer~ will load float32 files.
It correctly loads regular “sound aiff” but not the float32 ones and it says: buffer~: cannot open parser for this file
On the contrary, sfplay~ opens float32 files and plays them back (sounding as nice as you can imagine… but, I needed to listen just to check) correctly.
I have tried almost everything (including removing and re-installing Max) but the problem is still there. And it is a beast of a problem for me…
Can anyone help?

Thank you in advance.

#237356
Apr 2, 2013 at 2:00pm

Max version is 6.1.1

#237357

You must be logged in to reply to this topic.