[CM] (keynum :through) and (note :through) bug?

Rick Taube taube@uiuc.edu
Thu, 29 Mar 2007 08:37:55 -0500


joshua -- apologies for the delay in this reply but i havent had much  
time to stare at code lately. the behavior you encountered isnt a bug  
but it also isnt much of a feature, its due to a 'floor' like search  
of the mode's legal steps. i could change that behavior but that  
would break existing behavior.

perhaps i could add a :nearest keyword that would look for the  
nearest (rather than the lower) step (?) so you would write:

(note 67 :nearest mymod)

of course if its equidistant to a step above AND below then it still  
might not return the one you want, so ill have to think about how  
best to do this.

On Mar 23, 2007, at 5:29 PM, Joshua Parmenter wrote:

> Hi all...
>
> This doesn't seem like the expected behavior. Is this right? And if  
> it is, does anyone know a way to get the values I'm expecting?
>
> (defvar mymode)
> (setq mymode (new mode :degrees '(c df ef f gs a b c)))
> (note 67 :through mymode); => F ??? shouldn't it be GS?
> (note 67.5 :through mymode) ;=> AF ???
> (keynum 67 :through mymode); => 65 ??? shouldn't it be 68?
> (keynum 67.4 :through mymode) ;=> 65 !!!
> (keynum 67.5 :through mymode) ;=> 68 !!!
>
> Thanks for any help.
>
> Josh
>
> ******************************************
> Joshua Parmenter
> University of Washington
> Center for Digital Arts and Experimental Media
> School of Music
> Seattle, Washington 98195
>
> http://www.realizedsound.net/josh/
> http://www.dxarts.washington.edu
>
>
>