Forums > MaxMSP

writing fft analysis data to wav

January 5, 2013 | 12:37 am

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.


January 5, 2013 | 2:54 am

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


January 5, 2013 | 2:56 am

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


January 5, 2013 | 8:51 am

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.


January 5, 2013 | 9:16 am

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


January 5, 2013 | 2:59 pm

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


April 2, 2013 | 12:24 pm

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.


April 2, 2013 | 2:00 pm

Max version is 6.1.1


Viewing 8 posts - 1 through 8 (of 8 total)