On 15/01/2007, at 14.37, Steffen wrote:


On 15/01/2007, at 11.49, Roman Haefeli wrote:

exactly, and since [wrap~] gives you the difference between the largest integer not exceeding X and X, it will always give you 0, when X is an
integer.

That's how i read it too. But following that: If 0 (zero) is an integer (it normally is, right?), then the largest integer not exceeding 0 is 0, and the difference is 0-0=0. Problem being that wrap~ of the signal 0 gives 1, not 0.

I'd like to know too, as i find the description from the help patch confusing (when the input is integers). As i understand what wrap~ does (again, on the integer domain), it's like a function f: Z -> {0,1} where f(N)=0 and f(Z\N)=1 (where N is the numbers 1,2,3,.. and Z is the numbers ...,-1,0,1,...).

the output of [wrap~] is always => 0 and < 1.

Again, i agree that from the description it would make sense if that intact was the output domain. But it doesn't match the experience using wrap~.

Can someone give an explanation of why wrap~ behaves as it does for 0 and negative integer signals?

If it is meant do behave like it does, i think it would make sense to changed the help patch so it matches the behavior. - As the functionality is described now, i find it expected that it works on signals as wrap from zexy does on the numbers (when wrap from zexy is called without arguments).

That said. Why does wrap~ of fx. the signal -0.99 return 0.00999999? and wrap~ of fx. -5.99 return 0.0100002?



Attachment: wrap~tests.pd
Description: Binary data



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

Reply via email to