Immediate sharing of pattrstorage's presets – bug in autowatch?

Mar 10, 2010 at 2:36pm

Immediate sharing of pattrstorage's presets – bug in autowatch?

Hello,

I am trying to share pattrstorage presets among multiple bpatchers using the autowatch mode but I cannot achieve it. It seems the json file is indeed written upon preset creation but the other instance doesn’t seem to load it.

What’s wrong with my patch?

Roald Baudoux

<


----------begin_max5_patcher----------
1719.3oc6as0bahCE9YmeEL94TO5BW2m18w82PmNYjAkD0EjX.Ymtam9eeER
fAbfTbpw1znNo1V2O5SmyQGI9362sZ8Vw2nkqc9CmO6rZ02ua0JcVUYrpN8p
0YjuEmRJ0Ua81bhL9YZw56MEtmTvIYzdk8PNoPRdh9PoXW4mzYV9Y3WZZBKQ
Waw1u9I2l736xX7TpTOHf5LoYao55BaqkXm73psUTjnDnN0SOjL9SOTPiklY
maf+Fv8NPHt5Kb.T+EVkoyWZ58oLO1nPC0uZjaRwS0v2gtoAfLXXMHtZ8irT
5dZQISv6HpqVeJhnZt9TrHUTXZftBse.5WwTQ7+XfOPSlIzGOsgSjS4ss.TO
JsezulLddAsjxkDY8rr6HS1kJe3QAWVx9OMNCQaFr7GIwzQa7gEo+pfQRW2T
kmJXIBdkPzqkUY2LbJ7xSOg85J25ZvI4CzXoPjtkTrmUx1lR6snorQHbVFQR
kLi7f.GZGKKufwk85KJmn5imKiKDoo85JSI6GnjD5dVL8EVh7Yce0hV8rZ6n
j0y5sW9GYEmQKKUJ1Mvmd1R+lVjUJjjjtEzwb0qa9iuZ7JCZT+B5XCCOpCGP
2Pqcoag7eyqWIWu9vJ3H16nHyhcfQ61jHrZkuoY+3t6Z9w8y.L9RASR+Zof6
LjWjpBFAjQtKHTVitnPWM7FEMKnLm9hBWFDjkNacRGCGQuSbDNJNhdm33VB+
o02Oc7zKPqzh13oR.lc3r6d3T9dZpHOeXkZkHKKbFrNcPdn6YG4wuWM36q++
OC48qcWT8YjYUn69alcpKkhhl8R.f1cBgc1SDB788CT+5dGW0BnGFFgpx22+
P9vH3F2vHrumtA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cwzq7m3b81x5N3Dr
Ftcj5vIJ03aJqgnoh0vynXWmoIG8mloxbx59AnbO9hQ4dHvbEdPzMKk6+4h3
Ykx8SY3rTt2R4dKk6sTt2R4dKk6sTt2R4dKk6sTt2R4dqktkx8VJ2aobukx8
VJ2aobukx8VJ2aobukx8VJ2aobukx8VJ2aobukx8VJ2aob+4kx8WEVR7QkRJ
KS5+rLoZ0GIxvsLoq3xjZn+tQP2EKQosjb+C1a0vGo2WkeudUiVruvW12Xuk
8ab4R8Ebco9BEeMd+s+Unbe+mRU6EL727RIgq9iJ1U5nYesrzo7YRg536NjL
g5yrcoRVdJ0ogV6CQD+lKEc7ahXva6YDF4261GBat8gAudSn1AQH1DuhIFkC
aWUiRpD+3t+2kfdTt
-----------end_max5_patcher-----------

#49064
Mar 16, 2010 at 11:07am

Maybe I should add it was functioning perfectly under Max 4.6…

#176228
Mar 16, 2010 at 11:58am

Platform? Version? You know – the usual….

#176229
Mar 17, 2010 at 7:43pm

Here we go :

Max 5.1.2/MacOS X 10.4.11/MacIntel Core 2 Duo 2 x 2.2 GHz

#176230
Mar 17, 2010 at 7:56pm

works fine here. I created a .json file, stored a slot in the first bpatcher, recalled the slot in the second.

please update to Max 5.1.3:

http://www.cycling74.com/downloads

-Ben

#176231
Mar 17, 2010 at 9:10pm

Still not working under Max 5.1.3. …

@bbracken : how have you created the .json file?

#176232
Mar 18, 2010 at 12:03am

Ok, I see the problem. You are asking to autowatch a file that doesn’t exist.

“When file watching is enabled, the most recently read or written XML data file will be reloaded automatically if it is modified”

If the file was never written when the second pattrstorage gets instantiated, then it will not know what file to look for. You will probably have to come up with some way to re-initialize the object after you have a real file to autowatch in place.

I’d be pretty darn surprised if it worked in Max 4.6 any differently.

-Ben

#176233
Mar 18, 2010 at 10:54am

I don’t get it. If I create the .json file in one bpatcher, close the patch, reopen it, each pattrstorage loads the presets. Then, shouldn’t the autowatch setting make each pattrstorage reload the presets upon writing by the other bpatcher?

#176234
Mar 18, 2010 at 2:57pm

How you just described it works fine here.

If I save a preset in the first bpatcher, close the patch, reopen it, save another preset, I can recall it from the second pattrstorage (or vice versa).

If the .json file exists in Max’s search path when the pattrstorage object is instantiated, then you will be able to save, write, reload and recall.

If the file doesn’t exist when the pattrstorage object is instantiated, then you will need to do something to tell it what file it should be autowatching *after* the file exists.

-Ben

#176235
Mar 18, 2010 at 5:25pm

I proceed exactly the same way but it doesn’t work!

#176237
Mar 18, 2010 at 6:51pm

Where is the .json file being saved? Does Max have access to this location, ie, is it in Max’s search path? Are your permissions set correctly? Sounds like something non-Max related is going on.

-Ben

#176238
Mar 18, 2010 at 7:18pm

The .json file is in the same folder as the bpatcher and the main patch. Should the folder be explicitely in Max’s search path too?

#176239
Mar 18, 2010 at 7:44pm

If its in the same folder as the main patch, that should be fine, as it gets added to the file search path automatically for that session. What happens when you try saving to a location explicitly in Max’s search path?

Have you checked the permissions on that folder? Where is it, is it on your boot drive?

-Ben

#176240
Mar 18, 2010 at 8:16pm

Well, puting all the files into a folder which is explicitely in Max search path doesn’t change anything.

My folder is on the boot drive and I have the read/write permissions on that folder.

Strange, strange, strange.

#176241

You must be logged in to reply to this topic.