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 19, 2024
1 parent cbfaf47 commit 39eb952
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 155 deletions.
12 changes: 6 additions & 6 deletions faberge/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ def clb_staff_positions(argument, *, rotation=None):

def dal_niente_hairpins(argument, stop):
for run in baca.select.runs(argument):
baca.hairpins.exact(
baca.hairpin(
run,
f"o<{stop}",
rleak=True,
Expand All @@ -785,7 +785,7 @@ def increasing_dal_niente_hairpins(argument):
}
for i, run in enumerate(runs):
peak = i_to_peak.get(i, "f")
baca.hairpins.exact(
baca.hairpin(
run,
f"o<{peak}",
rleak=True,
Expand All @@ -805,12 +805,12 @@ def replace_with_piano_clusters(argument):


def single_swell(argument, peak):
baca.hairpins.exact(
baca.hairpin(
argument.tleaves()[:1],
f"o<{peak}",
rleak=True,
)
baca.hairpins.exact(
baca.hairpin(
argument.tleaves()[-1:],
f"({peak})>o!",
rleak=True,
Expand All @@ -822,12 +822,12 @@ def swells(argument, dynamic):
for run in baca.select.ntruns(argument):
if len(run) <= 2:
continue
baca.hairpins.exact(
baca.hairpin(
run[:1],
f"o<{dynamic}",
rleak=True,
)
baca.hairpins.exact(
baca.hairpin(
run[-1:],
f"({dynamic})>o!",
rleak=True,
Expand Down
24 changes: 12 additions & 12 deletions faberge/sections/02/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,12 @@ def fl(m):
with baca.scope(m.get(81, 88)) as o:
baca.breathe(o.pleaf(-1))
baca.flat_glissando(o, "F#4")
baca.hairpins.exact(
baca.hairpin(
o.tleaves()[:1],
"o<p",
rleak=True,
)
baca.hairpins.exact(
baca.hairpin(
o.tleaves()[-1:],
"(p)>o!",
rleak=True,
Expand All @@ -385,12 +385,12 @@ def fl(m):
abjad.Tweak(r"- \tweak parent-alignment-X -0.5"),
abjad.Tweak(r"- \tweak staff-padding 3.5"),
)
baca.hairpins.exact(
baca.hairpin(
o.tleaves()[:1],
"o<p",
rleak=True,
)
baca.hairpins.exact(
baca.hairpin(
o.tleaves()[-1:],
"(p)>o!",
rleak=True,
Expand Down Expand Up @@ -763,23 +763,23 @@ def va(m):
with baca.scope(m.get(13, 16)) as o:
baca.dynamic(o.pleaf(0), "pp")
with baca.scope(m.get(17, 22)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"pp<mp",
rleak=True,
)
with baca.scope(m.get(27, 30)) as o:
baca.dynamic(o.pleaf(0), "pp")
with baca.scope(m.get(31, 36)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"pp<mp",
rleak=True,
)
with baca.scope(m.get(41, 46)) as o:
baca.dynamic(o.pleaf(0), "pp")
with baca.scope(m.get(47, 52)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"pp<mp",
rleak=True,
Expand Down Expand Up @@ -818,7 +818,7 @@ def va(m):
staff_padding=3,
)
with baca.scope(m.get(71, 76)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"pp<mp",
rleak=True,
Expand Down Expand Up @@ -877,7 +877,7 @@ def vc(m):
abjad.Tweak(r"- \tweak staff-padding 5.5"),
)
with baca.scope(m.get(1, 16)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"p<f",
rleak=True,
Expand All @@ -888,7 +888,7 @@ def vc(m):
staff_padding=3,
)
with baca.scope(m.get(23, 36)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"f>p",
rleak=True,
Expand All @@ -899,7 +899,7 @@ def vc(m):
staff_padding=3,
)
with baca.scope(m.get(47, 54)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"p<ff",
rleak=True,
Expand Down Expand Up @@ -935,7 +935,7 @@ def vc(m):
staff_padding=5.5,
)
with baca.scope(m.get(71, 89)) as o:
baca.hairpins.exact(
baca.hairpin(
baca.select.mgroups(o, [9, 10]),
"ff> pp<p",
)
Expand Down
46 changes: 23 additions & 23 deletions faberge/sections/03/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def fl(m):
with baca.scope(m[8]) as o:
baca.dynamic(o.phead(0), "p")
with baca.scope(m.get(9, 10)) as o:
baca.hairpins.exact(
baca.hairpin(
baca.select.lparts(o, [1, 2]),
"o< mp>o!",
)
Expand Down Expand Up @@ -357,7 +357,7 @@ def fl(m):
with baca.scope(m[52]) as o:
baca.dynamic(o.phead(0), "p")
with baca.scope(m.get(53, 54)) as o:
baca.hairpins.exact(
baca.hairpin(
baca.select.lparts(o, [1, 2]),
"o< pp>o!",
)
Expand Down Expand Up @@ -448,7 +448,7 @@ def eh(m):
baca.override.tuplet_bracket_staff_padding(o, 1)
with baca.scope(m.get(53, 60)) as o:
baca.override.dls_staff_padding(o, 8)
baca.hairpins.exact(
baca.hairpin(
o.tleaves(),
'"ff">o!',
)
Expand Down Expand Up @@ -490,11 +490,11 @@ def cl(m):
with baca.scope(m.get(1, 3)) as o:
baca.breathe(o.pleaf(-1))
baca.flat_glissando(o, "Eb2")
baca.hairpins.exact(
baca.hairpin(
o.tleaves()[:2],
"o<p",
)
baca.hairpins.exact(
baca.hairpin(
o.tleaves()[-1:],
"(p)>o!",
rleak=True,
Expand All @@ -503,11 +503,11 @@ def cl(m):
for plt in baca.select.plts(o):
if len(plt) <= 2:
continue
baca.hairpins.exact(
baca.hairpin(
plt[:2],
"o<p",
)
baca.hairpins.exact(
baca.hairpin(
plt[-1:],
"(p)>o!",
rleak=True,
Expand Down Expand Up @@ -546,11 +546,11 @@ def cl(m):
for plt in baca.select.plts(o):
if len(plt) <= 2:
continue
baca.hairpins.exact(
baca.hairpin(
plt[:2],
"o<pp",
)
baca.hairpins.exact(
baca.hairpin(
plt[-1:],
"(pp)>o!",
rleak=True,
Expand All @@ -560,11 +560,11 @@ def cl(m):
for plt in baca.select.plts(o):
if len(plt) <= 2:
continue
baca.hairpins.exact(
baca.hairpin(
plt[:2],
"o<pp",
)
baca.hairpins.exact(
baca.hairpin(
plt[-1:],
"(pp)>o!",
rleak=True,
Expand All @@ -578,11 +578,11 @@ def cl(m):
for plt in baca.select.plts(o):
if len(plt) <= 2:
continue
baca.hairpins.exact(
baca.hairpin(
plt[:2],
"o<ppp",
)
baca.hairpins.exact(
baca.hairpin(
plt[-1:],
"(ppp)>o!",
rleak=True,
Expand Down Expand Up @@ -705,7 +705,7 @@ def perc(cache):
abjad.select.get(baca.select.pheads(o), [0, -1]),
)
with baca.scope(m.get(53, 61)) as o:
baca.hairpins.exact(
baca.hairpin(
baca.select.mgroups(o, [2, 7]),
"ppp< pp>o!",
)
Expand Down Expand Up @@ -758,7 +758,7 @@ def vn(m):
baca.dynamic(o.phead(0), '"ff"')
baca.pitch(o, "F4")
with baca.scope(m.get(13, 22)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
'("ff")>o!',
)
Expand All @@ -777,7 +777,7 @@ def vn(m):
with baca.scope(m.get(1, 52)) as o:
baca.override.dls_staff_padding(o, 5)
with baca.scope(m.get(37, 52)) as o:
baca.hairpins.exact(
baca.hairpin(
baca.select.mgroups(o, [8, 8]),
"(ppp)< f>ppp",
)
Expand All @@ -793,7 +793,7 @@ def vn(m):
staff_padding=3,
)
with baca.scope(m.get(53, 56)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
'"p"<"mf"',
rleak=True,
Expand Down Expand Up @@ -855,7 +855,7 @@ def va(m):
staff_padding=5.5,
)
with baca.scope(m.get(13, 22)) as o:
baca.hairpins.exact(
baca.hairpin(
o.tleaves(),
'("ff")>o!',
)
Expand All @@ -874,7 +874,7 @@ def va(m):
with baca.scope(m.get(1, 52)) as o:
baca.override.dls_staff_padding(o, 7)
with baca.scope(m.get(37, 52)) as o:
baca.hairpins.exact(
baca.hairpin(
baca.select.mgroups(o, [8, 8]),
"(pp)< f>pp",
)
Expand All @@ -885,7 +885,7 @@ def va(m):
staff_padding=3,
)
with baca.scope(m.get(53, 56)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
'"p"<"mf"',
rleak=True,
Expand Down Expand Up @@ -915,7 +915,7 @@ def vc(m):
hide_middle_stems=True,
)
with baca.scope(m.get(9, 12)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"(p)<ff",
rleak=True,
Expand All @@ -931,7 +931,7 @@ def vc(m):
staff_padding=5.5,
)
with baca.scope(m.get(23, 26)) as o:
baca.hairpins.exact(
baca.hairpin(
o,
"(ff)>p",
rleak=True,
Expand All @@ -955,7 +955,7 @@ def vc(m):
hide_middle_note_heads=True,
)
baca.interpolate_pitches(o, "Eb2", "C2")
baca.hairpins.exact(
baca.hairpin(
baca.select.mgroups(o, [12, 12]),
"(p)< ff>o!",
rleak=True,
Expand Down
Loading

0 comments on commit 39eb952

Please sign in to comment.