Beispiel #1
0
def transparent_music(selector):
    return [
        baca.no_ledgers(selector=selector),
        baca.accidental_transparent(selector=selector),
        baca.beam_transparent(selector=selector),
        baca.flag_transparent(selector=selector),
        baca.note_head_transparent(selector=selector),
        baca.repeat_tie_transparent(selector=selector),
        baca.stem_transparent(selector=selector),
    ]
Beispiel #2
0
def transparent_music(selector):
    """
    Makes transparent music.
    """
    return [
        baca.no_ledgers(selector=selector),
        baca.accidental_transparent(selector=selector),
        baca.beam_transparent(selector=selector),
        baca.flag_transparent(selector=selector),
        baca.note_head_transparent(selector=selector),
        baca.repeat_tie_transparent(selector=selector),
        baca.stem_transparent(selector=selector),
        ]
Beispiel #3
0
def vns_va(cache):
    accumulator(
        (["v1", "v2", "va"], (46, 53)),
        baca.stem_transparent(selector=lambda _: baca.select.leaves(_)[:-1], ),
    )
Beispiel #4
0
def vc(m):
    accumulator(
        ("vc", (1, 2)),
        baca.half_clt_spanner(
            abjad.Tweak(rf"- \tweak staff-padding {4 + 6.5}"), ),
        library.bcps(
            -3,
            clt=True,
            staff_padding=4,
        ),
    )
    accumulator(
        ("vc", (1, 2)),
        library.multistage_leaf_glissando(
            [("D4", 4), ("Ab3", 2), ("B3", None)],
            "F3",
        ),
    )
    accumulator(
        ("vc", (3, 4)),
        baca.circle_bow_spanner(
            abjad.Tweak(r"- \tweak staff-padding 8"),
            qualifier="wide",
        ),
        baca.text_spanner(
            r"\baca-diamond-markup -> \baca-black-diamond-markup => ord. ||",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            autodetect_right_padding=True,
            bookend=False,
            pieces=library.rleaves_partition_by_ratio((1, 1, 1)),
        ),
        baca.flat_glissando("Bb2"),
    )
    accumulator(
        ("vc", (5, 8)),
        library.bcps(
            -3,
            clt=True,
            staff_padding=4,
        ),
    )
    accumulator(
        ("vc", [(5, 10), (13, 14)]),
        baca.half_clt_spanner(
            abjad.Tweak(rf"- \tweak staff-padding {4 + 6.5}"), ),
    )
    accumulator(
        ("vc", (5, 14)),
        library.multistage_leaf_glissando(
            [
                ("F3", 4),
                ("C3", 5),
                ("Db3", 5),
                ("A2", 5),
                ("Bb2", 5),
                ("F2", 5),
                ("Gb2", None),
            ],
            "E2",
            rleak_final_stage=True,
        ),
    )
    accumulator(
        ("vc", [(9, 10), (13, 14)]),
        library.bcps(
            -3,
            clt=True,
            staff_padding=4,
        ),
    )
    accumulator(
        ("vc", [(11, 12), (15, 17)]),
        baca.stem_tremolo(selector=lambda _: baca.select.pleaves(_), ),
    )
    accumulator(
        ("vc", (15, 20)),
        baca.flat_glissando("E2"),
    )
    accumulator(
        ("vc", (18, 20)),
        baca.accent(selector=lambda _: baca.select.pheads(_), ),
        baca.breathe(),
        baca.stem_tremolo(selector=lambda _: baca.select.pleaves(_), ),
    )
    accumulator(
        ("vc", (21, 23)),
        baca.breathe(),
        baca.clef("treble"),
        baca.clef(
            "bass",
            selector=lambda _: baca.select.rleaf(_, -1),
        ),
        baca.hairpin(
            'niente o< "f" -- ! >o niente',
            pieces=lambda _: baca.select.cmgroups(_, ),
        ),
        baca.half_clt_spanner(
            abjad.Tweak(rf"- \tweak staff-padding {4.5 + 6.5}"), ),
        baca.markup(
            r"\baca-string-iii-markup",
            abjad.Tweak(r"- \tweak padding 1.5"),
            direction=abjad.DOWN,
        ),
        baca.note_head_style_harmonic(
            selector=lambda _: baca.select.pleaves(_)),
        library.cello_cell_bcps(staff_padding=4.5, ),
        baca.flat_glissando("A5"),
    )
    accumulator(
        ("vc", (24, 31)),
        baca.accent(selector=lambda _: baca.select.pheads(_), ),
        baca.breathe(),
        baca.dynamic("p"),
        baca.stem_tremolo(selector=lambda _: baca.select.pleaves(_), ),
        baca.scp_spanner(
            "T -> P ->",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            autodetect_right_padding=False,
            pieces=lambda _: baca.select.plts(_)[:-1],
        ),
        baca.flat_glissando("Eb2"),
    )
    accumulator(
        ("vc", (32, 37)),
        baca.accent(selector=lambda _: baca.select.pheads(_), ),
        baca.scp_spanner(
            "T -> P ->",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            autodetect_right_padding=False,
            pieces=lambda _: baca.select.plts(_)[:-1],
        ),
        baca.stem_tremolo(selector=lambda _: baca.select.pleaves(_), ),
        baca.text_spanner(
            "trem. ord. -> larg. =| trem. larg. -> larghiss. =|"
            " trem. larghiss. -> no trem.",
            abjad.Tweak(r"- \tweak bound-details.right.padding 1.5"),
            abjad.Tweak(r"- \tweak staff-padding 8"),
            bookend=False,
            final_piece_spanner=False,
            lilypond_id=1,
            pieces=lambda _: baca.select.cmgroups(_, [1, 1, 1, 2, 1, 1]),
            selector=lambda _: baca.select.rleaves(_),
        ),
    )
    accumulator(
        ("vc", (32, 54)),
        library.clouded_pane_spanner(
            "clouded pane -|",
            13,
            # TODO: allow spanner to extend to phantom measure
            selector=lambda _: baca.select.leaves(_),
        ),
        baca.flat_glissando(
            "Db2",
            right_broken=True,
        ),
    )
    accumulator(
        ("vc", (38, 54)),
        baca.new(
            baca.dots_transparent(),
            baca.stem_transparent(),
            selector=lambda _: baca.select.leaves(_)[:-1],
        ),
        baca.scp_spanner(
            "T -> T poss. =|",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            pieces=lambda _: baca.select.cmgroups(_, [8, 8]),
        ),
    )
Beispiel #5
0
def vc(m):
    accumulator(
        ("vc", (1, 10)),
        baca.chunk(
            baca.dots_transparent(),
            baca.stem_transparent(selector=lambda _: baca.select.pleaves(_)),
        ),
        library.clouded_pane_spanner("clouded pane -|", 8),
    )
    accumulator(
        ("vc", (1, 22)),
        baca.flat_glissando("Bb1"),
    )
    accumulator(
        ("vc", (6, 8)),
        baca.hairpin(
            "(fff) > p",
            selector=lambda _: baca.select.rleaves(_),
        ),
    )
    accumulator(
        ("vc", (11, 12)),
        baca.half_clt_spanner(
            abjad.Tweak(rf"- \tweak staff-padding {3 + 6}"), ),
        library.cello_cell_bcps(staff_padding=3, ),
    )
    accumulator(
        ("vc", (13, 22)),
        baca.new(
            baca.dots_transparent(),
            baca.stem_transparent(),
            selector=lambda _: baca.select.leaves(_)[:-1],
        ),
    )
    accumulator(
        ("vc", [(13, 22), (37, 38)]),
        library.clouded_pane_spanner("clouded pane -|", 8),
    )
    accumulator(
        ("vc", (17, 22)),
        baca.hairpin(
            "(p) >o",
            bookend=False,
            selector=lambda _: baca.select.rleaves(_),
        ),
    )
    accumulator(
        ("vc", (23, 28)),
        baca.accent(selector=lambda _: baca.select.pheads(_), ),
        baca.hairpin(
            "f < ff >",
            pieces=lambda _: abjad.select.partition_by_counts(
                baca.plts(_)[:-1], [2], cyclic=True),
        ),
        baca.scp_spanner(
            "O -> P ->",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            autodetect_right_padding=False,
            pieces=lambda _: baca.select.plts(_)[:-1],
        ),
        baca.stem_tremolo(selector=lambda _: baca.select.pleaves(_), ),
    )
    accumulator(
        ("vc", [(23, 28), (30, 35)]),
        baca.flat_glissando("<B2 Gqs3>"),
        baca.new(
            baca.markup(
                r"\stirrings-still-twenty-four-et-markup",
                abjad.Tweak(r"- \tweak padding 1.5"),
            ),
            match=0,
        ),
        library.urtext_spanner("urtext (field) -|", 8),
    )
    accumulator(
        ("vc", 29),
        baca.hairpin(
            "mp -- !",
            abjad.Tweak(r"- \tweak to-barline ##t"),
            selector=lambda _: baca.select.rleaves(_),
        ),
        baca.markup(
            r"\baca-string-iii-markup",
            abjad.Tweak(r"- \tweak padding 1.5"),
            direction=abjad.DOWN,
        ),
        baca.pitch("G2"),
        baca.stem_tremolo(selector=lambda _: baca.select.pleaves(_), ),
    )
    accumulator(
        ("vc", (30, 35)),
        baca.accent(selector=lambda _: baca.select.pheads(_), ),
        baca.hairpin(
            "ff < fff >",
            pieces=lambda _: abjad.select.partition_by_counts(
                baca.plts(_)[:-1], [2], cyclic=True),
        ),
        baca.scp_spanner(
            "O -> P ->",
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            autodetect_right_padding=False,
            pieces=lambda _: baca.select.plts(_)[:-1],
        ),
        baca.stem_tremolo(selector=lambda _: baca.select.pleaves(_), ),
    )
    accumulator(
        ("vc", (37, 38)),
        baca.flat_glissando("B1"),
        baca.hairpin(
            "p -- ! >o niente",
            pieces=lambda _: baca.select.cmgroups(_, ),
            selector=lambda _: baca.select.rleaves(_),
        ),
        baca.tasto_spanner(abjad.Tweak(r"- \tweak staff-padding 3"), ),
        baca.text_spanner(
            "slow bow -> stopped",
            abjad.Tweak(r"- \tweak bound-details.right.padding 11"),
            abjad.Tweak(r"- \tweak staff-padding 5.5"),
            selector=lambda _: baca.select.rleaves(_),
        ),
    )
Beispiel #6
0
    baca.slur_up(),
    baca.stem_down(),
    )

maker(
    ('lh_v4', (2, -1)),
    baca.script_up(),
    baca.staccato(selector=baca.pheads()),
    baca.tenuto(selector=baca.pheads()),
    )

maker(
    'lh_resonance',
    baca.new(
        baca.repeat_tie(),
        map=baca.qruns(),
        ),
    baca.dots_transparent(),
    )

maker(
    ('lh_resonance', [10, 11, 12, 13, 14]),
    *mraz.transparent_music(selector=baca.leaves()[1:]),
    )

maker(
    ('lh_resonance', [11, 13, 14]),
    baca.accidental_stencil_false(),
    baca.stem_transparent(),
    )
Beispiel #7
0
    baca.new(
        baca.repeat_tie(lambda _: baca.select.pleaves(_)[1:], ),
        map=lambda _: baca.select.qruns(_),
    ),
    baca.dots_transparent(),
)

commands(
    (library.lh_resonance, [10, 11, 12, 13, 14]),
    *library.transparent_music(lambda _: baca.select.leaves(_)[1:], ),
)

commands(
    (library.lh_resonance, [11, 13, 14]),
    baca.accidental_stencil_false(),
    baca.stem_transparent(),
)

defaults = baca.score_interpretation_defaults()
del defaults["check_wellformedness"]

if __name__ == "__main__":
    metadata, persist, score, timing = baca.build.interpret_section(
        score,
        commands,
        **defaults,
        activate=(baca.tags.LOCAL_MEASURE_NUMBER, ),
        always_make_global_rests=True,
        do_not_require_short_instrument_names=True,
        error_on_not_yet_pitched=True,
    )