< Back to IRCAM Forum

Spat and pattrstorage system

I have been trying to implement spat5 into my pattrstorage system but so far it is not working. Am I missing something or simply spat5 is not designed to work with pattrstorage (if this is correct… too bad!)?
I know snapshots work, but how can I call those from outside spat5.oper? Maybe this way I can link it to my pattrstorage system.
What are other ways to save presets? Documentation is not very helpful on this topic.
Best,
JM

Hi JM,
I’m aware of these issues, and I’m sorry for the inconvenience.
Proper pattr support (along with improved documentation) is ready for the next release (currently under tests).
This should hopefully ship next week.
Best,
T.

Hi Thibault,
I have ran into the same issue with pattrstorage again. I can store 1 preset in a json file, which allows me to use it when loading it, but it doesn’t seem possible to recall more than one preset.
Has this issue been dealt with?
Many thanks
Coralie

Hi Coralie,

Have you looked at “spat5.tuto-osc-2.maxpat”, tab “pattr” ?
Annoyingly, you need to send the “/pattr/store” message before storing the preset; other than that, I believe things should work. Otherwise, feel free to send me additional information.

Best,
T.

Hi Thibault,
My mistake, I had suppressed the viewer from my patch.I am in parallel using spat5.oper.
Will there a possible conflict between both objects?
Thanks!

No, there should be no conflict between objects.
But you need to send the “/pattr/store” message to all (spat5) objects that you want to pattr-ize.

1 Like

Doesn’t seem to work with ircamverb
spat5.ircamverb~: error occurred when processing “/pattr/store”. Reason: unsupported message ?

Apparently ircamverb~ has issues or specificities I haven’t yet understood concerning pattr.

spat5.ircamverb~: error occurred when processing “/panning/type “vbap””. Reason: unsupported message ?
spat5.ircamverb~: error occurred when processing “/early/shape 0.5”. Reason: unsupported message ?
spat5.ircamverb~: error occurred when processing “/early/delays 20.9 28.2344 32.1091 39.1612 50.3449 57.8039 66.3671 77.3”. Reason: unsupported message ?
spat5.ircamverb~: error occurred when processing “/cluster/delays 48.7 70.3814 80.2798 97.3786 123.052 139.532 157.992 181.0”. Reason: unsupported message ?
spat5.ircamverb~: error occurred when processing “/reverb/delays 162.9 191.347 203.728 224.775 255.852 275.566 297.484 324.6”. Reason: unsupported message ?

Hi Roland,

In spat, pattr is supported only by GUI objects.
So, you should pattr-ize spat5.ircamverb rather than spat5.ircamverb~.
Let us know if this makes sense for you.

Best,
T.

1 Like

Hi Thibaut,
I’m just working on my Spat system to see which is the best way to store the spat5.oper states. I’ve done a simple working system with snapshots that allows me to filter out all the “parasite” parameters during performances (the window states, zoom and source focus, etc.).
Now, I’m am also testing a system based on pattrstorage to see if it’s better or not. I’ve seen that the spat5.oper is stored as a dictionary and I have two questions:

  1. How can I read/access the content of the dictionary (I’ve tried to use spat5.from.dict or to.dict…or collect but perhaps I’ve not understood the format)?

  2. I remember all the problems using pattrstorage in the “old spat4 times”, when recalling presets from a new incremental version of Spat. As you know, the parameters where stored as a big list and if the new sub-version added new parameters, the presets were simply not recalled because the list was of a different length. The spat told something list "Received 401 atoms while expecting 405)…So, my question: is it reliable to use pattrstorage with spat5, or will there be such problems with future incremental uptates that you would rather recommend using spat’s native presets and snapshots?

Thanks!

Hi Lorenzo,

I presume you had a look at “spat5.tuto-osc-2.maxpat” already.
The internal state of spat5 object is represented as an OSC bundle. When using pattrstorage, this OSC bundle is converted to a Max dictionary (similar to what spat5.osc.todict does).
So, basically this is equivalent to dumping the state, and storing it into a dict (as demonstrated in “spat5.tuto-dump-1.maxpat”)
Now, I dont know how to access the dictionary inside pattrstorage. This is more of a Max question, and maybe you could find info on Cycling’ forum ?
Yet, if you open your maxpat inside a text editor, you will actually see the content of the dict in the pattrstorage.

As the dict/pattr is only just another representation of OSC bundle, I believe this is a stable way to store data (does not suffer the issues we had in spat4). That should be future proof.

The main “issue” with Max pattr and M4L snapshots is that they want to store the whole state of the object whenever one parameter is changed. For spat objects that typically have hundreds or thousands of parameters, this appears extremely inefficient and impractical. Therefore the “/pattr/store” workaround which seems to work OK, but is also not super elegant/user friendly.

Hope this helps,
T.

Hi Thibaut,
yes, I saw the “spat5.tuto-osc-2.maxpat” already.
In the pasted patch, a way to display the content of spat5.oper dictionaries stored in a pattrstorage (try to memorize 2 pattrstorage slots and view their content with the dump message).
Since the presets are stored in the dictionaries embedded into the pattrstorage, the user cannot filter out the window state, position, dimension and the “focus” parameter, so for my personal practice the best way is using the spat snapshots…:


----------begin_max5_patcher----------
3577.3ocyb0zbiiaD873eErTkidjI5lfejSaRNjiIUxwMaMEDErE1ghTKIk8
3Yq8+d..onHkHH.orlDWkksX2.n6F86A.RP76O7oUaJ9FuZk2e16m89zm98G
9zmzWRcgO098OsZO6aoYrJsZqRK1ummWu5wFY07uUqudUcQI2qpXO26PIuhW
WcRkLQNOs3XtVOn8hhs5RUr4W+LAOoY9w8h7LUQkxHsWbywMax38uhTshi0m
zyu8pGX0o6D4u7kRdZciGE36u1+QO.WSezKFT+Ohq889EUI9iGdP8wi2neKa
MVVlGq0qWMvpqDa4F75j6kSCzPkiRIJmNJV6zQKzoy4uIs0q74ZOg2Sxltt7
Ic29pqcuvIcugNyonSykpe+.uwSVITwauUCZJuewrqiA596P8mQ59av+Ct+N
MSj9Uu5BuWE727p2w81JRq8RKxq6o9n47McpGJDMWlr120jERv8JagzDrBP0
mIM+e7RyVNteCubjjABLo4efUx1yq4kegmyZcD+4konRS1vxeYxzCHx+rWR8
uozCy9p++W3qsPA7ivW2yqpXuvMP4+mHiDEhFMH.i5nDiNpCNXaJazs0YNNM
WVAaqx281db+gQbRbFbbKyIAM8MU6cwz6Vmn75uIx2V71HNI8t2SRvd8jwj6
hWJYskryFcxf6tSR64iQj6Q1Zozf3d+aYaOFqzb.jSx73fWRhaRaiuetoADI
g7izMabvP7tjwZvCiu6Yp.zKUECuG8gpYLMVu2L7s.S9lptEE4rx20ciO5b2
IPhaGqjdxiaKRE6U91uHsPYI9hZpnhMxbvpV+t0w+zJtbFAa6Md9jC12W3d1
gCch0R0g44FrUd9Z0rRGIzByXnJeqQpfFjcT629XxNdkUlKCHZI+S8Zo9bkz
D9r1s919rqxhzqJnc3KuwJg2Oo541Wrk6Ad+T5N4blZ9FoeckVjUT13dZ+47
Gjd4.8GQzx5UeoWMRZqmyezUiOKWwPk36MSa2es+jP3AFYvim9H95prKF9WJ
ErLu+ZQ11U2vHVsCNij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