Name a chord. This function can determine almost every chord, from a simple triad to a fourteen note polychord.
(chord, shorthand=False, no_inversions=False, no_polychords=False)
| 918 | |
| 919 | |
| 920 | def determine(chord, shorthand=False, no_inversions=False, no_polychords=False): |
| 921 | """Name a chord. |
| 922 | |
| 923 | This function can determine almost every chord, from a simple triad to a |
| 924 | fourteen note polychord.""" |
| 925 | if chord == []: |
| 926 | return [] |
| 927 | elif len(chord) == 1: |
| 928 | return chord |
| 929 | elif len(chord) == 2: |
| 930 | return [intervals.determine(chord[0], chord[1])] |
| 931 | elif len(chord) == 3: |
| 932 | return determine_triad(chord, shorthand, no_inversions, no_polychords) |
| 933 | elif len(chord) == 4: |
| 934 | return determine_seventh(chord, shorthand, no_inversions, no_polychords) |
| 935 | elif len(chord) == 5: |
| 936 | return determine_extended_chord5(chord, shorthand, no_inversions, no_polychords) |
| 937 | elif len(chord) == 6: |
| 938 | return determine_extended_chord6(chord, shorthand, no_inversions, no_polychords) |
| 939 | elif len(chord) == 7: |
| 940 | return determine_extended_chord7(chord, shorthand, no_inversions, no_polychords) |
| 941 | else: |
| 942 | return determine_polychords(chord, shorthand) |
| 943 | |
| 944 | |
| 945 | def determine_triad(triad, shorthand=False, no_inversions=False, placeholder=None): |
nothing calls this directly
no test coverage detected