cnmat udp-read object - passing a port number as an argument

monged's icon

Sorry, I accidentally replied to another post.
Reposting under new topic...

B.

--------

Hi,

I am using the CNMAT udp-read object (http://www.cnmat.berkeley.edu/MAX)
and would like to set the port number with a loadbang-triggered message,
rather
than hard-coding it into a heavily-buried subpatch.

The object's inlet reads 'Set the UDP port on this inlet' but I'm not sure
how
pass the port number. I tried giving it an int but it says
'udp-read: doesn't understand "int"'

The help patch doesn't show how to do this... it must be pretty
straightforward
but I'm stuck. Any tips would be gratefully appreciated.

It's also quite possible that I'm hitting one of many blind spots in my
Maxing
abilities, in which case I plead for your collective mercy. :)

Brian

mzed's icon

I'm not at a PC right now to check, but the Mac version (otudp) understands a "receiveport" message. Like:

"receiveport 12345"

Does that work for you?

mz

monged's icon

Yes!

That would make sense since udp-read and udp-write are based on otudp.

Thanks a million!