XML serialize spread of data


I am trying to learn a bit more about serialization.
I am able to serialize one instance of my datatype (vec3 + quat) but if I try to serialize pad that has 200 spreads of said datatype, deserializer returns nothing. What am i missing?

I think your error is that you serialize a Spread of kinectInput but deserialize a single instance instead of a spread. Also have a look at the help patch of the Serialize node, you can simply use XMLReader and XMLWriter instead of XDocument/XDeclaration etc. - well except you put them there on purpose.

Thanks! I tried it with forEach, which did not work, but it worked with feeding it into defined pad, which I was missing.

Also, I chose this option because I could not figure out, how to create xml, and then just append data as they are coming in (so I do not have to store them in pad first, and then write contents of the pad) Do you have some pointers for this? I was basically missing how to write into xml without adding header every time. (that is why I was digging through xdeclaration etc.)

and one more thing, after I deserialize the data, I write them into pad, So I have a pad with 300 items. If I want to “playback” the pad, I am just using lfo diong 30cycles per second with getslice, but it is visible on framerate, but it is very light operation imo. Is there a better way to do this?



GetSlice is a very light operation, the expensive part seems to be what you do with the data after the GetSlice.

P.S.: your bang isn’t connected to the IF condition and you don’t need the Switch, you can use the input of the If region to connect you Pad there.

And btw, everything you are doing here seems to be available as a node: Persistent [System.Serialization]
have a look inside to see that data flow.

i am feeding the data as if they were coming from kinect, when kinect is connected its running stable 60 with the same data, when i use getslice with lfo, i get this stuttering

Just to rule it out (poking in the dark as it’s hard to tell from just screenshots of this part …):
do you get the same unstable fps if you close the vl editor window?

Your if-region is a good idea, but you have to actually use it to gain performance

@velcrome I know, i just needed to stop it from executing here

It seems the problem was somewhere in the aether because after restart the performance is stable, thanks