Fix score block structure - wrap staves in StaffGroup

This commit is contained in:
Michael Winter 2026-03-23 19:55:48 +01:00
parent 6bf97e5abe
commit 4ffbcc79d2
2 changed files with 13 additions and 2 deletions

View file

@ -109,4 +109,4 @@
}
{STAVES}
{SCORE}

View file

@ -502,7 +502,18 @@ def generate_score(name, num_voices, output_dir="lilypond"):
}}
'''
score_text = score_text.replace("{STAVES}", staves)
score_block = f"""\\score{{
<<
\\new StaffGroup {{
<<
{staves}
>>
}}
>>
\\layout{{}}
}}"""
score_text = score_text.replace("{SCORE}", score_block)
with open(score_path, "w") as f:
f.write(score_text)