[PD] How does vline~ work under the hood?

Matt Barber brbrofsvl at gmail.com
Fri Oct 2 19:44:59 CEST 2015

Pd does the increment and time stuff in double precision. You're likely
losing precision by going with float for everything; if you divide
100/44100 and get a float, and then increment 0 with it 44100 times, you're
not necessarily going to end up with exactly 100 at the end.

See attached.


On Fri, Oct 2, 2015 at 12:44 PM, i go bananas <hard.off at gmail.com> wrote:

> yeah, am considering the option of just manually setting once the ramp
> finishes.  But considering that i'm off by about 0.1% every 44100 samples,
> it's a bit worrying.  Would be ok for synth envelopes, etc...but i'll
> probably want to use this to lookup audio file tables, etc too, in the
> future, so kinda want to get it spot on.
> right now, the performDSP function is literally a single conditional and
> then += increment, which seems nice and lightweight.  i'd like to aim to
> keep it as close to that as possible...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20151002/f0a951c2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: divide-and-increment.pd
Type: application/octet-stream
Size: 590 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20151002/f0a951c2/attachment.obj>

More information about the Pd-list mailing list