componenttools.component_to_tuplet_depth

abjad.tools.componenttools.component_to_tuplet_depth.component_to_tuplet_depth(component)[source]

New in version 1.1.

Change component to tuplet depth:

abjad> tuplet = tuplettools.FixedDurationTuplet(Duration(2, 8), "c'8 d'8 e'8")
abjad> staff = Staff([tuplet])
abjad> note = staff.leaves[0]
abjad> componenttools.component_to_tuplet_depth(note)
1
abjad> componenttools.component_to_tuplet_depth(tuplet)
0
abjad> componenttools.component_to_tuplet_depth(staff)
0

Return nonnegative integer.

This Page