Mercurial > hg > amuse
diff base/generics.lisp @ 86:7a0ee88f1edb
base/: new generics DIATONIC-PITCH-ACCIDENTAL and OCTAVE
darcs-hash:20070717165105-c0ce4-9f6acb06961d3413ceca604ca0285ababcdda377.gz
author | Marcus Pearce <m.pearce@gold.ac.uk> |
---|---|
date | Tue, 17 Jul 2007 17:51:05 +0100 |
parents | 4e1538df0d10 |
children | 0b4c624910f1 |
line wrap: on
line diff
--- a/base/generics.lisp Tue Jul 17 17:49:46 2007 +0100 +++ b/base/generics.lisp Tue Jul 17 17:51:05 2007 +0100 @@ -39,6 +39,16 @@ (defgeneric mips-pitch (pitch-designator)) (defgeneric frequency (object)) ;? +(defgeneric octave (pitch-designator) + (:documentation "Return an integer representing the octave of +pitch-designator where middle c is defined to be the lowest pitch in +octave 4.")) + +(defgeneric diatonic-pitch-accidental (pitch-designator) + (:documentation "Return an integer representing the inflection of a +diatonic pitch where where negative values indicate numbers of flats, +0 indicates natural and positive values indicate numbers of sharps.")) + (defgeneric middle-c (pitch-designator) (:documentation "Returns the value of middle C in the particular representation of pitch used by PITCH-DESIGNATOR."))