pattr is driving me crazy

koolmatt's icon

It seems that no matter what I do, pattr always initiates and sends out a value... I don't want to have to gate every single pattr I have in my patch for a few reasons but pattr literally has a setting that says 'don't restore contents on load' and it doesn't work.. What's going on?

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

Christopher Dobrian's icon

Initializing the autorestore attribute to be off (i.e., "@autorestore 0") should work.

Just sending the message "autorestore 0" changes the attribute, but the next time you open your patch, it reverts to its default state (on), unless you have initialized it to 0 in the object box, as shown above.

TFL's icon

I would like to add that it is specific to all attributes written in italic in the inspector: they aren't saved with the patcher, unless explicitly stated in the object box. Another alternative is to freeze the attribute, although I find this approach less practical in that case as it makes a patch harder to read (you need to select objects one by one and check the inspector for frozen attributes, whereas explicitly defined attributes in object boxes are immediately visible).