[PD] counter question
Frank Barknecht
fbar at footils.org
Thu Jul 26 22:51:18 CEST 2007
Hallo,
martin.peach at sympatico.ca hat gesagt: // martin.peach at sympatico.ca wrote:
> Derek Holzer wrote:
> > If I use a simple counter structure that continues to generate a number
> > from [f] & [+1] at every bang, and use [mod] to keep that number within
> > certain bounds, then eventually it will require more and more memory to
> > hold the number coming from [f], right? Is this a potential memory leak,
> > or is there a cap to how much memory it will hold?
>
> A float always uses 4 bytes. When the number gets too big, mod won't work properly because the number it's working on won't be accurate. It won't ever use any more memory.
> But if you use the output of [mod] to reset the float, it will never be a problem because the float will never get larger than the output of [mod].
Attached are three variants of the mod-counter. I think, the last one
is the best.
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: one-two-three.pd
Type: application/puredata
Size: 1032 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070726/5deefc0a/attachment.bin>
More information about the Pd-list
mailing list