Number to String Problem??

Apr 1, 2009 at 2:27pm

Number to String Problem??

Hi there i’ve made a very small patch in MAX using the udpreceive option. With this I receive one value from eyesweb via OSC. When I want to connect the outcome of the udpreceive field to a number field it says “Dont understand “”" in the Max window? What is the problem. I think the number is not seen as a number but as a string but how can I convert this????
Thanks in Advance

#43143
Apr 1, 2009 at 4:53pm

It looks like the “” is an empty string rather than a number, which is a bit odd. Hook in a [print] to see the exact message you are getting. Two useful objects you might also want to look at are [fromsymbol] and [tosymbol].

lh

#154687
Apr 2, 2009 at 4:01pm

well it’s not an empty string if i use the print option it show numbers but when I connect it to the number-field it gives an error. see images

#154688
Apr 2, 2009 at 4:49pm

fromsymbol?

_
johan

#154689
Apr 3, 2009 at 1:21pm

Consider that, if udpreceive is sending out an empty string as part the UDP package, you’re not going to see it in the Max window, are you? Even single blank characters are easy to overlook (particularly in your screen shot).

I’d suggest inserting a [route i] object between udpreceive and your numbox.

For better analysis of what’s going on, you might want to pass udprecieve’s output through spell or atoi. The fromsymbol suggestion may also be helpful.

#154690

You must be logged in to reply to this topic.