automuse.chord package

Submodules

automuse.chord.counted module

Utilities that construct chords by counting intervals.

automuse.chord.counted.count_triad_major(root: str) list[str][source]
automuse.chord.counted.count_triad_minor(root: str) list[str][source]
automuse.chord.counted.count_triad_augmented(root: str) list[str][source]
automuse.chord.counted.count_triad_diminished(root: str) list[str][source]
automuse.chord.counted.count_seventh_dominant(root: str) list[str][source]
automuse.chord.counted.count_seventh_major(root: str) list[str][source]
automuse.chord.counted.count_seventh_minor(root: str) list[str][source]
automuse.chord.counted.count_seventh_half_diminished(root: str) list[str][source]
automuse.chord.counted.count_seventh_diminished(root: str) list[str][source]
automuse.chord.counted.count_seventh_minor_major(root: str) list[str][source]
automuse.chord.counted.count_seventh_augmented_major(root: str) list[str][source]
automuse.chord.counted.count_seventh_augmented_minor(root: str) list[str][source]

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.

automuse.chord.rewop(root: str) list[str][source]

Inverse of power(). Useful for, for example, adding bass to a note.

automuse.chord.name_chord(tonic: str, mode_name: str, order: int, chord_type: Literal['triad'] | Literal['seventh'], inversion: int, seventh_type: Literal['major'] | Literal['minor'] | Literal['augmented'] | Literal['diminished'] | None = None, include_tonic: bool = True) str[source]