JSON Pattrstorage, Presets + Standalones.
I know this has been covered many times here - but I'm up against a somewhat confusing situation.
I've done everything I can try that's been covered in threads I've found, but I've still not come up with a solution.
I've even tried making some very basic tests to try first, but have had no joy.
So it is nice and clear, all I need to do is load a bunch of data from a json (previously saved from a patch using pattrstorage) and have it populate out a bunch of presets in a preset object (and of course, work with the pattrstorage!) And I need it to happen inside a standalone.
I do not need to be able to SAVE into the JSON at this stage (inside the standalone) - would love to at a later date, but that is not as important.
What I have done / tried. The pattrstorage looks like this:
pattrstorage GenS @savemode 3 @autorestore 0 @fileusagemode 1
I've tried both ;max sendapppath (and I get the correct answer) or just a simple read (where I manually show it where GenS.json is).
The best result I've got is from the read command - where I can see all the data in the standalone using a storagewindow, but it does not populate out the presets (which it does when I'm on both a mac or pc doing the development.)
I have tried putting the GenS.json in various places (root of the created app folder - so alongside the exe, in a /contents/ folder inside the app folder... even back in the cycling'74 folder for kicks. )
None of this gets me any closer.
I feel like I've followed the following advice (which seems to help most people out) to the letter, but it doesn't help :
1) Set "fileusagemode" = 1, for patternstorage. (also choose a proper "savemode", start with 1 for testing purpouses)
2) If you have already created a .json just move it to another place then reload the .maxpat, it has to load with all pressets blank.
3) Compile your standalone to an empty folder and put the previously moved .json file to that folder
I've set commands to force the presets to clear on open (shows the load is working fine inside max, just not in the standalone, but doesn't get me any closer!)
I've tried this inside an example patch, as well as my main patch. I'll paste my example below. (Using a json called testdata.json)
This has me completely stumped :). I'm hoping I've just forgotten something really straight forward, but who knows. I feel like I have tried everything three or four times during the last two days of working on this.
Many thanks for reading this far. B.
So the mystery deepens. Or maybe becomes clearer as to what is going on.
I just made a new test project to try a few things out.
First thing is simplifying out all the stuff that isn't needed.
So I really only have a single pattrstorage, preset and two dials with pattr's attached.
My pattrstorage uses @savemode 1 @autorestore 1 @fileusagemode 1
The preset bank points to the pattrstorage thru the inspector pattrstorage field.
It all works as expected in max.
Buidling an application (today on osx, not windows like yesterday) and things get a little stranger.
As advised, I build the application when the patch has "clean" presets. (I do this by moving the json file before opening it / building it!)
Then I move the json to the /content folder inside the app.
Upon opening the app, I open a storagewindow, and I can *SEE* all my data in there.
However, the presets are blank, and this is my main problem. It seems to be loading the data from the JSON (I *think?*) but not populating out the presets.
However, if I even LOAD the json manually inside max itself, the presets populate great.
What I've learned today : It isn't a pc thing - since this behaviour is on the mac.
It isn't the ;max command I tried yesterday - I'm getting the same behaviour today not using that command at all. I *think* this command is more important if I want to be able to save into the json later right? Anyway - it hasn't changed my first problem at least.
I'm all out of ideas. I've tried everything I can think of, short of abandoning presets and doing it all manually... which I really don't want to do...

Hi, I have the same problem, could you solve it in any way?
Hi here is a simple solution how I worked out the pattrstorage and standalone thing. I confirm it is somehow odd, but this seems to work on OSX 10.14 Max 8.04
cheers Falk
Hello all,
the solution of FALK was also always what I was looking for. thanks for that. however, did not work for me. The read function did not work unfortunately.
Mac OS 12.3.1 and MAX 8.3.1
I have modified it a bit.
Greeting Peter