Split osc message and send it away


    Jun 03 2014 | 8:12 pm
    Im sending messages over as a single string with osc.
    It looks like this:"nx:0.33 ny:0.21614583 l:0.4453125"
    I would like to get the data out of it but so far i have no luck. Either nothing happens, or i get "no such object" or it sends almost the whole string instead of one part.
    I don't want the order to matter so instead of "nx: ny:" it should also be possible to use "ny: nx:". Why else use indices.
    Could someone help? This is what i have so far:

    • Jun 03 2014 | 11:44 pm
      This sounds like a bad OSC namespace to me. But, if you're stuck with it then this might help:
    • Jun 04 2014 | 5:40 am
      I agree with MZED, the OSC addresses don't look right to me. I would expect something more like "/nx 0.33".
      If you can change the source messages to conform with the normal OSC structure you can use [OSC-route] external which is available here: http://cnmat.berkeley.edu/downloads
      If you are stuck with the message you posted this will work:
    • Jun 05 2014 | 12:17 am
      This is more compact:
    • Jun 07 2014 | 9:16 pm
      Thanks for all the help so far.
      I fixed the OSC namespace, now the message gets sended like this:/ny 0.317708 /l 0.082031
      How can i route that? Do i need to substitute that as well? I guess normally you would send it as separate messages but in my case that won't make it easier. I'm sending data over of multiple objects which could add up to around 200 objects (later i will send the id).
    • Jun 07 2014 | 11:29 pm
      You need to combine elements of both of the patches you've posted. The [zl iter 2] object breaks up a long message into a number of messages each with two elements. So in your case, you end up with a bunch of messages which include "osc-address osc-value". This is the sort of message that you can pump through the [OSC-route] object.
    • Jun 07 2014 | 11:55 pm
      Thanks. I almost had that. I only had a regexp : @substitute / inbetween that made it not working. Now i can finally produce sound!! wheeew :)