- [Function]
-
(notefreq {keyword value}*)
Returns the note name of freq, which can be a note name, key number, Hertz value or list of the same.
note supports the following keyword arguments:
:hzboolean- If true then a numerical freq is interpreted as a Hertz value rather than as a key number.
:in{ tuning | mode}-
The tuning or mode to return the note from. The default value is
*scale*. If a mode is specified then freq must be a modal key number. :in?{ tuning | mode}- Tests if freq references a note name in the specified tuning or mode. Returns the note name or false.
:throughmode- Filters freq through mode and returns the closest note.
Examples:
Example 1. Converting key numbers and Hertz values to notes.
(note 440 :hz #t) ⇒ a4 (note 60) ⇒ c4 (note '(c4 d e1 f g5 ef f)) ⇒ (c4 d4 e1 f1 g5 ef5 f5)
Example 2. Modes and notes.
(define octatonic (new mode :notes '(c d ef f fs gs a b c))) (note 'cs4 :in? octatonic) ⇒ #f (note 'ef4 :in? octatonic) ⇒ ef4 (loop for k from 35 repeat 8 collect (note k :in octatonic)) ⇒ (c4 d4 ef4 f4 g4 af4 bf4 c5) (loop repeat 10 for n = (between 60 72) collect (note n :through octatonic)) ⇒ (af4 f4 d4 af4 c4 c4 af4 c4 bf4 c4)
See also:
hertz[Function]invert[Function]keynum[Function]note-accidental[Function]note-name[Function]octave-number[Function]pitch-class[Function]prime-form[Function]scale-max[Function]scale-min[Function]scale-mod[Function]scale-order[Function]scale<[Function]scale<=[Function]scale=[Function]scale>[Function]scale>=[Function]transpose[Function]