How do I receive a message via OSC in max?
I'm having problems receiving messages in OSC can anyone help me out here? I have absolutely no problem in sending them, but I can't receive them!
Thanks,
Rhys
Quote: Dr. Spankenstein wrote on Mon, 18 February 2008 11:51
----------------------------------------------------
> I'm having problems receiving messages in OSC can anyone help me out here?
Hmmm, are those OpenSoundControl objects needed? I haven't used OSC extensively, but I think for simple cases like this you can just do this:
I am using only udpsend and udpreceive and it works fine.
On 2/18/08 4:58 PM, "Adam Murray" wrote:
>
> Quote: Dr. Spankenstein wrote on Mon, 18 February 2008 11:51
> ----------------------------------------------------
>> I'm having problems receiving messages in OSC can anyone help me out here?
>
> Hmmm, are those OpenSoundControl objects needed? I haven't used OSC
> extensively, but I think for simple cases like this you can just do this:
>
> #P window linecount 1;
> #P newex 325 143 57 196617 OSC-route;
> #P newex 223 110 71 196617 route /Float1;
> #P flonum 223 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 53 87 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 223 82 91 196617 udpreceive 6449;
> #P newex 53 134 115 196617 udpsend localhost 6449;
> #P message 53 110 64 196617 /Float1 $1;
> #P window linecount 2;
> #P comment 316 112 121 196617 for more flexible routing , try OSC-route;
> #P connect 4 0 1 0;
> #P connect 3 0 6 0;
> #P connect 6 0 5 0;
> #P connect 1 0 2 0;
>
>
> --
> Adam Murray
> compusition.com
Cheers
Gary Lee Nelson
Oberlin College
www.timara.oberlin.edu/GaryLeeNelson
I'm sending the OSC message from another programme outside Max.
I didn't think that would work with UDPReceive? Sending the message to this other programme via OSC works but receiving one is another perplexing matter.
Rhys
yeah, i messed around for awhile with the OSC object and couldn't get it to work. seems like it's been broken somewhere along the way. although if you connect one OSC output to the other input, it works fine, so i'm not sure.
if i remember correctly, i was able to easily pass messages from max through OSC to another application, but i was never successful doing the opposite.
i second just trying to roll your own message protocol.
-rob
The only experience I've had with OSC is using a lemur. I used the
UDPReceiver object in Max and it worked fine, I just had to do a few
experiments to figure out how to parse the data coming in with routes and
unpacks. If you don't want to fill up the Max window with "Print" data,
simply create a long message box, put the output from udpreceive into it
through a "prepend set" object.
Here's an example:
On 19/02/2008, Robert Ramirez wrote:
>
>
> yeah, i messed around for awhile with the OSC object and couldn't get it
> to work. seems like it's been broken somewhere along the way. although if
> you connect one OSC output to the other input, it works fine, so i'm not
> sure.
>
> if i remember correctly, i was able to easily pass messages from max
> through OSC to another application, but i was never successful doing the
> opposite.
>
> i second just trying to roll your own message protocol.
>
> -rob
>
Quote: robtherich wrote on Mon, 18 February 2008 19:34
----------------------------------------------------
> yeah, i messed around for awhile with the OSC object and couldn't get it to work.
Read the patcher "cnmat_compatibility" in the udpreceive help patch. udpreceive needs another argument, like:
mz
aha!
many thanks for that pointer.
So besides the support for time tags, is there any reason I'd want to use the OpenSoundControl object on the receiving end?
On the sending side I see a couple more reasons to use this object: the sprintf-like features, and support for nested bundles (although Max flattens out nested bundle structure when receiving OSC).
Quote: robtherich wrote on Tue, 19 February 2008 21:33
----------------------------------------------------
> aha!
> many thanks for that pointer.
----------------------------------------------------
I second that.
Thanks mzed!
Quote: Adam Murray wrote on Wed, 20 February 2008 08:43
----------------------------------------------------
> So besides the support for time tags, is there any reason I'd want to use the OpenSoundControl object on the receiving end?
>
> On the sending side I see a couple more reasons to use this object: the sprintf-like features, and support for nested bundles (although Max flattens out nested bundle structure when receiving OSC).
>
>
----------------------------------------------------
What the udpsend object sends out does not comply with the OSC standard. Even when sending between applications strings that have the appearance of an OSC string, is working fine. Looking at the actual data shows that the content of the package has nothing to do with OSC. Depending on the method of dealing with incoming data and string recognition, specific hardware might not or will not understand such messages.
On the receiving end however their seems to be no difference indeed.
_
johan