automuse.chord package
Submodules
automuse.chord.counted module
Utilities that construct chords by counting intervals.
Module contents
Utilities that construct chords.
- automuse.chord.chord(tonic: str, mode: list[int], order: int = 0, add: int | list[int] | None = None, sus: int | list[int] | None = None, sharp: int | list[int] | None = None, flat: int | list[int] | None = None, raw_offsets: str | list[str] | None = None) list[str][source]
Construct a chord from a scale. Construct a triad by default.
- Parameters:
tonic – Root of the chord.
mode – Mode of the chord, for example
modes.MAJOR.order – Order of the chord, for example 1 for \(\text{I}\).
add – Scale degrees to add, 0 indexed.
sus – Scale degrees to remove, 0 indexed.
sharp – Scale degrees to add then raise by one semitone.
flat – Scale degrees to add then lower by one semitone.
raw_offsets – Extra notes to add to the chord, specified as semitone offsets from the tonic. Last resort.
order – Order of scale. For example, 0 means \(\text{I}\) and 1 means \(\text{II}\)
- automuse.chord.seventh(tonic: str, mode: list[int], type: Literal['major'] | Literal['minor'] | Literal['augmented'] | Literal['diminished'] | None = None, add: int | list[int] | None = None, sus: int | list[int] | None = None, sharp: int | list[int] | None = None, flat: int | list[int] | None = None, raw_offsets: str | list[str] | None = None, order: int = 0) list[str][source]
Construct a seventh chord from a scale. Can add custom \(\hat{7}\)s.
See
chord()for parameters.
- automuse.chord.neapolitan_chord(tonic: str, intervals: list[int]) list[str][source]
Construct a Neapolitan chord from a scale.
- automuse.chord.power(root: str) list[str][source]
Construct the power chord of
root.A power chord has no major and minor qualities, because it always consists of the root and a perfect fifth.