Is there a convenient way to reformat, for instance, a 1x50 table into a 5x10 table?
I’m taking in OSC data for an arbitrary number of tracked objects, all of which come in together in a single string. Each object has five attributes/values, but the input string has no delimiters. So a string with 50 values represents 10 tracks and looks like, for instance:
1 3.988 2.123 5.725 1.000 2 5.152 7.152 9.028 1.000 etc
I can parse the string into a table using a CHOPto DAT, but it’s just 50 columns and one row.
How can I reformat a table by splitting every N cells into a new row?
I’m looking into parsing the raw OSC data in Python, but it would be really nice to do this all with nodes. Ultimately I need to be able to send a table out to a replicator, so I can have each tracked object (however many there happen to be at a given moment) represented on screen.
UPDATE:
I would still love to be able to do this as nodes, but in the mean time, here’s the python script I’m using. I have no idea whether or not I’m being terribly inefficient, but this is running inside an Execute DAT. It reads in values from an OSCIn DAT, and writes out values to a Text DAT. The Text DAT then feeds into a Convert DAT, which in turn drives my Replicator Comp:
AAAAAAaaaaaahahahahaa oh man, that’s exactly what I needed.
And I only lost three hours learning to use Python (but that’s a good thing to have done anyway).
I have one more question now that I’ve come this far, but I’ll start a new post for it.