componenttools.list_leftmost_components_with_prolated_duration_at_most

abjad.tools.componenttools.list_leftmost_components_with_prolated_duration_at_most.list_leftmost_components_with_prolated_duration_at_most(components, prolated_duration)[source]

New in version 2.0.

List leftmost components in component with prolated duration at most prolated_duration.

Return tuple of components[:i] together with the prolated duration of components[:i]:

abjad> voice = Voice("c'8 d'8 e'8 f'8")
abjad> componenttools.list_leftmost_components_with_prolated_duration_at_most(voice[:], Duration(1, 4))
([Note("c'8"), Note("d'8")], Duration(1, 4))

Maximize i such that the prolated duration of components[:i] is no greater than prolated_duration.

Input components must be thread-contiguous.

Todo

implement componenttools.list_leftmost_components_with_prolated_duration_at_least().

Todo

implement componenttools.list_rightmost_components_with_prolated_duration_at_most().

Todo

implement componenttools.list_rightmost_components_with_prolated_duration_at_least().

Changed in version 2.0: renamed componenttools.get_le_duration_prolated() to componenttools.list_leftmost_components_with_prolated_duration_at_most().

This Page