+2
-2
@@ -84,10 +84,10 @@ def load_library(root: pathlib.Path) -> Library:
|
||||
snippets = []
|
||||
for path in sorted(root.rglob('*.xml')):
|
||||
relative = path.relative_to(root)
|
||||
if len(relative.parts) != 3 or relative.parts[0] not in ('2-4', '3-4', '4-4', '5-4') or relative.parts[1] not in ('1', '2', '3'):
|
||||
if len(relative.parts) != 3 or relative.parts[0] not in ('2_4', '3_4', '4_4', '5_4') or relative.parts[1] not in ('1', '2', '3'):
|
||||
raise ValueError(f'{path}: rhythm sources belong under meter/series')
|
||||
snippet = read_snippet(path, relative.as_posix())
|
||||
if snippet.meter != relative.parts[0].replace('-', '/'):
|
||||
if snippet.meter != relative.parts[0].replace('_', '/'):
|
||||
raise ValueError(f'{path}: rhythm meter disagrees with its directory')
|
||||
snippets.append(snippet)
|
||||
if not snippets:
|
||||
|
||||
Reference in New Issue
Block a user