alternatives to (un)pack
Is there some neater way to do this?
To be specific, I'm trying to split a test string and 32 floats while keeping the floats together and in order. Surely there's a better way than the above mess?
Thanks much
Joe
In your example, are you always dealing with a list comprising a single symbol followed by n (32 in your case) floats?
[zl slice 1]
Will do the trick
[edit willyc beat me by a minute, but only because I provided an example :-) ]
They say a patch is worth a thousand words....
Awesome, thanks!
also, in the case of OSC, a structure like this can help keep your hierarchy of incoming messages intact over time, as the number of inputs grows:
Wittenberg
Sorry, I'm confused about what this does
Thanks
Joe
It strips away / and makes it a space instead, so you can use a normal [route] object to parse the message.
But again, this was in the case of OSC - if you're not using that then just ignore it.
Oh, that's what cnmat oscroute is for - do you know it?
yes, and I'm using regexp instead :)
and there's jmod.oscroute too, which is nice as well.