This is the music-spelling Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:07:43 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
music-spelling
Automatic pitch and rhythm spelling.
Nuno Trocado
Apache 2.0
0.1
alexandria
(system).
package.lisp
(file).
pitch-spelling.lisp
(file).
rhythm-spelling.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
music-spelling/music-spelling.asd
music-spelling/package.lisp
music-spelling/pitch-spelling.lisp
music-spelling/rhythm-spelling.lisp
music-spelling/music-spelling.asd
music-spelling
(system).
music-spelling/pitch-spelling.lisp
package.lisp
(file).
music-spelling
(system).
*chord-penalties*
(special variable).
*default-parsimony*
(special variable).
*default-penalties*
(special variable).
*natural-parsimony*
(special variable).
accidental
(reader method).
(setf accidental)
(writer method).
letter
(reader method).
(setf letter)
(writer method).
make-parsimony
(function).
make-parsimony-ht-from-notes
(function).
make-penalties
(function).
note
(class).
octave
(reader method).
(setf octave)
(writer method).
pitch-spell
(function).
pitch-spell-chords
(function).
print-object
(method).
rest-p
(function).
%pitch-spell
(function).
abs-interval-in-semitones
(function).
augmented-interval-p
(function).
common-enharmonics-p
(function).
count-accidentals
(function).
count-augmented-intervals
(function).
count-diminished-intervals
(function).
count-double-accidentals
(function).
count-penalties
(function).
diminished-interval-p
(function).
distance-from-major-or-perfect
(function).
funny-interval-p
(function).
interval-in-semitones
(function).
interval-number
(function).
interval-quality
(function).
letter-value
(function).
major-or-perfect-interval-size
(function).
make-chord-penalties
(function).
make-default-penalties
(function).
make-natural-parsimony
(function).
map-product
(function).
note->midi-note-number
(function).
parsimony
(function).
pitch-letter
(type).
pitch-letter-p
(function).
possible-spellings
(function).
score-spelling
(function).
music-spelling/rhythm-spelling.lisp
pitch-spelling.lisp
(file).
music-spelling
(system).
metric-subdivision
(function).
min-subdivision-quantize
(function).
rhythm-spell
(function).
crosses-bars-p
(function).
crosses-beats-p
(function).
dots
(function).
ends-a-beat-p
(function).
int-frac
(function).
post-half-bar
(function).
rest-of-bar
(function).
rest-of-beat
(function).
ties
(function).
Packages are listed by definition order.
music-spelling
common-lisp
.
*chord-penalties*
(special variable).
*default-parsimony*
(special variable).
*default-penalties*
(special variable).
*natural-parsimony*
(special variable).
accidental
(generic reader).
(setf accidental)
(generic writer).
letter
(generic reader).
(setf letter)
(generic writer).
make-parsimony
(function).
make-parsimony-ht-from-notes
(function).
make-penalties
(function).
metric-subdivision
(function).
min-subdivision-quantize
(function).
note
(class).
octave
(generic reader).
(setf octave)
(generic writer).
pitch-spell
(function).
pitch-spell-chords
(function).
rest-p
(function).
rhythm-spell
(function).
%pitch-spell
(function).
abs-interval-in-semitones
(function).
augmented-interval-p
(function).
common-enharmonics-p
(function).
count-accidentals
(function).
count-augmented-intervals
(function).
count-diminished-intervals
(function).
count-double-accidentals
(function).
count-penalties
(function).
crosses-bars-p
(function).
crosses-beats-p
(function).
diminished-interval-p
(function).
distance-from-major-or-perfect
(function).
dots
(function).
ends-a-beat-p
(function).
funny-interval-p
(function).
int-frac
(function).
interval-in-semitones
(function).
interval-number
(function).
interval-quality
(function).
letter-value
(function).
major-or-perfect-interval-size
(function).
make-chord-penalties
(function).
make-default-penalties
(function).
make-natural-parsimony
(function).
map-product
(function).
note->midi-note-number
(function).
parsimony
(function).
pitch-letter
(type).
pitch-letter-p
(function).
possible-spellings
(function).
post-half-bar
(function).
rest-of-bar
(function).
rest-of-beat
(function).
score-spelling
(function).
ties
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Penalties used when spelling chords.
Make a parsimony hash table from LETTER-ACCIDENTAL-PAIRS, each a cons of a ‘pitch-letter’ char and on of :natural, :flat, :sharp, :double-flat or :double-sharp.
Returns a parsimony hash table produced from the accidentals in the list of ‘note’ objects NOTES.
Returns a hash table with the following cumulative penalties used in pitch scoring:
ACCIDENTALS: note is sharp or flat;
AUGMENTED: augmented interval between two consecutive notes;
DIMINISHED: diminished interval between two consecutive notes;
DIRECTION: ascending with flats or descending with sharps;
DOUBLE-ACCIDENTALS: note is double sharp or double flat;
E#-Fb-B#-Cb: specific penalty for these spellings;
OTHER-INTERVALS: intervals between two consecutive notes other than major, minor, perfect, augmented or diminished (e.g. doubly augmented interval);
PARSIMONY: occurrence of an accidental different from previous used ones (or pre-defined on a given parsimony table).
Unsupplied values are taken from DEFAULT.
Penalty values are summed when scoring each spelling try. A lower score is better.
Spell notes in MIDI-NOTE-NUMBERS, a list of midi note values, Returning a list of ‘note’ objects.
For longer sequences, computing the n-fold cartesian product of all spelling possibilites becomes dramatically time-intensive. Therefore, the sequence is split in blocks of SPLIT elements, which are calculated separately. However, maintaining previous choices of accidentals across blocks is preferred (divergences receive the ’parsimony’ penalty). PENALTIES is a hash table with the penalties for various situations, summed when scoring spelling tries (see ‘make-penalties’). PARSIMONY is a hash table with the chars for the letters from ’a’ to ’g’ as keys and their preferred initial spelling (:natural, :sharp, :flat, etc.) as values.
Example:
(pitch-spell ’(48 50 52 53 55 57 59 60 61 64 65 68 69))
–> (#<NOTE C3> #<NOTE D3> #<NOTE E3> #<NOTE F3> #<NOTE G3> #<NOTE A3> #<NOTE B3>
#<NOTE C4> #<NOTE C#4> #<NOTE E4> #<NOTE F4> #<NOTE Ab4> #<NOTE A4>)
Spell chords in CHORD-SEQ, a list of chords, where each chord is a list of midi note values, returning a similarly structured list with the values replaced by ‘note’ objects.
PENALTIES is a hash table with the penalty values for various situations, summed when scoring spelling tries (see ‘make-penalties’). PARSIMONY is a hash table with the chars for the letters from ’a’ to ’g’ as keys and their preferred initial spelling (:natural, :sharp, :flat, etc.) as values.
Example:
(pitch-spell-chords ’((60 64 67) (61 65 68) (62 66 69)))
–> ((#<NOTE C4> #<NOTE E4> #<NOTE G4>) (#<NOTE Db4> #<NOTE F4> #<NOTE Ab4>)
(#<NOTE D4> #<NOTE F#4> #<NOTE A4>))
One of c, d, e, f, g, a or b
music-spelling::pitch-letter
#\c
:letter
Accidentals are :natural, :double-flat, :flat, :sharp, :double-sharp
keyword
:natural
:accidental
The octave. Middle C is on the fourth octave.
integer
4
:octave
Non-collecting version of the function in Alexandria.
Jump to: | %
(
A C D E F G I L M N O P R S T |
---|
Jump to: | %
(
A C D E F G I L M N O P R S T |
---|
Jump to: | *
A L O S |
---|
Jump to: | *
A L O S |
---|
Jump to: | C F M N P R S T |
---|
Jump to: | C F M N P R S T |
---|