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 87cfb55 commit a26a123
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 131 deletions.
2 changes: 1 addition & 1 deletion faberge/sections/03/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def perc(cache):
abjad.Tweak(r"- \tweak staff-padding 8"),
)
baca.spanners.material_annotation(
baca.select.rleak(baca.select.ltleaves(o)),
baca.select.ltleaves(o),
"MM =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
right_broken=True,
Expand Down
20 changes: 10 additions & 10 deletions faberge/sections/04/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def fl(m):
baca.staff_lines(o.leaf(0), 5)
with baca.scope(m.leaves()) as o:
baca.spanners.material_annotation(
baca.select.rleak(baca.select.ltleaves(o)),
baca.select.ltleaves(o),
"1-1 / 1-2 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand All @@ -233,7 +233,7 @@ def eh(m):
baca.staff_position(o, 0)
with baca.scope(m.leaves()) as o:
baca.spanners.material_annotation(
baca.select.rleak(baca.select.ltleaves(o)),
baca.select.ltleaves(o),
"1-1 / 1-2 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand All @@ -257,7 +257,7 @@ def cl(m):
baca.pitch(o, "C2")
with baca.scope(m.leaves()) as o:
baca.spanners.material_annotation(
baca.select.rleak(baca.select.ltleaves(o)),
baca.select.ltleaves(o),
"1-1 / 1-2 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down Expand Up @@ -289,7 +289,7 @@ def pf(cache):
baca.dynamic(o.phead(0), "mp")
with baca.scope(m.get(3, 4)) as o:
baca.spanners.material_annotation(
o.rleaves(),
o,
"2-1 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 5.5"),
Expand Down Expand Up @@ -320,22 +320,22 @@ def pf(cache):
def perc(m):
with baca.scope(m[1]) as o:
baca.spanners.material_annotation(
o.rleaves(),
o,
"MM =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
with baca.scope(m.get(4, 5)) as o:
baca.dynamic(o.phead(0), "f")
with baca.scope(m.get(4, 5)) as o:
baca.spanners.material_annotation(
o.rleaves(),
o,
"MM =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
with baca.scope(m[8]) as o:
baca.dynamic(o.phead(0), "f")
baca.spanners.material_annotation(
o.rleaves(),
o,
"MM =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
right_broken=True,
Expand Down Expand Up @@ -363,7 +363,7 @@ def vn(m):
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o, 6)
baca.spanners.material_annotation(
baca.select.rleak(baca.select.ltleaves(o)),
baca.select.ltleaves(o),
"1-1 / 1-2 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down Expand Up @@ -403,7 +403,7 @@ def va(m):
abjad.Tweak(r"- \tweak parent-alignment-X 0"),
)
baca.spanners.material_annotation(
baca.select.rleak(baca.select.ltleaves(o)),
baca.select.ltleaves(o),
"1-1 / 1-2 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
),
Expand All @@ -416,7 +416,7 @@ def vc(m, metadata):
baca.clef(o.leaf(0), "treble")
baca.override.dls_staff_padding(o, 8)
baca.spanners.material_annotation(
o.rleaves(),
o,
"1-1 / 1-2 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down
14 changes: 7 additions & 7 deletions faberge/sections/05/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def fl(m):
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o.leaves(), 4)
baca.spanners.material_annotation(
baca.select.rleak(o.tleaves()),
o.tleaves(),
"1-3 / 1-4 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand All @@ -201,7 +201,7 @@ def fl(m):
def eh(m):
with baca.scope(m.leaves()) as o:
baca.spanners.material_annotation(
baca.select.rleak(o.tleaves()),
o.tleaves(),
"1-3 / 1-4 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down Expand Up @@ -233,7 +233,7 @@ def cl(m):
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o.leaves(), 7)
baca.spanners.material_annotation(
baca.select.rleak(o.tleaves()),
o.tleaves(),
"1-3 / 1-4 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand All @@ -260,7 +260,7 @@ def perc(m):
with baca.scope(m.get(1, 2)) as o:
baca.staff_position(o, 0)
baca.spanners.material_annotation(
baca.select.rleak(o.tleaves()),
o.tleaves(),
"MM =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down Expand Up @@ -308,7 +308,7 @@ def vn(m):
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o.leaves(), 6)
baca.spanners.material_annotation(
o.rleaves(),
o,
"1-3 / 1-4 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down Expand Up @@ -342,7 +342,7 @@ def va(m):
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o.leaves(), 6)
baca.spanners.material_annotation(
o.rleaves(),
o,
"1-3 / 1-4 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down Expand Up @@ -403,7 +403,7 @@ def vc(m, metadata):
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o.leaves(), 8)
baca.spanners.material_annotation(
o.rleaves(),
o,
"1-3 / 1-4 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down
16 changes: 8 additions & 8 deletions faberge/sections/06/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def fl(m):
baca.dynamic(o[0], "niente")
with baca.scope(m.get(1, 2)) as o:
baca.spanners.material_annotation(
o.rleaves(),
o,
"5-2 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 5.5"),
Expand All @@ -250,7 +250,7 @@ def fl(m):
)
with baca.scope(m.get(4, 8)) as o:
baca.spanners.material_annotation(
o.rleaves(),
o,
"1-5 / 2-1 =|",
abjad.Tweak(r"- \tweak staff-padding 5.5"),
)
Expand Down Expand Up @@ -283,7 +283,7 @@ def cl(m):
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o, 6)
baca.spanners.material_annotation(
o.rleaves(),
o,
"1-5 / 2-1 =|",
abjad.Tweak(r"- \tweak staff-padding 5.5"),
)
Expand Down Expand Up @@ -351,7 +351,7 @@ def pf(cache):
baca.spanners.beam(o.tleaves())
baca.markup(o.pheads(), r"\baca-sharp-markup")
baca.spanners.material_annotation(
o.rleaves(),
o,
"2-1 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down Expand Up @@ -385,7 +385,7 @@ def perc(m):
baca.override.dls_staff_padding(o, 6)
with baca.scope(m[2]) as o:
baca.spanners.material_annotation(
o.rleaves(),
o,
"A.2 -|",
abjad.Tweak(r"- \tweak color #red"),
abjad.Tweak(r"- \tweak staff-padding 10.5"),
Expand Down Expand Up @@ -419,7 +419,7 @@ def perc(m):
with baca.scope(m.get(4, 7)) as o:
baca.override.dls_staff_padding(o, 4)
baca.spanners.material_annotation(
o.rleaves(),
o,
"4-3 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 10.5"),
Expand Down Expand Up @@ -528,7 +528,7 @@ def composites(cache):
with baca.scope(m[2]) as o:
if name in ("vn", "va"):
baca.spanners.material_annotation(
o.rleaves(),
o,
"3-1 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 8"),
Expand All @@ -549,7 +549,7 @@ def composites(cache):
abjad.Tweak(r"- \tweak extra-offset #'(-2 . 0)"),
)
baca.spanners.material_annotation(
o.rleaves(),
o,
"4-3 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 10.5"),
Expand Down
20 changes: 5 additions & 15 deletions faberge/sections/07/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def fl(m):
baca.override.dls_staff_padding(o, 6)
with baca.scope(m.get(1, 4)) as o:
baca.spanners.material_annotation(
o.rleaves(),
o,
"2-2 =|",
abjad.Tweak(r"- \tweak staff-padding 5.5"),
)
Expand All @@ -254,7 +254,6 @@ def fl(m):
"3-7 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 5.5"),
with_next_leaf=True,
)
baca.pitch(o, "F#3")

Expand Down Expand Up @@ -293,7 +292,7 @@ def cl(m):
with baca.scope(m.get(1, 4)) as o:
baca.override.dls_staff_padding(o, 4)
baca.spanners.material_annotation(
o.rleaves(),
o,
"2-2 =|",
abjad.Tweak(r"- \tweak staff-padding 5.5"),
)
Expand All @@ -305,7 +304,6 @@ def cl(m):
"3-7 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 5.5"),
with_next_leaf=True,
)


Expand Down Expand Up @@ -370,7 +368,7 @@ def pf(cache):
with baca.scope(m.leaves()) as o:
baca.override.dls_staff_padding(o, 4)
baca.spanners.material_annotation(
o.rleaves(),
o,
"2-2 / 2-3 =|",
abjad.Tweak(r"- \tweak staff-padding 8"),
)
Expand Down Expand Up @@ -427,7 +425,6 @@ def perc(m):
"4-3 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 10.5"),
with_next_leaf=True,
)
with baca.scope(m[5]) as o:
baca.markup(
Expand All @@ -443,7 +440,7 @@ def perc(m):
"o<| mf",
)
baca.spanners.material_annotation(
o.rleaves(),
o,
"3-7 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 10.5"),
Expand All @@ -466,7 +463,6 @@ def vn(m):
"A.3 -|",
abjad.Tweak(r"- \tweak color #red"),
abjad.Tweak(r"- \tweak staff-padding 5.5"),
with_next_leaf=True,
)
with baca.scope(m[3]) as o:
baca.staff_lines(o.leaf(0), 1)
Expand All @@ -484,7 +480,6 @@ def vn(m):
"4-3 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(rf"- \tweak staff-padding {2.5 + 3 * 2.5}"),
with_next_leaf=True,
)
with baca.scope(m.get(3, 7)) as o:
baca.staccato(o.pheads())
Expand All @@ -500,7 +495,6 @@ def vn(m):
"4-2 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 10.5"),
with_next_leaf=True,
)
with baca.scope(m.get(3, 8)) as o:
baca.override.dls_staff_padding(o.leaves(), 8)
Expand All @@ -521,7 +515,6 @@ def va(m):
"A.3 -|",
abjad.Tweak(r"- \tweak color #red"),
abjad.Tweak(r"- \tweak staff-padding 8"),
with_next_leaf=True,
)
with baca.scope(m[3]) as o:
baca.staff_lines(o.leaf(0), 1)
Expand All @@ -546,7 +539,6 @@ def va(m):
"4-3 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(rf"- \tweak staff-padding {2.5 + 3 * 2.5}"),
with_next_leaf=True,
)
with baca.scope(m[5]) as o:
baca.staff_lines(o.leaf(0), 5)
Expand All @@ -564,7 +556,6 @@ def va(m):
"3-7 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 8"),
with_next_leaf=True,
)
with baca.scope(m.get(6, 7)) as o:
baca.staff_lines(o.leaf(0), 1)
Expand All @@ -586,7 +577,6 @@ def va(m):
"4-2 -|",
abjad.Tweak(r"- \tweak color #darkgreen"),
abjad.Tweak(r"- \tweak staff-padding 10.5"),
with_next_leaf=True,
)
with baca.scope(m.get(6, 8)) as o:
baca.override.dls_staff_padding(o.leaves(), 8)
Expand Down Expand Up @@ -637,7 +627,7 @@ def vc(m):
with baca.scope(m.get(5, 8)) as o:
baca.pitch(o, "F#5")
baca.spanners.material_annotation(
o.rleaves(),
o,
"2-3 =|",
abjad.Tweak(r"- \tweak staff-padding 5.5"),
)
Expand Down
Loading

0 comments on commit a26a123

Please sign in to comment.