exporting/importing a single preset

gbravetti's icon

Which is the best approach to export/import a single preset of the pattr system?

gbravetti's icon
Nikolas K's icon

To export, something like a "store 1, writejson my_path/my_preset.json" to pattrstorage.
This will create one preset in a json file!

To import, "read my_path/my_preset.json, 1", this wil load the my_preset.json file, and load the first (and only) preset!

gbravetti's icon

Hi Nikolas,

May be I wasn't clear enough, sorry about that.
What I meant is: Which is the best approach to export a single preset slot from a pattrstorage that has already several preset slots stored.

Now I´m using a second set of parameters inside a sub patcher (lets call them sub-parameters) within a [preset] object, from the main patch I have several [pattr] objects "binding" te main parameters to the sub-parameters so any change on the main parameters reflects on the sub-parameters and viceversa, then when I want to save just a single preset to a .json I trigger a "write" on the [preset] object, and when I try to import I trigger a "read" on the [preset] object. This works perfect for me, anyway I was interested in other users approach. May be it is a simpler way.

Thanks for your answer anyway!

Florent Ghys's icon

Hello,
so there is no way to import/export a single preset slot from a pattrstorage without having to do the workaround GBRAVETTI is describing, right?

gbravetti's icon

So far it worked pretty fine :)

Florent Ghys's icon

thanks, I'll work with your workaround then

Alex_k's icon

Is there a way to load a previously exported preset into an arbitrary slot (e.g. 18)?

Thanks

gbravetti's icon

UPDATE!

I found myself in the need of saving banks or group of presets. So I needed a better approach than the one provided.

My last approach is reading parameters directly from the Pattrstorage and put them on a Coll, then you just save the Coll's file.
When you need to import them, just store the Coll data to the Pattrstorage as single parameters (store "param-name" #preset).
So far it seems to work just fine. Remember to include the preset number when storing params on the Coll, you'll need them later to restore them correctly.

This approach is very flexible, you can even import just selected presets from a Coll file, store them in any place, etc.

Good luck!

Alex_k's icon

@GBRAVETTI
Thank you!

gbravetti's icon

If you need any help with the approach just ask!

Alex_k's icon

@GBRAVETTI
Well, it would be great if you could post an example patch.

Thanks again!

gbravetti's icon
Max Patch
Copy patch and select New From Clipboard in Max.

@ALEX_K
there you go:

rabalder's icon

Nice! Thanks.

S4racen's icon

@GBRAVETTI thank you so much, this was driving me to distraction!!

Doesn't look like you're very active round these parts anymore but please let me know if there's a website I can point people at to say thank you!
Cheers
D

gbravetti's icon

@S4RACEN I thank you for your work on Clyph-X Pro, which I'm using intensively on my upcoming live show, and has proven to be invaluable.