Skip to content

Commit

Permalink
Merge pull request #1664 from TimFelixBeyer/patch-10
Browse files Browse the repository at this point in the history
Fix #1663
  • Loading branch information
mscuthbert authored Jan 2, 2024
2 parents defd61e + 4747dfc commit 970624c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
3 changes: 3 additions & 0 deletions music21/chord/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5447,6 +5447,9 @@ def normalOrder(self):
>>> chord.Chord('E#3 A3 C#4').normalOrder
[1, 5, 9]
>>> chord.Chord('B5 G4 D5 E-5 D6').normalOrder
[11, 2, 3, 7]
>>> chord.Chord().normalOrder
[]
'''
Expand Down
36 changes: 19 additions & 17 deletions music21/chord/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ class ChordTablesException(exceptions21.Music21Exception):
# inverted form of Forte class 3-11 (minor/major triad) return 0, 2, 3
# (the zero could be assumed, but it makes my brain easier to have it there).
# It is faster to store this than to recompute it every time.
# Data cross-checked with
# https://web.archive.org/web/20130118035710/http://solomonsmusic.net/pcsets.htm
inversionDefaultPitchClasses = {
(3, 2): (0, 2, 3),
(3, 3): (0, 3, 4),
Expand All @@ -421,7 +423,7 @@ class ChordTablesException(exceptions21.Music21Exception):
(4,15): (0, 2, 5, 6),
(4,16): (0, 2, 6, 7),
(4,18): (0, 3, 6, 7),
(4,19): (0, 4, 7, 8),
(4,19): (0, 3, 4, 8),
(4,22): (0, 3, 5, 7),
(4,27): (0, 3, 6, 8),
(4,29): (0, 4, 6, 7),
Expand All @@ -434,7 +436,7 @@ class ChordTablesException(exceptions21.Music21Exception):
(5, 9): (0, 2, 4, 5, 6),
(5,10): (0, 2, 3, 5, 6),
(5,11): (0, 3, 4, 5, 7),
(5,13): (0, 4, 6, 7, 8),
(5,13): (0, 2, 3, 4, 8),
(5,14): (0, 2, 5, 6, 7),
(5,16): (0, 3, 4, 6, 7),
(5,18): (0, 2, 3, 6, 7),
Expand All @@ -449,8 +451,8 @@ class ChordTablesException(exceptions21.Music21Exception):
(5,28): (0, 2, 5, 6, 8),
(5,29): (0, 2, 5, 7, 8),
(5,30): (0, 2, 4, 7, 8),
(5,31): (0, 3, 6, 8, 9),
(5,32): (0, 3, 5, 8, 9),
(5,31): (0, 2, 3, 6, 9),
(5,32): (0, 1, 4, 7, 9),
(5,36): (0, 3, 5, 6, 7),
(5,38): (0, 3, 6, 7, 8),
(6, 2): (0, 2, 3, 4, 5, 6),
Expand All @@ -470,7 +472,7 @@ class ChordTablesException(exceptions21.Music21Exception):
(6,22): (0, 2, 4, 6, 7, 8),
(6,24): (0, 2, 4, 5, 7, 8),
(6,25): (0, 2, 3, 5, 7, 8),
(6,27): (0, 3, 5, 6, 8, 9),
(6,27): (0, 2, 3, 5, 6, 9),
(6,30): (0, 2, 3, 6, 8, 9),
(6,31): (0, 1, 4, 6, 8, 9),
(6,33): (0, 2, 4, 6, 7, 9),
Expand All @@ -480,25 +482,25 @@ class ChordTablesException(exceptions21.Music21Exception):
(6,40): (0, 3, 5, 6, 7, 8),
(6,41): (0, 2, 5, 6, 7, 8),
(6,43): (0, 2, 3, 6, 7, 8),
(6,44): (0, 3, 4, 7, 8, 9),
(6,46): (0, 3, 5, 7, 8, 9),
(6,47): (0, 2, 5, 7, 8, 9),
(6,44): (0, 1, 2, 5, 8, 9),
(6,46): (0, 2, 4, 5, 6, 9),
(6,47): (0, 2, 3, 4, 7, 9),
(7, 2): (0, 2, 3, 4, 5, 6, 7),
(7, 3): (0, 3, 4, 5, 6, 7, 8),
(7, 4): (0, 1, 3, 4, 5, 6, 7),
(7, 5): (0, 1, 2, 4, 5, 6, 7),
(7, 6): (0, 1, 4, 5, 6, 7, 8),
(7, 7): (0, 1, 2, 5, 6, 7, 8),
(7, 9): (0, 2, 4, 5, 6, 7, 8),
(7,10): (0, 3, 5, 6, 7, 8, 9),
(7,10): (0, 2, 3, 4, 5, 6, 9),
(7,11): (0, 2, 3, 4, 5, 7, 8),
(7,13): (0, 2, 3, 4, 6, 7, 8),
(7,14): (0, 1, 3, 5, 6, 7, 8),
(7,16): (0, 3, 4, 6, 7, 8, 9),
(7,16): (0, 1, 3, 4, 5, 6, 9),
(7,18): (0, 1, 4, 6, 7, 8, 9),
(7,19): (0, 2, 3, 6, 7, 8, 9),
(7,19): (0, 1, 2, 3, 6, 8, 9),
(7,20): (0, 1, 2, 5, 7, 8, 9),
(7,21): (0, 1, 4, 5, 7, 8, 9),
(7,21): (0, 1, 3, 4, 5, 8, 9),
(7,23): (0, 2, 4, 5, 6, 7, 9),
(7,24): (0, 2, 4, 6, 7, 8, 9),
(7,25): (0, 2, 3, 5, 6, 7, 9),
Expand All @@ -522,16 +524,16 @@ class ChordTablesException(exceptions21.Music21Exception):
(8,16): (0, 1, 2, 4, 6, 7, 8, 9),
(8,18): (0, 1, 3, 4, 6, 7, 8, 9),
(8,19): (0, 1, 3, 4, 5, 7, 8, 9),
(8,22): (0, 2, 4, 5, 7, 8, 9,10),
(8,27): (0, 2, 3, 5, 6, 8, 9,10),
(8,22): (0, 1, 2, 3, 5, 7, 9,10),
(8,27): (0, 1, 2, 4, 6, 7, 9,10),
(8,29): (0, 2, 3, 4, 6, 7, 8, 9),
(9, 2): (0, 2, 3, 4, 5, 6, 7, 8, 9),
(9, 3): (0, 1, 3, 4, 5, 6, 7, 8, 9),
(9, 4): (0, 1, 2, 4, 5, 6, 7, 8, 9),
(9, 5): (0, 1, 2, 3, 5, 6, 7, 8, 9),
(9, 7): (0, 2, 3, 5, 6, 7, 8, 9,10),
(9, 8): (0, 2, 3, 4, 6, 7, 8, 9,10),
(9,11): (0, 1, 3, 4, 5, 7, 8, 9,10),
(9, 7): (0, 1, 2, 3, 4, 5, 7, 9,10),
(9, 8): (0, 1, 2, 3, 4, 6, 8, 9,10),
(9,11): (0, 1, 2, 3, 5, 6, 8, 9,10),
}
# to access the data for a single form, use:
# forte [size(tetra)] = 4
Expand Down

0 comments on commit 970624c

Please sign in to comment.