passing a float threw osc
Up to Bugs, Known Issues, & Requests
Hello I'm trying to get a float passed from the OSC to my application on the make board.
I'm sending a value like "/subsytem/Value 0.01" and I can't get it to pass in correctly.
I'm trying to use count = Osc_ExtractData( typedata, "f", &fValue);
this works fine when I send integer values, but the decimal values get hozed when I try to see them again.
Initially the default value is 0.001 and that shows up fine via the OSC request. When I send a "/subsytem/Value 0.001" then ask for what was set I receive a "1.6495e-33". the same thing happens when I send a "/subsytem/Value 1.1". Negative integers work fine.
Am I missing something in the Osc_ExtractData() function, maybe in the formatting field? I searched for other examples in code, but didn't run across any. The closest I found is the network address set which just passes the string down then parses it. I'm not sure if I'm missing something or if something is broken.
Thanks in advance for any assistance.
Ryan
Sure, see http://pastie.org/282395
It's a simplified version that should show you my problem
Thank you,
Ryan
Although the link below does not give specific syntax on how to pass a float they do give examples and provide the bytes in hex that should be sent. In particular, this cite showed me that you had to pad integers with leading nulls.
http://opensoundcontrol.org/spec-1_0-examples#OSCstrings
hth,
Forrest

