[PD] Nestable Dictionaries in Pd

Alexandre Torres Porres porres at gmail.com
Wed Sep 8 03:59:06 CEST 2021


there's also one at

https://github.com/porres/Live-Electronics-Tutorial/tree/v1.0-beta-43/Examples/Part.12-Advanced.Pd/37-Data.Structures

but not fully completed yet

Em ter., 7 de set. de 2021 às 18:04, João Pais <jmmmpais at gmail.com>
escreveu:

> you still have my data structures tutorials? that might be easier than
> the documentation.
>
>
> > I’ll give tutorial 4 a go, with the hints of everyone to see how far I
> can go.
> >
> >> On 7 Sep 2021, at 20:34, Miller Puckette <msp at ucsd.edu> wrote:
> >>
> >> The least-horrible way to learn about it is the "4.data.structures"
> tutorial
> >> sequence.
> >>
> >> But the whole idea of hierarchical data structures maps horribly to a
> >> patch language - there needs to be a better way to access 'data' in Pd.
> >>
> >> cheers
> >> M
> >>
> >> On Tue, Sep 07, 2021 at 08:23:58PM +0100, Pierre Alexandre Tremblay
> wrote:
> >>> There are plenty of examples indeed :)
> >>>
> >>> I’ll give struct with text and arrays a fair fight, I find the doc
> especially quite hard to follow for non-graphical usage but it might just
> be me.
> >>>
> >>>
> >>>
> >>>> On 7 Sep 2021, at 19:23, João Pais <jmmmpais at gmail.com> wrote:
> >>>>
> >>>> Does the max documentation of flucoma has concrete examples of what
> you're looking for?
> >>>>
> >>>> There is the purest_json library (which isn't vanilla), but maybe
> with some hacking it might be possible to read files. Not sure about
> writing, but my hacking isn't up to date with the current pd state.
> >>>>
> >>>>
> >>>>> Thanks for the quick reply!
> >>>>>
> >>>>> 2 use-cases.
> >>>>>
> >>>>> 1- we can generate or retrieve a dataset's content to use natively
> in the creative coding environment (Max Pd Sc) so that it integrates in
> other workflows of data mangling and drawing. We already have in our
> dataset object file support and single point entry and query but this allow
> batch dump and load. The structure is:
> >>>>>
> >>>>> {
> >>>>>   "cols" : 3,
> >>>>>   "data" :        {
> >>>>>           "entry-0" : [ -0.06755, 0.44185, -0.33835 ],
> >>>>>           "entry-1" : [ -0.12305, -0.24085, 0.31295 ],
> >>>>>           "entry-2" : [ -0.0595, -0.2881, 0.0597 ]
> >>>>>   }
> >>>>>
> >>>>> }
> >>>>>
> >>>>>
> >>>>> 2- we can retrieve or set the state of a complex objects. Our object
> will spit out its internal status ( for instance, a neural net) and we can
> use the values of its parameters, like below. More interestingly, we can
> also query its structure and use that information too.
> >>>>>
> >>>>> {
> >>>>>   "layers" : [            {
> >>>>>                   "activation" : 3,
> >>>>>                   "biases" : [ -3.076234734727154, 0.772760846709679
> ],
> >>>>>                   "cols" : 2,
> >>>>>                   "rows" : 1,
> >>>>>                   "weights" : [ [ 6.015551733036155,
> -1.826803841455323 ] ]
> >>>>>           }
> >>>>> ,                 {
> >>>>>                   "activation" : 3,
> >>>>>                   "biases" : [ -0.490600074475542 ],
> >>>>>                   "cols" : 1,
> >>>>>                   "rows" : 2,
> >>>>>                   "weights" : [ [ -3.115116035462417 ], [
> -3.969281643687132 ] ]
> >>>>>           }
> >>>>> ]
> >>>>> }
> >>>>>
> >>>>> The key-value nesting is quite powerful for this type of open
> structure...
> >>>>>
> >>>>>> On 7 Sep 2021, at 15:51, Christof Ressi <info at christofressi.com>
> wrote:
> >>>>>>
> >>>>>> Can you give an example of how the data is structured?
> >>>>>>
> >>>>>> In which ways are users supposed to interact with the data?
> >>>>>>
> >>>>>> Christof
> >>>>>>
> >>>>>> On 07.09.2021 16:37, Pierre Alexandre Tremblay wrote:
> >>>>>>> Dear all
> >>>>>>>
> >>>>>>> I am trying to find the most Pd-vanilla-way to interface with our
> Dataset object in the FluCoMa project. In Max and SuperCollider we use
> Dictionaries, which are nestable and queryable in powerful programmatic
> ways, working essentially like interfaces to JSON-like data structures.
> >>>>>>>
> >>>>>>> I’ve looked at [struct] but the [set] object does not allow to do
> symbols and (list of) floats, and [appends] seem to have the same
> limitations. In all cases, I’m not certain it is the best approach in any
> cases to create such a list in Pd...
> >>>>>>>
> >>>>>>> I wonder how people do it and if I am missing an obvious workflow,
> especially with nested structures.
> >>>>>>>
> >>>>>>> Any pointer (pun intended) welcome
> >>>>>>>
> >>>>>>> p
> >>>>>>>
> >>>>>>>
> >>>>>>>
>
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> https://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210907/0256b723/attachment.htm>


More information about the Pd-list mailing list