leaftools.label_leaves_in_expr_with_tuplet_depth

abjad.tools.leaftools.label_leaves_in_expr_with_tuplet_depth.label_leaves_in_expr_with_tuplet_depth(expr, markup_direction='down')[source]

New in version 1.1.

Label leaves in expr with tuplet depth:

abjad> staff = Staff("c'8 d'8 e'8 f'8 g'8")
abjad> tuplettools.FixedDurationTuplet(Duration(2, 8), staff[-3:])
FixedDurationTuplet(1/4, [e'8, f'8, g'8])
abjad> leaftools.label_leaves_in_expr_with_tuplet_depth(staff)
abjad> f(staff)
\new Staff {
    c'8 _ \markup { \small 0 }
    d'8 _ \markup { \small 0 }
    \times 2/3 {
        e'8 _ \markup { \small 1 }
        f'8 _ \markup { \small 1 }
        g'8 _ \markup { \small 1 }
    }
}

Return none.

Changed in version 2.0: renamed label.leaf_depth_tuplet() to leaftools.label_leaves_in_expr_with_tuplet_depth().

This Page