Ejemplo n.º 1
0
commands(
    ("vc", (2, 3)),
    baca.hairpin(
        ">o",
        bookend=False,
        selector=lambda _: baca.select.rleaves(_),
    ),
    baca.text_spanner(
        "no scr. -> scr. poss. -> XFB =|",
        (abjad.Tweak(r"- \tweak bound-details.right.padding 1"), 0),
        (abjad.Tweak(r"- \tweak bound-details.right.padding 2.25"), -1),
        abjad.Tweak(r"- \tweak staff-padding 5.5"),
        bookend=False,
        pieces=lambda _: baca.select.lparts(_, [1, 1, 11]),
        selector=lambda _: baca.rleak(baca.lleak(abjad.select.leaves(_))),
    ),
)

commands(
    ("vc", 4),
    baca.hairpin(
        'o< "f" >',
        bookend=False,
        pieces=lambda _: baca.select.lparts(_, [1, 3]),
        selector=lambda _: baca.select.rleaves(_),
    ),
    baca.suite(
        baca.pitch("C#3"),
        baca.new(
            baca.repeat_tie_extra_offset((-1.5, 0)),
Ejemplo n.º 2
0
def tutti(cache):
    accumulator(
        ["v1", "v2", "va", "vc"],
        baca.dls_staff_padding(6),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (1, 4)),
        baca.circle_bow_spanner(
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            qualifier="tight-poss-grind-at-talon",
        ),
        baca.damp_spanner(abjad.Tweak(r"- \tweak staff-padding 8"), ),
        baca.flat_glissando("G4"),
        baca.hairpin(
            '"ff" -- !',
            abjad.Tweak(r"- \tweak to-barline ##t"),
            selector=lambda _: baca.select.rleaves(_),
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (7, 10)),
        baca.circle_bow_spanner(
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            qualifier="tight-poss-grind-at-talon",
        ),
        baca.damp_spanner(abjad.Tweak(r"- \tweak staff-padding 8"), ),
        baca.hairpin(
            "p -- !",
            abjad.Tweak(r"- \tweak to-barline ##t"),
            selector=lambda _: baca.select.rleaves(_),
        ),
    )
    accumulator(
        ("v1", (7, 10)),
        baca.flat_glissando("Bb4"),
    )
    accumulator(
        ("v2", (7, 10)),
        baca.flat_glissando(
            "G4",
            stop_pitch="A4",
        ),
    )
    accumulator(
        ("va", (7, 10)),
        baca.flat_glissando("Bb4"),
    )
    accumulator(
        ("vc", (7, 10)),
        baca.flat_glissando("Bb4"),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (12, 15)),
        baca.dynamic(
            "p-ancora",
            abjad.Tweak(r"- \tweak self-alignment-X -0.75"),
        ),
        baca.text_spanner(
            r"\baca-circle-tight-poss-markup -> \baca-circle-very-tight-markup =|",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            autodetect_right_padding=True,
            bookend=False,
            pieces=lambda _: baca.select.omgroups(_, [2]),
            selector=lambda _: baca.select.rleaves(_),
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (12, 27)),
        baca.breathe(),
        baca.damp_spanner(abjad.Tweak(r"- \tweak staff-padding 8"), ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (16, 19)),
        baca.dynamic("p", redundant=True),
        baca.text_spanner(
            r"\baca-circle-very-tight-markup -> \baca-circle-tight-markup =|",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            autodetect_right_padding=True,
            bookend=False,
            pieces=lambda _: baca.select.omgroups(_, [2]),
            selector=lambda _: baca.select.rleak(baca.select.ltleaves(_)),
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (20, 23)),
        baca.dynamic("p", redundant=True),
        baca.text_spanner(
            r"\baca-circle-tight-markup -> \baca-circle-mod-markup =|",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            library.left_broken_circle_bow_tweak(),
            autodetect_right_padding=True,
            bookend=False,
            pieces=lambda _: baca.select.omgroups(_, [2]),
            selector=lambda _: baca.select.rleak(baca.select.ltleaves(_)),
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (24, 27)),
        baca.dynamic("p", redundant=True),
        baca.circle_bow_spanner(
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            selector=lambda _: baca.select.rleak(baca.select.ltleaves(_)),
            qualifier="wide",
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (30, 33)),
        baca.circle_bow_spanner(
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            qualifier="wide",
        ),
        baca.damp_spanner(abjad.Tweak(r"- \tweak staff-padding 8"), ),
        baca.hairpin(
            "mf mf mp p pp pp",
            bookend=False,
            pieces=lambda _: baca.select.runs(_),
        ),
    )

    def grouped_pheads(start=0, stop=None):
        def selector(argument):
            result = baca.pheads(argument)
            result = result[start:stop]
            return [[_] for _ in result]

        return selector

    accumulator(
        (["v1", "v2", "va", "vc"], (36, 55)),
        baca.hairpin(
            "pp pp p p mp mp",
            bookend=False,
            measures=(36, 39),
            pieces=grouped_pheads(),
        ),
        baca.hairpin(
            "mf mp mp p p pp pp",
            bookend=False,
            measures=(40, 43),
            pieces=grouped_pheads(),
        ),
        baca.hairpin(
            "pp pp p mp mf",
            bookend=False,
            measures=(44, 47),
            pieces=grouped_pheads(),
        ),
        baca.hairpin(
            "f mf mp mp p p pp",
            bookend=False,
            measures=(48, 51),
            pieces=grouped_pheads(),
        ),
        baca.hairpin(
            # "pp p mp mf f ff",
            "pp p mp mf f",
            bookend=False,
            measures=(52, 55),
            pieces=grouped_pheads(None, -1),
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (36, 59)),
        baca.circle_bow_spanner(
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            qualifier="wide",
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (56, 59)),
        baca.breathe(),
        baca.hairpin(
            '"ff" -- !',
            abjad.Tweak(r"- \tweak to-barline ##t"),
            selector=lambda _: baca.rleak(baca.lleak(abjad.select.leaves(_))),
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (62, 69)),
        baca.circle_bow_spanner(
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            qualifier="wide",
        ),
        baca.hairpin(
            "p -- !",
            abjad.Tweak(r"- \tweak to-barline ##t"),
            selector=lambda _: baca.select.rleaves(_),
        ),
        baca.new(
            baca.pitch("B5"),
            match=0,
        ),
        baca.new(
            baca.pitch("B4"),
            match=1,
        ),
        baca.new(
            baca.pitch("B3"),
            match=2,
        ),
        baca.new(
            baca.pitch("B1"),
            match=3,
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], [62, 64, 66, 68]),
        baca.laissez_vibrer(selector=lambda _: baca.select.ptails(_), ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], [63, 65, 67, 69]),
        baca.stop_on_string(selector=lambda _: baca.select.ptails(_), ),
    )
    accumulator(
        ("v1", (71, 76)),
        baca.flat_glissando(
            "Bb4",
            stop_pitch="G4",
        ),
    )
    accumulator(
        ("v2", (71, 76)),
        baca.flat_glissando(
            "Ab4",
            stop_pitch="F4",
        ),
    )
    accumulator(
        ("va", (71, 76)),
        baca.flat_glissando(
            "A3",
            stop_pitch="B2",
        ),
    )
    accumulator(
        ("vc", (71, 76)),
        baca.flat_glissando(
            "G2",
            stop_pitch="Bb1",
        ),
    )
    accumulator(
        (["v1", "v2", "va", "vc"], (71, 76)),
        baca.hairpin(
            "f >o niente",
            abjad.Tweak(r"- \tweak shorten-pair #'(0 . 3.5)"),
            selector=lambda _: baca.select.rleaves(_),
        ),
        baca.text_spanner(
            r"\baca-circle-wide-markup -> \baca-circle-very-tight-markup =|",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            # spanner terminates at double bar:
            (abjad.Tweak(r"- \tweak bound-details.right.padding 7.75"), -1),
            bookend=False,
            pieces=lambda _: baca.mgroups(_, [3, 3 + 1]),
            selector=lambda _: baca.select.rleaves(_),
        ),
    )
Ejemplo n.º 3
0
 def selector(argument):
     selection = abjad.select.tuplets(argument)
     selection = abjad.select.get(selection, indices)
     selection = [baca.pleaves(_) for _ in selection]
     selection = [baca.lleak(_) for _ in selection]
     return selection