[CM] cmn's iratify

Bill Schottstaedt bil@ccrma.Stanford.EDU
Wed, 18 Jan 2006 06:19:03 -0800


cmn's iratify stops searching for a ratio (it uses continued fractions,
so it's very fast) when the error is less than "smallest-note" --
in this case smallest-note is .015 so

* (- (* .125 9) (/ 10 9))

0.013888836

If you set smallest-note smaller (say .001) you'll get 9/8:

* (setf smallest-note .001)

0.001
* (iratify (* .125 9))

9/8

If I remember right, this part of cmn is trying to simplify incoming notelist
data, so it's very hard to decide what the right thing is for all cases.