#0_ does not like pattr.... ?

Luca Schwarz's icon

Hi everyone,

I'm working with an abstraction in Max/MSP that contains a large number of data objects (mainly [i] and [f] objects, roughly 32 × 32).

I'm using pattr objects named #0_xyz to be able to duplicate my patch later etc. So far pattr works perfectly while the patch is open, and I'm able to save and recall presets using pattrstorage.

However, when I close and reopen the main patch, the #0 identifiers get a new identifier number and my presets are of course gone.

So my question is - is there a way keeping the functionality of #0_ but also ensure that the identifiers remain stable across patch sessions so that presets can be saved and recalled reliably?

Thanks a lot!

Rei Kurosawa's icon

Try giving each abstraction instance a fixed first argument, such as myabstraction voice1 and myabstraction voice2, and use pattr #1_xyz inside instead of pattr #0_xyz. Max replaces #1 with that first argument, so the prefix comes from the name you supply rather than its automatic counter. Use the same distinct arguments when reopening the parent patch. I'd test this in a copy of the abstraction with a new preset first, rather than renaming everything at once.

Luca Schwarz's icon

hey rei! thx will try this out!

Luca Schwarz's icon

works like a charm! thx!!!!