Which object to store window function ?

max lizom's icon

Hi,
I generate a Hanning function, thanks to fredrikolofsson.com/, and I would like to know which object is suitable for storing the data generated ?
My goal is to use it as an envelope for granular synthesis. So, I need interpolation for the reading.
record~ with buffer~ seems not suitable since I cannot specify an index : it record at the sample rate ...
is table the more convenient ? if so, how to interpolate while reading ?

tks

max lizom's icon

I made this, I am pretty sure there is a simple way.
(Why it did not start and end with a zero value ?)

Exit Only's icon

take a look at peek~ and poke~
https://docs.cycling74.com/max7/maxobject/peek~
https://docs.cycling74.com/max7/maxobject/poke~

i store all my windows as .aif files and have my "windows" folder in the max search paths for easy loading

max lizom's icon

perfect thanks. And what do you use to read the buffer ?
peek~ read at the data rate ...
index~ does not have interpolation
I use play~ but I have to convert sample size to milliseconds ...

Roman Thilenius's icon

depending on the context you will read it out with any of the possible objects.

but for windowing jobs, cycle~ is your first choice.