[PD] sendOSC: handling big numbers

Sukandar Kartadinata sk at glui.de
Fri Apr 15 23:40:00 CEST 2005


>> 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 ?
>
> If you're willing to lose a small amount of precision (or at least it 
> should be a small amount, who knows given this craziness), you can 
> take the square root before transmitting and square it after 
> receiving. Provided your number is not bigger than one million 
> millions, that should avoid the problem you describe.

nice trick, but I need every single bit as I'm setting mode registers 
in my gluion interface: glui.de/prod/gluion.html (where resources are 
too sparse to assign each bit a separate OSC address)
the obvious workaround for the moment is to send two 16bit numbers 
instead of one 32bit......

>
> ... Jesus, a string?
>
> - John
>





More information about the Pd-list mailing list