Forums > MaxMSP

Autopattr bpatcher lose data / bindings

December 3, 2012 | 5:05 pm

Hello,

Been a while since I worked with Max and the pattr system.
I’ve a considerable amount of bpatchers and I’d like to centralize data in the top patch.
For this I use pattr storage, controlled by a preset object.
Each bpatcher has an autopattr with default settings and named objects.

While everything works as it should, if I modify and save the bpatcher, the bindings seem to be lost.
The expected behaviour would be to get the stored data when reloading the preset, instead the GUI elements revert to default settings.

What am I doing wrong, is there some argument to pattrstorage or autopattr that takes care of this or some other function?

Thanks,

Isjtar


December 4, 2012 | 1:32 am

I’ve looked at it some more and it appears that when changing a subpatch and saving it, pattrstorage can no longer write a proper data file with valueless JSON as a result – this with both patcher and bpatcher containing the same abstractions.

{
	"pattrstorage" : 	{
		"name" : "so",
		"slots" : 		{
			"1" : 			{
				"id" : 1,
				"data" : 				{
					"sub::zenumber" : [  ],
					"sub[1]::zenumber" : [  ]
				}

			}
,
			"2" : 			{
				"id" : 2,
				"data" : 				{
					"sub::zenumber" : [  ],
					"sub[1]::zenumber" : [  ]
				}

			}

		}

	}

}

instead of

{
	"pattrstorage" : 	{
		"name" : "so",
		"slots" : 		{
			"1" : 			{
				"id" : 1,
				"data" : 				{
					"sub::zenumber" : [ 11.0 ],
					"sub[1]::zenumber" : [  ]
				}

			}
,
			"2" : 			{
				"id" : 2,
				"data" : 				{
					"sub::zenumber" : [ 10.0 ],
					"sub[1]::zenumber" : [ 23.0 ]
				}

			}

		}

	}

}

Viewing 2 posts - 1 through 2 (of 2 total)