pitch_of_tone

pitch_of_tone(tone: TonalVector)

The <pitch> of an octave-qualified tone: step, alter, octave. Alterations beyond the semitone window read modulo 12, so C♯ is (C, 1) and C♭ is (C, -1), whatever octave arithmetic produced them.

>>> pitch_of_tone(TonalVector((6, 10, -1)))
('B', -1, 3)
>>> pitch_of_tone(tone_from_pitch("C", -1, 4))
('C', -1, 4)

Raises

Name Type Description
ValueError if the tone has no octave.