Skip to content

Commit 1365f36

Browse files
adding beam exceptions to staff context
1 parent 080c0c7 commit 1365f36

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/config/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
hide_empty_staves = true
4747
grand_staff_brace_collapse_height = 4
4848
base_shortest_duration = "1/32"
49+
empty_beam_exceptions = true
4950
horizontal_tuplets = true
5051
full_length_tuplets = true
5152
large_time_signatures = true

src/score_maker/stylesheet_generator.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ def _generate_layout_block(config_dict: dict) -> str:
198198
"hide_empty_staves",
199199
"grand_staff_brace_collapse_height",
200200
"base_shortest_duration",
201+
"empty_beam_exceptions",
201202
"horizontal_tuplets",
202203
"full_length_tuplets",
203204
"large_time_signatures",
@@ -212,6 +213,7 @@ def _generate_layout_block(config_dict: dict) -> str:
212213
HIDE_EMPTY_STAVES,
213214
GRAND_STAFF_BRACE_COLLAPSE_HEIGHT,
214215
BASE_SHORTEST_DURATION,
216+
EMPTY_BEAM_EXCEPTIONS,
215217
HORIZONTAL_TUPLETS,
216218
FULL_LENGTH_TUPLETS,
217219
LARGE_TIME_SIGNATURES,
@@ -291,6 +293,13 @@ def _generate_layout_block(config_dict: dict) -> str:
291293
output_string += " % curly braces should be displayed even when a single staff is shown\n"
292294
output_string += " \\override GrandStaff.SystemStartBrace.collapse-height = #4\n"
293295

296+
if EMPTY_BEAM_EXCEPTIONS is not None:
297+
output_string += " % setting empty beam exceptions to all staves in the score\n"
298+
output_string += " \\context {\n"
299+
output_string += " \\Staff\n"
300+
output_string += " beamExceptions = #'()\n"
301+
output_string += " }\n"
302+
294303
if HORIZONTAL_TUPLETS is not None:
295304
output_string += " % horizontal tuplets\n"
296305
output_string += " \\override TupletBracket.stencil =\n"

0 commit comments

Comments
 (0)