componenttools.extend_in_parent_of_component_and_grow_spanners

abjad.tools.componenttools.extend_in_parent_of_component_and_grow_spanners.extend_in_parent_of_component_and_grow_spanners(component, new_components)[source]

New in version 2.0.

Extend new_components in parent of component and grow spanners:

abjad> notes = [Note("c'8"), Note("d'8"), Note("e'8")]
abjad> voice = Voice(notes)
abjad> spannertools.BeamSpanner(voice[:])
BeamSpanner(c'8, d'8, e'8)
abjad> f(voice)
\new Voice {
    c'8 [
    d'8
    e'8 ]
}
abjad> new_components = [Note("c'8"), Note("d'8"), Note("e'8")]
abjad> componenttools.extend_in_parent_of_component_and_grow_spanners(voice.leaves[-1], new_components)
[Note("e'8"), Note("c'8"), Note("d'8"), Note("e'8")]
abjad> f(voice)
\new Voice {
    c'8 [
    d'8
    e'8
    c'8
    d'8
    e'8 ]
}

Return component and new_components together in list.

This Page