< Back to IRCAM Forum

Spat5.osc and nested directories

Hi,

I want my settings organised in nested dictionaries, but I don’t know how to accomplish the redistribution from it other than using iteration which results in many individual messages.

See example patch:


----------begin_max5_patcher----------
1203.3oc6Y0zaiaCD8r8uBBgdz0VTe6dr2JPOr.s2JVDPKwXyMTjBjTNI6h8
+donnkUhkcnWK0sGbPfsEmQb3al2Lbnz2lOyaC+ErzC7af+ALa12lOalYnlA
lYudlWI5kbJRZTyigelu4KdKZEovunLCq.a.zCixpKILJVYtCncPRgQQ8M+q
Aq6oIuVcP0.6nsCodsB2tx71fXa8V.77.e1pRERkuiv19f.mqZ0BFDtLdA.l
lrzeAHXcyEAAK8Aet4V9974Mer31f4WoKE3sChyfAvY1UhyOFiwq6gwvLCRG
YLJ01MdIWlujnvBmiooSDVCBCZPYl+Mg0RrTh1hOErXE3WfNGPiFFjvyBRWH
rwF.FAm1fYkfvTNGMgCCT+KflvHC.xVaBWoSMZvUXVgq3AN9YhV3lD17Ez+1
vaNurDeL7zA3+dGQBdlKdRB1Tq.Brrlpj.BCf.TtBveT+6BxdRQMhBrjb4xC
yCkvv47ZlpOV0tNo1VHEgydXPM9PuY5UyNBhh66thMYyggSE83QAurfj6LeG
lL17i3jTSxcXZK+HYJxGL4zfFfpikHAQuUtq.N9pCgVDE.MHZcxzlfKzKJLX
k.uGK1.VoSPZ3sRtyaHAOSs5vKFRcMrl0l86OIEs0cYHojbLv4MlfgiN+MDZ
.JzjvFGOck2z+ui+L3Oz04poE.7KU5EAfn.Jtoz2RvuqK8o1oqZ8FpN.Iv.b
Yk50AK2E5JOI3GNSHJrGIHJ8mMIHHc76Ay1hRfYS8znofs2DSuxVMSlh1vZK
QGMwMtbs6LEjFNUMV6mMFaMctNq2p6rdUEEQXNyeG21qiiVBS58WbZS+GlpY
o+Oopcxn2VZloxTVvHTz9BoqfF97mZ5iT8WuxT6bEvQctlbNUuUdKcrYU528
ArY4NnWI5bdktcEdsaO7E+.jiXS4MHb8Q2lcBJPJj0SYcUy7rba6nGFVOdaK
KcB5jzIBKPrbyZ2y5NLBoj8XF1576KXGFsmLnj14a0izyJY24jfHhUXFZCEe
NMDbdoj7UqbqXM8oCn85IaHvhTJT9SCL6TLRN.747mPZnVbhji1YkZm9G63z
Kpjn4nMmnPI5Ibc0ICqa2.wJvWZp6To2D24Nl+V2h2JYcEV7m530cpwcpwao
Fa0Q2ZJRbmYbmY7NlAkqAN8S0T485F2YGuicnmESWV2IF2IFusWilGUh.Quy
LtyLN98AuimDsGW7f9fWZVxCZGgfroV095d6eRFb4FbQuyY2bfIApDqvhGNF
b7OUXIpppS77iq.6AMMGex7P4d2aX1bdL5wVjsm9TxqE4GNS2giKBfGOEFVp
HLy6snmRMO5SvwipwEZeT2B5ji75poadE0eroyZM8saI+OvRAihkhbwRqGAK
cvwbYKAGCLk5fkFm3TpKl5fO91LkStuzvQCUPWneva1TgNAqwf+E4R1a7XYI
++SrTnKXJYLrThKXZLH5tUfOIa3J7vaiN5T4vH3n3PybIIKMYTRnSbJK6zzr
1sq0aoq66RZU2XFuRzWZ6tJag4RBq8xXyk5F0HGz27R27Ph7cDktoiZQaGVu
jz9j88J45XGqlXCelNU7LOxYltmBYEx1QZySld92m+ufa2Aqe
-----------end_max5_patcher-----------

Hi Hans,

The problem here is that spat5 does not support nested OSC bundles (this was a design choice, for the sake of simplicity), while your dictionary contains nested dictionaries.
I have now modified spat5.osc.fromdict so that it can ‘somehow’ handled nested dict: on the output, they will be flattened inside a flat OSC bundle.
This is not optimal, but at least it should slightly simplify your workflow (see attached patcher).

Let me know how it goes.
Best,
T.

New build here:
https://filesender.renater.fr/?s=download&token=cf9b9fdf-be3b-4399-874f-1d246c4de77b


----------begin_max5_patcher----------
1357.3oc6Z0sihaCE9Z3ovJpWNEhy+zmgdwJ0dWU0HShGv633DY6vvrq1285
XmDXfDHg0rctfQZHDaGe72474yON784ybVWrGKb.+A3e.yl884yloaptgYM2
OyIGsOkhD5g4jVjmiYRmmL8Iw6k51YXgDmAxHoRRAC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TM5aD7hhbA4aM82zsh9zAzix6nOvhjR
T5q8L6TLRzC7KJdEofZ1Y8bPNKkaUeYaA8hChiTV3yFPN5UbU4YMi2WhXY3K
M0cC4nItScL+ipEmiNv2GTiGTiOPM1nrtUTD+Ay3Ay3Dlgp.dIh9kJp3geiG
riSXGpYQmk0ChwChwGy0nTkRMGQevLdvLNbsU6L4W7Iztu3ScMU5yc9jehP5
JBoGRQto5SQQEOssNMyOSAUcdcUlkgERBqF7riFScQZ0Cp2BbGqfBGgfhrfb
zKV3UDTc45GubJ3Jqt177KP198KZ2eJQ6OB0KLvB5WuUiPRdI1RRWUaZEIMl
cA0GdmEDUb7HPkdAAshntJrrBoHNZTZvXqHK+QIKqHpwrqxJLvfwfoU1PRiR
TVwkObTaqrhjhRFytp3HqHqQfJa3pP6t9pXxVB5pzbaHH+Qfnv6Q3wQI4Srr
VJo.n634K+OHYu6h51c7LpSkr2Yo2pRAVUmhn4o0B0IG8US0HIOoukvL2Fpu
UUXCoc75WSgChmtkHUIoWwMUjrOJvw7nEJAypHM5acl8N5WQCSkCtnD0TAW8
axY9Ol+e.awjsGA
-----------end_max5_patcher-----------
1 Like

Hi Thibaut,

Wow, that was super quick. And it works for my use case. Thanks a lot!!!

Best, Hans.