hi list, here's an issue I have with OSC:
[send /addr 1000000] | | [sendOSC 1024]
what's transmitted here is not an integer but the string "1e+006"
any workaround to transmit numbers bigger than a million ?
thanks much, Sukandar
Hi Sukandar
[send /addr 1000000] | | [sendOSC 1024]
what's transmitted here is not an integer but the string "1e+006"
any workaround to transmit numbers bigger than a million ?
"1e+006" is a floating point number which represents "1000000" (i.e. 1 with 6 decimal places added). This is how PD normally handles numbers with quite a few places before or after the decimal. If PD is listening on the other side, it will know this. Probably Max too, but I cannot verify. For other apps, you could try converting your number to a symbol first and see if that helps.
derek
Hi Derek, thanks for your reply
"1e+006" is a floating point number which represents "1000000" (i.e. 1 with 6 decimal places added). This is how PD normally handles numbers with quite a few places before or after the decimal.
well, internally a float is a float and should have a 24bit mantissa which should well cover 1000000. My understanding was that the scientific notation would only be used when the number is displayed in one way or the other (e.g. number box or print object)
If PD is listening on the other side, it will know this.
actually no. I tested this with a local loopback:
[dumpOSC 1024] | [OSCroute /addr] | [ \
where the number box complains: "no method for '3e+006'
Probably Max too, but I cannot verify. For other apps, you could try converting your number to a symbol first and see if that helps.
derek
-- derek holzer ::: http://www.umatic.nl ---Oblique Strategy # 88: "Imagine the music as a set of disconnected events"
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Sukandar Kartadinata wrote:
If PD is listening on the other side, it will know this.
actually no. I tested this with a local loopback:
[dumpOSC 1024] | [OSCroute /addr] | [ \
where the number box complains: "no method for '3e+006'
You are absolutely correct. Just tried it myself, as I should have before replying to your post. I assumed the confusion was about the notation, not the object. Looks like a real live problem to me!
d.
The OSC Specification supports 64bit numbers, but they require an "h" type tag to be properly defined. OSCx might not support the 'h' tag, you would have ask the developer.
Some of the software I've seen with OSC support have only partial implementations... Supercollider doesn't support nested bundles. Then again it's not like it needs them.
more info at http://www.cnmat.berkeley.edu/OpenSoundControl/OSC-spec.html
derek holzer wrote:
Sukandar Kartadinata wrote:
If PD is listening on the other side, it will know this.
actually no. I tested this with a local loopback:
[dumpOSC 1024] | [OSCroute /addr] | [ \
where the number box complains: "no method for '3e+006'
You are absolutely correct. Just tried it myself, as I should have before replying to your post. I assumed the confusion was about the notation, not the object. Looks like a real live problem to me!
d.
On Sat, 7 May 2005, brendan wrote:
where the number box complains: "no method for '3e+006'
You are absolutely correct. Just tried it myself, as I should have before replying to your post. I assumed the confusion was about the notation, not the object. Looks like a real live problem to me!
The OSC Specification supports 64bit numbers, but they require an "h" type tag to be properly defined. OSCx might not support the 'h' tag, you would have ask the developer.
What's the link between 3e+006 and 64-bit numbers?
3000000 is representable exactly as both a float32 and an int32 number. For int32 the upper bound is about two billion, and for float32 it's much higher.
,-o---------o---------o---------o-. ,---. irc.freenode.net #dataflow |
| The Diagram is the Program (TM) | | ,-o-------------o--------------o-.
-o--------------o--------------o-' | | Mathieu Bouchard (Montréal QC) | | téléphone: +1.514.383.3801
---' `-o-- http://artengine.ca/matju -'
Mathieu Bouchard wrote:
On Sat, 7 May 2005, brendan wrote:
where the number box complains: "no method for '3e+006'
You are absolutely correct. Just tried it myself, as I should have before replying to your post. I assumed the confusion was about the notation, not the object. Looks like a real live problem to me!
The OSC Specification supports 64bit numbers, but they require an "h" type tag to be properly defined. OSCx might not support the 'h' tag, you would have ask the developer.
What's the link between 3e+006 and 64-bit numbers?
3000000 is representable exactly as both a float32 and an int32 number. For int32 the upper bound is about two billion, and for float32 it's much higher.
,-o---------o---------o---------o-. ,---. irc.freenode.net #dataflow | | The Diagram is the Program (TM) | | ,-o-------------o--------------o-.
-o--------------o--------------o-' | | Mathieu Bouchard (Montréal QC) | | téléphone: +1.514.383.3801
---' `-o-- http://artengine.ca/matju -'
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I just said the first thing I thought of, I'll take more care next time. the upper limit for floats is a lot higher than I thought!
-brendan