import evans

dynamic_handler_one = evans.DynamicHandler(
    dynamic_list=["pp", "mp", "p", "mf", "ff", "f", "mf", "p"],
    hold_first_boolean_vector=[0, 0, 0, 0, 0],
    hold_first_forget=False,
    hold_last_boolean_vector=[1],
    hold_last_forget=False,
    with_constante_hairpins=False,
    forget=False,
    name="dynamic_handler_one",
)
Example #2
0
        forget=False,
    ),
    attachment_handlers=[
        evans.PitchHandler(
            [0, 1, 2, 3],
            forget=False,
        ),
        evans.BendHandler(
            [2.5, -3.5, 3, -3, 3.5, -2.5],
            boolean_vector=[0, 1, 0, 0, 1],
        ),
        evans.DynamicHandler(
            dynamic_list=["f", "mf"],
            hold_first_boolean_vector=[1, 0],
            hold_first_forget=False,
            hold_last_boolean_vector=[0, 1],
            hold_last_forget=False,
            forget=False,
            with_constante_hairpins=False,
        ),
    ],
)

composite_handler_2 = evans.CompositeHandler(
    rhythm_handler=tap_rhythm_handler,
    attachment_handlers=[
        evans.PitchHandler(
            [_ + 24 for _ in [6.5, 8, 9.5, 5]],
            forget=False,
        ),
        evans.ArticulationHandler(
import evans

dynamic_handler_two = evans.DynamicHandler(
    dynamic_list=["mf", "mp", "pp", "mf", "f"],
    hold_first_boolean_vector=[1, 0, 0],
    hold_first_forget=False,
    hold_last_boolean_vector=[0, 1],
    hold_last_forget=False,
    forget=False,
    name="dynamic_handler_two",
)

dynamic_handler_three = evans.DynamicHandler(
    dynamic_list=["f", "mp", "p", "mf"],
    hold_first_boolean_vector=[0, 1, 0],
    hold_first_forget=False,
    hold_last_boolean_vector=[1, 0],
    hold_last_forget=False,
    forget=False,
    name="dynamic_handler_one",
)
Example #4
0
     "Global Context",
     section_title,
     baca.selectors.leaf(0),
 ),
 evans.call(
     "Voice 1",
     evans.DynamicHandler(
         [
             "p",
             "mf",
             "f",
             "mp",
             "p",
             "mf",
             "f",
             "mp",
             "pp",
             "p",
             "mf",
             "f",
             "mp",
         ],
         forget=False,
         hold_last_boolean_vector=[1],
         with_constante_hairpins=False,
     ),
     lambda _: abjad.Selection(_).runs(),
 ),
 evans.call(
     "Voice 2",
     evans.DynamicHandler(
         [
Example #5
0
dynamic_handler_six = evans.DynamicHandler(
    ["f", "ff", "f", "mf", "mp", "p", "mf"],
    forget=False,
    hold_last_boolean_vector=[1],
    with_constante_hairpins=False,
    terminating_dynamic_markup=True,  # extra 0 at beginning?
    terminating_dynamic_markup_boolean_vector=[
        0,
        1,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        1,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        1,
        0,
        1,
        0,
        0,
    ],
    name="dynamic_handler_six",
)
    )
    pitch_commands.append(command)

# ######
# dynamic#
# ######

dynamic_handler_1 = evans.DynamicHandler(
    [
        "p",
        "f",
        "mp",
        "p",
        "pp",
        "p",
        "mf",
        "ff",
        "mf",
    ],
    forget=False,
    hold_last_boolean_vector=[1],
    with_constante_hairpins=False,
    name="dynamic_handler_1",
)

dynamic_handler_2 = evans.DynamicHandler(
    [
        "p",
        "pp",
        "ff",
        "p",
import evans

dynamic_handler_one = evans.DynamicHandler(
    dynamic_list=["f", "mp", "p", "mf", "ff"],  # niente + leak is weird
    flare_boolean_vector=[1, 0, 0, 1],
    flare_forget=False,
    forget=False,
    name="dynamic_handler_one",
)

dynamic_handler_two = evans.DynamicHandler(
    dynamic_list=["mp", "p", "mf", "pp", "f", "p", "mf"],
    hold_first_boolean_vector=[0, 1, 0],
    hold_first_forget=True,
    hold_last_boolean_vector=[1, 0],
    hold_last_forget=False,
    forget=False,
    name="dynamic_handler_two",
)
Example #8
0
met_115 = abjad.MetronomeMark.make_tempo_equation_markup((1, 4), 115)
mark_115 = abjad.LilyPondLiteral(
    [
        r"^ \markup {",
        r"  \huge",
        r"  \concat {",
        f"      {str(met_115)[8:]}",
        r"  }",
        r"}",
    ],
    format_slot="after",
)

crescendi = evans.DynamicHandler(
    ["sfp", "ff"],
    forget=False,
)

maker = evans.SegmentMaker(
    instruments=insts,
    names=[
        '"Violin I"',
        '"Violin II"',
        '"Viola"',
        '"Violoncello"',
    ],
    abbreviations=[
        '"vn. I"',
        '"vn. II"',
        '"va."',
        '"vc."',
Example #9
0
        voice_name=span.voice_name,
        timespan=abjad.Timespan(span.start_offset, span.stop_offset),
        handler=span.handler,
    )
    pitch_commands.append(command)

# ######
# dynamic#
# ######

circular_dynamic_handler = evans.DynamicHandler(
    [
        "p",
        "pp",
        "p",
        "mp",
    ],
    forget=False,
    hold_last_boolean_vector=[1],
    with_constante_hairpins=False,
    name="circular_dynamic_handler",
)

dyn_mat = evans.CyclicList(
    [
        circular_dynamic_handler,
    ],
    forget=False,
)

for voice in voice_names:
    for span in dynamic_timespan_list: