About buffers, changing buffer names and functions

Paolo Piaser's icon

Hello everybody

I am creating a granulator in mc.gen~ and I am stuck with windowing. I tried different approches, but some of them are just too expensive ( for example, generating it on the fly with counter(),scale() and pow() to control the shape of it).

I ended up with the idea of having a separate gen~ to create the windows, and inside the granulator to have a single function to recall the window selected among the others for every of the 50 istances

Here are my attemps:

Max Patch
Copy patch and select New From Clipboard in Max.


Is it possible to change the name of the reference buffer~ outside the gen~ patch from codebox ( and mantaining the reference internal name for peek, poke etc ) ? Or how do have I to do to use the second version function, since when I am using it it give me error ?

I am sorry for not sharing the Granulator code; actually I still have to decide what to do with it because it is a different approach and I might make it a vst in the future.

Paolo Piaser's icon

Hello

actually there were a bug in gen and couldn't compile the code of the function with the peeks and buffers inside if statements. Still, I would love to know if there is a way to dinamically change the name of the buffer