Pattr, Pattrstorage and bindto

Neil Baldwin's icon

I think I have a handle on pattr and pattrstorage but binding to objects in subpatchers/abstractions still baffles me.

Say you have a patcher (P1) and inside that is an abstration (A1), inside the abstraction is an an object (O1) and you'd like to save attribute(s) of O1 in the pattrstorage in the main patcher (P1).

If I create a pattr (PT1) in the main patcher (P1) and use a bindto message (bindto A1::O1), I can send values to O1 from the main patcher so that works OK. If I edit O1 attributes from inside A1 and then examine the data in the pattrstorage object (PT1), the attribute values of A1::O1 are in there. So far so good.

However when I load the patch again (saving and loading the pattrstorage json data), even though the value of the parameters in A1::O1 loads into the pattrstorage (as you'd expect), the stored attribute values don't get passed through to A1::O1.

I hope that makes sense!

I'm wondering if I'm missing a step or am misunderstanding a key concept?

Source Audio's icon

place autopattr into A1

Neil Baldwin's icon

Ah OK. I know that works as a catch-all but what if you wanted to target an object in another device: the way you can use the send and receive object pairs to pass a value to an object anywhere in the current Max namespace. I was hoping to just have pattrstorage (coupled with 'preset' object) to save object attributes both in the device that has the pattrstorage and other devices that I have loaded (and created) on the same track, rather than having to implement pattrstorage in each device.

Source Audio's icon

Sorry, I don't use Live.