[PD] bug in maxlib/scale

Roman Haefeli reduzierer at yahoo.de
Fri Apr 23 15:42:46 CEST 2010


On Fri, 2010-04-23 at 13:36 +0300, João Pais wrote:
> is the formula somewhere? I found a parcial one by frank, but didn't  
> really work. and now I'm too busy to be chasing this.

I don't know "the" formula, but I did it by putting two
"Dreisätze" (rules of three?) in a row: 
The first scales the input to 0-1, the second scales 0-1 to the output
range. If written out as a formula, this could probably even made
shorter, I don't know.

Check the attached scale_abs.pd
(It lacks the log/lin switch feature, though).

Roman

P.S.: [maxlib/scale] seems to apply correct formulas, but the
initialization seems to be buggy. After manually setting the ranges, it
outputs correct values.


> > On Fri, 2010-04-23 at 13:12 +0300, João Pais wrote:
> >> Hi,
> >>
> >> I think I found a bug in maxlib/scale. Unless the order of the  
> >> parameters
> >> is aligned - smaller value as smaller input/output and bigger value for
> >> input/output -, the external doesn't work properly. Is this normal or
> >> desired? I always thought that the parameter order would be
> >> interchangeable without problems.
> >>
> >> Here's a patch to illustrate it:
> >
> > Indeed, very wrong.
> >
> > Unfortunately, from what I know maxlib is not maintained anymore by its
> > original author (probably it can be considered 'community-maintained').
> > And since this can be nicely written as an abstraction, I'd say  that
> > the buggy external version should be avoided.
> >
> > Roman
> >
> >
> >
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_maxlib_scale.pd
Type: text/x-puredata
Size: 2397 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100423/6ac30120/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scale_abs.pd
Type: text/x-puredata
Size: 1260 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100423/6ac30120/attachment-0001.bin>


More information about the Pd-list mailing list