OSC-route query

MARTINUKAI 's icon

I am trying to split the incoming messages from a C++ program (openframeWorks/Xcode) from 5 separate indexes (corresponding to 5 finger positions on a ipad) so that index 0 routes all it's info to one stream, index 1 to another and so on...

I have referred to the helpfile and I still cannot figure out how route the indices separately. The incoming messages are not in the standard ***/****/**** format, instead having a /object/ " index: " 0, which is new to me.

Here is a screenshot of the scenario:

Screenshot

I can see that strings are coming through. It's at the point of " index: " where I need to separate them.

Any tips would be a big help :)

Thank you.

Len Richardson's icon

Interesting. What is the OSC-route object? Did you try the normal route object instead?

Max Patch
Copy patch and select New From Clipboard in Max.

mzed's icon

That's not a proper OSC message.

I guess I'd use [zl filter] to take the symbols out, and then route the resulting list based on the index number.

Max Patch
Copy patch and select New From Clipboard in Max.

MARTINUKAI 's icon

I'm not sure. I asked on the facebook group and I was led to believe that the answer may lie in OSC-route.

Basically, I want to split it so that I can tap the messages for each individual index. Maybe I'm missing something fundamental here.

Here is a screenshot of what I mean:

Eg two indices incoming at once. How to split?


Len Richardson's icon

Ok I understand. So i would suggest, you make several instances of route after routing /object/.

Max Patch
Copy patch and select New From Clipboard in Max.

MARTINUKAI 's icon

Thanks LEN. The patch you posted works in isolation. But when I try to apply it to my own with incoming udp messages, no messages come out of the [route 0 1] object.

Here is the whole patch in context, showing what I'm trying to achieve:

Am I doing something really silly here?

MARTINUKAI 's icon

Thanks MZED. I have a similar issue with trying to implement expand your suggestion for my intended purpose with many more that x1 "thing" messages coming in. I'm not sure what to do after [route 0 1].

MARTINUKAI 's icon

By the way, to illustrate my points, I realise that I'm posting screenshots. Let me know if I should post code instead.

Len Richardson's icon

Try with:
[route " index: "]
Looks like there are two spaces prior to the word index.

Len Richardson's icon

And finally one other solution you could put right after your udpreceive object. This converts all symbol-strings in the incoming message

Max Patch
Copy patch and select New From Clipboard in Max.

MARTINUKAI 's icon

Len, indeed you are correct. Very hard to spot that there is actually 2 spaces (I don't know why) there. I should have trouble shooted it more. Thanks so much for you help. Thank you also, MZED :)