containertools.move_parentage_children_and_spanners_from_components_to_empty_container

abjad.tools.containertools.move_parentage_children_and_spanners_from_components_to_empty_container.move_parentage_children_and_spanners_from_components_to_empty_container(donors, recipient)[source]

Move parentage, children and spanners from components to empty container:

abjad> voice = Voice(Container("c'8 c'8") * 3)
abjad> pitchtools.set_ascending_named_diatonic_pitches_on_nontied_pitched_components_in_expr(voice)
abjad> spannertools.BeamSpanner(voice.leaves)
BeamSpanner(c'8, d'8, e'8, f'8, g'8, a'8)
abjad> f(voice)
\new Voice {
    {
        c'8 [
        d'8
    }
    {
        e'8
        f'8
    }
    {
        g'8
        a'8 ]
    }
}
abjad> tuplet = Tuplet(Fraction(3, 4), [])
abjad> containertools.move_parentage_children_and_spanners_from_components_to_empty_container(voice[:2], tuplet)
abjad> f(voice)
\new Voice {
    \fraction \times 3/4 {
        c'8 [
        d'8
        e'8
        f'8
    }
    {
        g'8
        a'8 ]
    }
}

Return none.

Changed in version 2.0: renamed scoretools.donate() to containertools.move_parentage_children_and_spanners_from_components_to_empty_container().

This Page