string from udprecieve to fromsymbol

Liang's icon

hi there,

i have a questions about how to separate the message from [udpreceive] ,maybe [ fromsymbol ] .
here is a massage send from processing by adding the oscP5 library in processing;

i don't know why message stopped at [fromsymbol] ?

but if i click the message box , it works well, but the message from [ udpprecive ] , i add [t b s ]
to trigger a message sending and after that a bang out signal, it doesn't work.

how to fix this problem ?

thanks a lot

processing code attached.

and simple max code pasted below,

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

`

5236.oscudp.pde
pde
pdelges's icon

udpreceive doesn't output a symbol, but a message. So fromsymbol is quite useless in your case.

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

Generally, OSC messages are parsed with route or CNMAT's OSC-Route, like this:

Liang's icon

@P D, thanx for ur kind help,
actually, i dont know which kind of message [ udpreceive ] put out . maybe it is depend on the sending part ?
in my patch , [route] output a list, and can be recognized by [ fromsymbol ] .
if i use [route s i i i i ] or [route list ] or others , still doesnt work.

and the patch below works well,
can I simplify it? if so, how ?

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

thanx very much

Liang's icon

and this is the snapshot of this patch working

5250.ScreenShot20130322at10.32.38AM.png
png
jvkr's icon

There are a few sources of confusion in your first patch. When the max window prints quotes, that is because of the ". Typically, symbols within quotes will be printed without quotes. Since the message objects obtained its second inlet, very often I see it used in this way: feed stuff to the right inlet, bang message. This is completely redundant and can be omitted. Messages are useful for displaying, but don't interact in any way with data.

Basically a wrong osc string is created. What you have is backslash-quote, label, value, value, backslash-quote. What it should be is slash-label, value, value. The creation of the osc string in processing starts and end with putting the ". I would remove this and instead start with:
OscMessage myMessage = new OscMessage("/test").

But it seems that the second screenshot is based on a different formatting.