tietools.is_component_with_tie_spanner_attached

abjad.tools.tietools.is_component_with_tie_spanner_attached.is_component_with_tie_spanner_attached(expr)[source]

New in version 2.0.

True when expr is component with tie spanner attached:

abjad> staff = Staff(notetools.make_repeated_notes(4))
abjad> tietools.TieSpanner(staff[:])
TieSpanner(c'8, c'8, c'8, c'8)
abjad> f(staff)
\new Staff {
    c'8 ~
    c'8 ~
    c'8 ~
    c'8
}
abjad> tietools.is_component_with_tie_spanner_attached(staff)
False

Otherwise false:

abjad> staff = Staff(notetools.make_repeated_notes(4))
abjad> tietools.TieSpanner(staff[:])
TieSpanner(c'8, c'8, c'8, c'8)
abjad> f(staff)
\new Staff {
    c'8 ~
    c'8 ~
    c'8 ~
    c'8
}
abjad> tietools.is_component_with_tie_spanner_attached(staff[1])
True

Return boolean.

This Page