Damian Stewart wrote:
> hey,
>
> i'm trying to use oscSend to send some numeric data to another application.
>
> basically i've got a float between 0 and 1. the receiving application 
> unpacks the packet, assuming it's a float. the problem is, oscSend packs 0 
> and 1 as an int, but 0.000001 - 0.9999999 as a float. so on the receiving 
> end i have to check if the type is an int or a float and unpack it 
> accordingly.
>
> i assume this is either caused by - the way pd passes around numbers 
> internally, or - the way oscSend interprets incoming numbers.
>
> is there any simple workaround?
>
>   
PD uses floats internally. oscSend tries makes ints out of floats which 
are equal to their integer representation
A simple workaround is to add a tiny offset to the numbers and subtract 
it on the other end.
I think it's better to use the mrpeach osc objects; you can force the 
type of the arguments of [packOSC] to be float.

Martin


_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to