Expand description
Pitch construction, spelling and pitch-space helpers.
Structs§
- Accidental
- Symbolic and numerical accidental information for a pitch.
- Accidental
Display Options - The context music21’s
updateAccidentalDisplayreads: the pitches that came before, in this measure and the previous one, the other pitches sounding at the same time, the key signature’s altered pitches, and the cautionary-accidental switches, with music21’s defaults. - Microtone
- A microtonal pitch adjustment measured in cents, optionally shifted by a
harmonic like Python music21’s
music21.pitch.Microtone. - Pitch
- A musical pitch with spelling, octave, accidental and optional microtone.
- Pitch
Class - A normalized pitch-class value.
- Pitch
Options - Builder options for constructing a
Pitch.
Enums§
- Accidental
Attribute - One part of an
Accidental, forAccidental::set_attribute_independently. music21 names the part with a string and raises on any other name; here the three writable parts are the only ones that can be spelled. - Accidental
Specifier - Input accepted by
Accidental::newandAccidental::set. - Microtone
Specifier - Input accepted by
Microtone::newandMicrotone::with_harmonic_shift. - Pitch
Class Specifier - Input accepted by
PitchClass::newand pitch-class builders. - Pitch
Name - Input accepted as a pitch name or pitch-space number.
Constants§
- CHROMATIC_
PITCH_ CLASS_ NAMES - Canonical pitch names for chromatic pitch classes.
Functions§
- convert_
pitch_ class_ to_ str - music21’s
convertPitchClassToStr: an integer pitch class as one character,Afor ten andBfor eleven, reduced modulo twelve first. - dissonance_
score - How awkward a set of pitches reads together: music21’s
_dissonanceScorewith all three of its terms on. It averages a penalty for accidentals beyond one sharp or flat, a penalty growing with the denominator of each pair’s Pythagorean ratio, and a reward for every third and sixth, so thatC E Gscores belowC F- G. - pitch_
class_ name - Returns a canonical pitch name for a chromatic pitch class.
- simplify_
multiple_ enharmonics - Respells a set of pitches so that they read as simply as possible
together: music21’s
simplifyMultipleEnharmonics. The first pitch is kept as written and each of the others may be swapped for a common enharmonic; the spelling chosen is the one the criterion scores lowest, by defaultdissonance_score. Up to four pitches are searched exhaustively, more are settled greedily one at a time, as upstream does. With a key signature the tonic of its major key is placed first as an anchor and removed again afterwards.
Type Aliases§
- Criterion
Function - A scoring function for
simplify_multiple_enharmonics: lower is a simpler spelling.