Returns the note name of freq, which can be a
note, keynum, Hertz value or list of the same.
If :in is specified it sets the scale for resolving a note or keynum freq.
:in defaults to the global variable
*scale*, which is initially set to the standard chromatic scale.
If :from or :to is specified then note converts freq
from or to its equivalent position in the specified scales. See the section
Converting Notes and Keynums Between Scales
for more information.
Use :accidental to specify a particular spelling for the note returned
by the function if more than one note is defined on the
scale degree. If :accidental is not specified then the note
entry in the first position of the scale degree is returned.
The value of :accidental may also be a list of accidentals, in which case
it represents a "preference ordering" for the possible notes to return.
A nil value in the accidental preference list selects a note
with no accidental.
The read macro #n provides a shorthand for converting keynums to notes.
Example:
? (note 60)
c4
? (note 60 :accidental 's)
BS3
? (note 'bs3 :accidental 'ff)
DFF4
? (note '(c4 d e1 f g5 ef f))
(C4 D4 E1 F1 G5 EF5 F5)
? (loop for k from 60 to 67 collect (note k :accidental '(nil s)))
(C4 CS4 D4 DS4 E4 F4 FS4 G4)
? #n60
C4