[PD] equal tempered scale object available

Miller Puckette mpuckett at man104-1.ucsd.edu
Sat Nov 27 20:48:33 CET 2004


Pd offers a 'div' which should perhaps have been named 'floor'.  It does
'correct' integer division so that Y = X * div(Y,X) + mod(Y,X).

cheers
Miller


On Sat, Nov 27, 2004 at 01:56:18PM -0500, Mathieu Bouchard wrote:
> 
> On Sat, 27 Nov 2004, Frank Barknecht wrote:
> 
> > > (caveat: ideally, % and int would be replaced by mod and floor, but the
> > > latter aren't in pd afaik)
> > "mod" is, AFAIK.
> 
> But there is no trivial way to make a flooring division, which is the
> complementary operation of mod.
> 
> The basic pattern of decomposing X into An+B where A,B are integers and B
> is taken from a finite set, is typically done in two ways, one being done
> with % and / and int, and the other being done with mod and / and floor.
> But floor is missing. If you use mod with int then you are getting results
> not consistent with the usual X=An+B assumption, which is not nice.
> 
> Or is floor available under another name?
> 
> _____________________________________________________________________
> Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
> 
> 
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list




More information about the Pd-list mailing list