import evans

notehead_handler_one = evans.NoteheadHandler(
    notehead_list=[
        "harmonic-mixed",
        "triangle",
        "default",
        "triangle",
        "harmonic-mixed",
        "default",
    ],
    transition=True,
    head_boolean_vector=[1],
    head_vector_forget=False,
    transition_boolean_vector=[1],
    transition_vector_forget=False,
    forget=False,
    count=-1,
    name="notehead handler one",
)

notehead_handler_two = evans.NoteheadHandler(
    notehead_list=["default"],
    transition=False,
    head_boolean_vector=[0],
    head_vector_forget=False,
    transition_boolean_vector=[0],
    transition_vector_forget=False,
    forget=True,
    count=-1,
    name="notehead handler two",
        2,
        1,
        1,
    ],
    font_size=-4,
    leaf_duration=None,
    attack_number_forget=False,
    durations_forget=False,
    boolean_vector=[1],
    vector_forget=False,
    name="On Beat Grace Handler",
)

head_handler = evans.NoteheadHandler(
    ["harmonic"],
    head_boolean_vector=[1],
    forget=False,
)


def attach_clicks(selections):
    cyc_clicks = evans.CyclicList(
        [
            "XSB(c.2 clicks per second)",
            "XSB(c.3 clicks/s)",
            "XSB(c.4)",
            "XSB(c.5)",
            "XSB(c.6)",
            "XSB(c.7)",
            "XSB(c.8)",
            "slow bow",
notehead_handler_one = evans.NoteheadHandler(
    notehead_list=[
        "default",
        "default",
        "default",
        "default",
        "default",
        "default",
        "default",
        "default",
        "default",
        "default",
        "diamond",
        "diamond",
        "diamond",
        "diamond",
        "default",
        "default",
        "default",
        "diamond",
        "diamond",
        "slash",
        "slash",
        "diamond",
        "diamond",
        "diamond",
        "default",
        "default",
    ],
    transition=False,
    head_boolean_vector=[1],
    head_vector_forget=False,
    forget=False,
    count=-1,
    name="notehead handler one",
)
dynamic_commands = []
for span in segment_12_dynamic_timespans:
    command = evans.HandlerCommand(
        voice_name=span.voice_name,
        timespan=abjad.Timespan(span.start_offset, span.stop_offset),
        handler=span.handler,
    )
    dynamic_commands.append(command)

# ######
# noteheads#
# ######

notehead_handler_1 = evans.NoteheadHandler(
    notehead_list=["default"],
    head_boolean_vector=[1],
    head_vector_forget=False,
    forget=False,
)

notehead_handler_2 = evans.NoteheadHandler(
    notehead_list=["default"],
    head_boolean_vector=[1],
    head_vector_forget=False,
    forget=False,
)

notehead_handler_3 = evans.NoteheadHandler(
    notehead_list=[
        "default",
        "harmonic-mixed",
    ],
 evans.attach(
     "Voice 4",
     abjad.StopTextSpan(),
     baca.selectors.leaf(111),
 ),
 evans.attach(
     "Voice 1", abjad.Dynamic("mf"), baca.selectors.leaf(-5, pitched=True)
 ),
 evans.attach(
     "Voice 2", abjad.Dynamic("f"), baca.selectors.leaf(-24, pitched=True)
 ),
 evans.call(
     "Voice 2",
     evans.NoteheadHandler(
         notehead_list=["harmonic-mixed"],
         head_boolean_vector=[1],
         head_vector_forget=False,
         forget=False,
     ),
     lambda _: abjad.Selection(_).run(-1),
 ),
 evans.call(
     "Voice 3",
     evans.NoteheadHandler(
         notehead_list=["harmonic-mixed"],
         head_boolean_vector=[1],
         head_vector_forget=False,
         forget=False,
     ),
     lambda _: abjad.Selection(_).run(-1),
 ),
 evans.attach(