it’s my second post on this topic, i’m writing it because it’s a more general question.
how can i access a buffer~ and copy all the amplitudes in an array of doubles in my external,
i need it to perform an fft using fftw3 library and write the output as a list of float on the first inlet, i want the external to perform the fft on an array of 4096 samples (zero padding if the sample in the buffer are less than 4096 or taking the first 4096 if the buffer is bigger) when receiving a bang in its left and only inlet.
i know how to perform the fft in a stand alone program, so i can write the method, but i cannot understand how to access the buffer, and also i don’t know if i have to write an msp external or just a max external (no inlet or outlets are sending/receiving signals) just bang -> inlet; outlet -> list of amplitudes.
thanks to all the community and of course to cycling74 for this software.
This might help:
from what I know you don’t necessarily need to make a msp external
he wants non-realtime fft processing, and that is not really possible with max’ native fft objects (ok, maybe with the non-realtime driver)
what you could do though is do it in jitter, there are some examples for that on this forum
i don’t need DSP, so i’ll try to convert the external you send me in the other thread to a max external.
my project was to write a c program, that read a wavfile, perform FFT using FFTW3 library, than output the foundamental frequenecy amplitude, and all the harmonics amplitudes, and then use additive synthesis to create a similar sound. than i decided to convert it to a max/msp external because it was too easy for a degree thesis.
it’s not useful and not needed, but good for my purpose because in italy we have a project after 3 years of university and the real final project after 5 years.
this is my 3rd-year project, and my first external.
i hope in 2013 with some more experience i’ll code something better and maybe usefull.
anyway thanks a lot for your replies, i learned more in 3 days writing on the forum and reading forum posts than 10 days reading the sdk manual: it’s the power of the community.
i will share it for sure, i have been a linux user for a long time, sharing is my world :D
@STANZAROSSA did you ever figure out how to access the buffer in none-realtime? I am in need to do the same thing and any pointers would be really appreciated.
I am fairly new to the SDK, I did read the blog entry Timo mentioned above but I am not sure if that’s a purely MSP implementation or if that could be used in a Max environment as well…
Here is what Timothy Place had to say. Scroll down to the comments. There is a link to tap.buffer.norm~ code which I am trying to make work right now…