[PD] Floats and negative numbers over OSC

PSPunch shima at pspunch.com
Sun Jan 31 12:38:18 CET 2010


Hi Martin,


Thank you for your response.

I am attaching the patch used to produce the following results.

This was tested on
Pd version 0.41.4-extended,
running on WinXP SP3.


The OSC data were sent by GlovePIE running the following code.

-------
SendOSC("127.0.0.1", 9997, "/test", 0)
wait 1 second
SendOSC("127.0.0.1", 9997, "/test", 1.5)
wait 1 second
SendOSC("127.0.0.1", 9997, "/test", -1)
wait 1 second
-------




I was expecting [routeOSC] to output 0, 1.5, -1.


--- Output ---

raw: 47 116 101 115 116 0 0 0 44 105 0 0 0 0 0 0
unpacked: /test 0
routed: 0

raw: 47 116 101 115 116 0 0 0 44 102 0 0 63 63 0 0
unpacked: /test 0.746094
routed: 0.746094

raw: 47 116 101 115 116 0 0 0 44 105 0 0 63 63 63 63
unpacked: /test 1.06111e+009
routed: 1.06111e+009



Thank you again for your help.

-- 
David Shimamoto




> PSPunch wrote:
>>
>> Hi Calude,
>>
>>
>> > I don't know if mrpeach osc and net objects work on Windows, but if
>> they
>> > do they should be preferred to the OSCx objects.
>> > (snip)
>> > OSCx library is old, buggy, unmaintained, broken
>>
>> I've tried the two libraries prior to my post.
>> They both work well on Windows to the extent that I saw neither having
>> disadvantages over the other.
>>
>>
>> A problem I see commonly among the two mentioned sets of libraries is
>> that they output incorrect values when receiving float or negatives.
>> Integers and zero are fine.
>
> Recent versions of [packOSC] and [unpackOSC] should work properly.
> If not, please post some examples.
>
> Martin
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: routeOSC-test.pd
Type: application/puredata
Size: 311 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100131/837f0503/attachment.bin>


More information about the Pd-list mailing list