feat: extend time signature support to 9 metres (5/4, 7/4, 7/8, 9/8)
Add 5/4, 7/4, 7/8, 9/8 to _VALID_TIMES and VOCAB (TIME_* tokens). Vocab size grows from 81 to 85 tokens. _parse_metre in the McGill converter assigns subdivision=8 to 7/8 and 9/8. Spec bumped to v2.2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -276,11 +276,23 @@ class TestParseMetre:
|
||||
def test_6_8(self):
|
||||
assert _parse_metre("6/8") == ("6/8", 8)
|
||||
|
||||
def test_5_4(self):
|
||||
assert _parse_metre("5/4") == ("5/4", 4)
|
||||
|
||||
def test_7_4(self):
|
||||
assert _parse_metre("7/4") == ("7/4", 4)
|
||||
|
||||
def test_7_8(self):
|
||||
assert _parse_metre("7/8") == ("7/8", 8)
|
||||
|
||||
def test_9_8(self):
|
||||
assert _parse_metre("9/8") == ("9/8", 8)
|
||||
|
||||
def test_integer_4(self):
|
||||
assert _parse_metre("4") == ("4/4", 4)
|
||||
|
||||
def test_unsupported(self):
|
||||
sig, sub = _parse_metre("7/8")
|
||||
sig, sub = _parse_metre("11/8")
|
||||
assert sig is None
|
||||
assert sub == 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user