[PD] add or subtract value every N ms?

Frank Barknecht fbar at footils.org
Fri Jul 27 07:59:36 CEST 2007


Hallo,
Andy Farnell hat gesagt: // Andy Farnell wrote:

> But this is better :) If the limiter is on the output then the counter continues
> beyond the 0-127 range and goes out of bounds. Putting [clip] (same as min and
> max together) inside the counter locks the value in range.
> 
> What's the best solution to prevent overshoot? I did solve this once before
> but it used spigots and was ugly imo. 

It's possible even simpler: Instead of a classical counter you can use
an accumulator, which is a similar idiom, but has  [f ] and [+ ]
reversed: [+ ]x[f ]. Then you send the step size instead of a bang into the [+].

The restrict it with [clip] as you would restrict a normal counter with
[mod]. It's attached.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: left-right.pd
Type: application/puredata
Size: 422 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070727/a19e34c3/attachment.bin>


More information about the Pd-list mailing list