[PD] A present

zmoelnig at iem.at zmoelnig at iem.at
Sat Dec 26 12:32:29 CET 2009

Quoting "Matteo Sisti Sette" <matteosistisette at gmail.com>:

> Hi,
> I think I've found out why your game doesn't work for me.
> There is a [wrap -4 4] object somewhere, which I guess is used to  
> wrap the snake's position around the screen.

seems to be zexy's [wrap] which allows you to take 2 arguments to wrap between

> However, [wrap -4 4] behaves exactly the same as [wrap].

seems to be vanilla's [wrap] which ignores all arguments and always  
wraps between [0, 1).

> I have PD Vanilla 0.42.4 and IIRC [wrap] is relatively recent. Maybe  
> there is an abstraction or object in PD Extended older than the  
> introduction of [wrap] in vanilla, and this object accepted creation  
> arguments to change its range? and it is this object you are using?

should be fairly simple to write an abstraction that wraps vanilla's  
[wrap] into the zexy version.

basically you have to do a transformation to map the range -4..4 into  
0..1 for the input of vanilla's [wrap] and the other way round for the  

consult your secondary school's math textbooks for a solution to the problem.


This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1718 bytes
Desc: ?ffentlicher PGP-Schl?ssel
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20091226/e7d42ffb/attachment.key>

More information about the Pd-list mailing list