music.chord¶
- music.chord(name='major', root=0)[source]¶
The semitones of a named chord, counted from root.
- Parameters:
- name
str One of
CHORDS: the four triads or the six tetrads.- root
integer Semitones to shift the whole chord by.
- name
- Returns:
tupleofintegersThe chord’s notes, in ascending order.
- Raises:
ValueErrorIf name is not a chord this module knows.
- Parameters:
- Return type:
See also
add_seventhbuilds a tetrad from a triad, as the article describes.
invertmoves a note by an octave, for inversions and open positions.
Examples
>>> chord('major') (0, 4, 7) >>> chord('minor seventh', root=3) (3, 6, 10, 13)