Convert string to number

Jan 22, 2010 at 3:44pm

Convert string to number

I’m a newbie. Receiving data via OSC, I can see it stream into MAX as a Message, but I cannot get this same data to act as a value and drive effects such as crossfades between video. Any help would be appreciated.

#47953
Jan 22, 2010 at 9:36pm

If you’re getting numbers in, and Max is treating them as symbols, you could look to [fromsymbol]. See if the numbers coming out of [fromsymbol] go into a number box without an error, and if so, you’re all set.

#172431
Jan 23, 2010 at 2:37am
#172432
Feb 5, 2010 at 9:22pm

We used the following:
udpreceive -> message -> fromsymbol -> flonum
also udpreceive -> fromsymbol -> flonum

We are not seeing a stream of floating point values in the flonum variable.

What are we doing wrong?

#172433
Feb 5, 2010 at 9:26pm

You’d need to provide more info about the exact contents of the messages you are receiving, as well as any error messages printed to the Max window.

#172434
Feb 5, 2010 at 10:19pm

We are using EYECON to send data to MAX which we receive with udpreceive. we think this data is an osc message.

We see some floating numbers in the object message which we connected to the output of udpreceive. Does the message object just send out whatever data type it gets (osc)? Ideas on handling this? Ideas of things to try?

When we connect the output of udpreceive to flonum we get this error message: flonum doesn’t understand “”

That’s why we tried to convert using fromsymbol

#172435
Feb 5, 2010 at 11:02pm

I found the answer!

Whatever was data was coming from updreceive had to be converted tosymbol and then back fromsymbol before it could be read as a value!

It works now . . .

#172436

You must be logged in to reply to this topic.