From 4ffbcc79d28eaff6f7e15aceb4c9c488f82a9e43 Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Mon, 23 Mar 2026 19:55:48 +0100 Subject: [PATCH] Fix score block structure - wrap staves in StaffGroup --- lilypond/score_template.ly | 2 +- src/transcriber.py | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lilypond/score_template.ly b/lilypond/score_template.ly index 9a8aa0f..474b58e 100644 --- a/lilypond/score_template.ly +++ b/lilypond/score_template.ly @@ -109,4 +109,4 @@ } -{STAVES} +{SCORE} diff --git a/src/transcriber.py b/src/transcriber.py index 3d98c83..fedc328 100644 --- a/src/transcriber.py +++ b/src/transcriber.py @@ -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)