A pitch with a letter, octave, and accidental.
Pitches are represented as strings in a subset of lilypond pitch notation.
A pitch indicator has three parts: a pitch letter, an optional accidental letter, and an optional octave mark.
sfor sharp, and
nfor natural. If omitted, the actual logical pitch depends on context the pitch appears in.
') or commas (
,), where each apostrophe increases the pitch by an octave, and each comma decreases it. All octave transformations are relative to the octave below middle-C. By extension, the absence of an octave indicator means a pitch is within the octave below middle-C.
(str): A pitch indicator. (see above class documentation).
— A pitch indicator.
— The a-g letter name of the pitch.
AccidentalType or None
— The accidental descriptor.
If no accidental is needed for this pitch (e.g. C-natural in C Major),
this should be left as
— The octave number for the pitch in scientific notation.
octave == 4 corresponds to middle-C.
Descending pitches correspond to lower octave numbers.
— The 0-11 pitch class of this pitch.
— The diatonic degree of the pitch as if it were in C.
— The pitch's staff position relative to middle C.
Values are in numeric pseudo-staff-units where positive values mean positions below middle C, and negative values mean positions above it.
— The string that can be used to recreate this Pitch
Represent the pitch as the code needed to instantiate it
Two Pitches are equal if all of their attributes are equal.
Hash based on the __repr__() of the Pitch.
Pitches with different attributes will have different hashes