Skip to content

Commit

Permalink
Cleaned up music.py files.
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorbaca committed Feb 4, 2024
1 parent 5e0877a commit 45a0214
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 13 deletions.
9 changes: 6 additions & 3 deletions faberge/sections/02/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,9 @@ def va(m):
baca.pitch(o, "E4")
with baca.scope(m.get(1, 62)) as o:
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=5.5,
with_next_leaf=True,
)
with baca.scope(m.get(63, 65)) as o:
baca.spanners.spazzolato(
Expand Down Expand Up @@ -831,8 +832,9 @@ def va(m):
baca.pitch(o, "E4")
with baca.scope(m.get(71, 80)) as o:
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=5.5,
with_next_leaf=True,
)
with baca.scope(m.get(89, 92)) as o:
baca.dynamic(o.phead(0), "pp")
Expand All @@ -850,9 +852,10 @@ def va(m):
)
baca.stem_tremolo(abjad.select.get(baca.select.pleaves(o), [0, -1]))
baca.spanners.xfb(
o.rleaves(),
o,
right_broken=True,
staff_padding=5.5,
with_next_leaf=True,
)
with baca.scope(m.get(81, 83)) as o:
baca.spanners.spazzolato(
Expand Down
3 changes: 2 additions & 1 deletion faberge/sections/03/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,9 @@ def va(m):
baca.pitch(o, "F4")
with baca.scope(m.get(1, 8)) as o:
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=5.5,
with_next_leaf=True,
)
with baca.scope(m.get(13, 22)) as o:
baca.spanners.hairpin(
Expand Down
3 changes: 2 additions & 1 deletion faberge/sections/06/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,10 @@ def vc(m):
)
baca.stem_tremolo(o.pleaf(0))
baca.spanners.xfb(
o.rleaves(),
o,
right_broken=True,
staff_padding=3,
with_next_leaf=True,
)


Expand Down
6 changes: 4 additions & 2 deletions faberge/sections/07/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,9 @@ def va(m):
baca.dynamic(o.phead(0), "mp")
baca.override.dls_staff_padding(o, 5)
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=3,
with_next_leaf=True,
)
baca.breathe(o.pleaf(-1))
baca.spanners.material_annotation(
Expand Down Expand Up @@ -614,8 +615,9 @@ def vc(m):
left_broken=True,
)
baca.spanners.xfb(
baca.select.tleaves(o, rleak=True),
baca.select.tleaves(o),
staff_padding=3,
with_next_leaf=True,
)
with baca.scope(m[4]) as o:
baca.stem_tremolo(o.pleaf(0))
Expand Down
3 changes: 2 additions & 1 deletion faberge/sections/08/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,9 @@ def va(m):
baca.dynamic(o.phead(0), "mp")
baca.override.dls_staff_padding(o, 5)
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=3,
with_next_leaf=True,
)
baca.spanners.material_annotation(
o.rleaves(),
Expand Down
3 changes: 2 additions & 1 deletion faberge/sections/10/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,9 @@ def va(m):
)
baca.stem_tremolo(o.pleaves())
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=3,
with_next_leaf=True,
)
for n in [6, 7]:
with baca.scope(m[n]) as o:
Expand Down
9 changes: 6 additions & 3 deletions faberge/sections/11/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,9 @@ def vn(m):
)
baca.stem_tremolo(abjad.select.get(baca.select.pleaves(o), [0, -1]))
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=3,
with_next_leaf=True,
)
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o.leaves(), 4)
Expand Down Expand Up @@ -498,8 +499,9 @@ def va(m):
abjad.Tweak(r"- \tweak staff-padding 8"),
)
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=3,
with_next_leaf=True,
)
with baca.scope(m.get(5, 8)) as o:
baca.flat_glissando(
Expand Down Expand Up @@ -569,8 +571,9 @@ def vc(m, metadata):
)
baca.stem_tremolo(abjad.select.get(baca.select.pleaves(o), [0, -1]))
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=3,
with_next_leaf=True,
)


Expand Down
3 changes: 2 additions & 1 deletion faberge/sections/12/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,9 @@ def va(m):
abjad.Tweak(r"- \tweak staff-padding 5.5"),
)
baca.spanners.xfb(
o.rleaves(),
o,
staff_padding=3,
with_next_leaf=True,
)
with baca.scope(m[5]) as o:
baca.flat_glissando(o, "F3")
Expand Down
2 changes: 2 additions & 0 deletions faberge/sections/13/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ def va(m):
baca.spanners.xfb(
plt,
staff_padding=5,
# TODO: is this correct?
with_next_leaf=False,
)
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o, 5)
Expand Down
2 changes: 2 additions & 0 deletions faberge/sections/14/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ def va(m):
baca.spanners.xfb(
plt,
staff_padding=3,
# TODO: is this correct?
with_next_leaf=False,
)
with baca.scope(m.get(1, 4)) as o:
baca.pitch(o, "Eb3")
Expand Down
2 changes: 2 additions & 0 deletions faberge/sections/15/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ def va(m):
baca.spanners.xfb(
plt,
staff_padding=3,
# TODO: is this correct?
with_next_leaf=False,
)
with baca.scope(m.get(5, 8)) as o:
baca.markup(
Expand Down

0 comments on commit 45a0214

Please sign in to comment.