mingus.core.keys¶
Module for dealing with keys.
This module provides a simple interface for dealing with keys.
-
mingus.core.keys.
base_scale
¶ Attribute of type: list
['C', 'D', 'E', 'F', 'G', 'A', 'B']
-
mingus.core.keys.
couple
¶ Attribute of type: tuple
('C#', 'a#')
-
mingus.core.keys.
keys
¶ Attribute of type: list
[('Cb', 'ab'), ('Gb', 'eb'), ('Db', 'bb'), ('Ab', 'f'), ('Eb', 'c'), ('Bb', 'g'), ('F', 'd'), ('C', 'a'), ('G', 'e'), ('D', 'b'), ('A', 'f#'), ('E', 'c#'), ('B', 'g#'), ('F#', 'd#'), ('C#', 'a#')]
-
mingus.core.keys.
major_keys
¶ Attribute of type: list
['Cb', 'Gb', 'Db', 'Ab', 'Eb', 'Bb', 'F', 'C', 'G', 'D', 'A', 'E', 'B', 'F#', 'C#']
-
mingus.core.keys.
minor_keys
¶ Attribute of type: list
['ab', 'eb', 'bb', 'f', 'c', 'g', 'd', 'a', 'e', 'b', 'f#', 'c#', 'g#', 'd#', 'a#']
-
mingus.core.keys.
get_key
(accidentals=0)[source]¶ Return the key corrisponding to accidentals.
Return the tuple containing the major key corrensponding to the accidentals put as input, and his relative minor; negative numbers for flats, positive numbers for sharps.
-
mingus.core.keys.
get_key_signature
(key=C)[source]¶ Return the key signature.
0 for C or a, negative numbers for flat key signatures, positive numbers for sharp key signatures.
-
mingus.core.keys.
get_key_signature_accidentals
(key=C)[source]¶ Return the list of accidentals present into the key signature.
-
mingus.core.keys.
get_notes
(key=C)[source]¶ Return an ordered list of the notes in this natural key.
Examples:
>>> get_notes('F') ['F', 'G', 'A', 'Bb', 'C', 'D', 'E'] >>> get_notes('c') ['C', 'D', 'Eb', 'F', 'G', 'Ab', 'Bb']
-
mingus.core.keys.
is_valid_key
(key)[source]¶ Return True if key is in a recognized format. False if not.
-
mingus.core.keys.
relative_major
(key)[source]¶ Return the relative major of a minor key.
Example:
>>> relative_major('a') 'C'
-
mingus.core.keys.
relative_minor
(key)[source]¶ Return the relative minor of a major key.
Example:
>>> relative_minor('C') 'a'