componenttools.component_to_pitch_and_rhythm_skeleton

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

New in version 2.0.

Change component to pitch and rhythm skeleton:

abjad> tuplet = Tuplet(Fraction(3, 4), "c'8 d'8 e'8 f'8")
abjad> measure = Measure((6, 16), [tuplet])
abjad> staff = Staff([measure])
abjad> score = Score(staff * 2)
abjad> pitchtools.set_ascending_named_diatonic_pitches_on_nontied_pitched_components_in_expr(score)
abjad> skeleton = componenttools.component_to_pitch_and_rhythm_skeleton(score)
abjad> print skeleton
Score([
    Staff([
        Measure((6, 16), [
            Tuplet(Fraction(3, 4), [
                Note(('c', 4), Duration(1, 8)),
                Note(('d', 4), Duration(1, 8)),
                Note(('e', 4), Duration(1, 8)),
                Note(('f', 4), Duration(1, 8))
            ])
        ])
    ]),
    Staff([
        Measure((6, 16), [
            Tuplet(Fraction(3, 4), [
                Note(('g', 4), Duration(1, 8)),
                Note(('a', 4), Duration(1, 8)),
                Note(('b', 4), Duration(1, 8)),
                Note(('c', 5), Duration(1, 8))
            ])
        ])
    ])
])
abjad> new = eval(skeleton)
abjad> new
Score<<2>>
abjad> f(new)
\new Score <<
    \new Staff {
        {
            \time 6/16
            \fraction \times 3/4 {
                c'8
                d'8
                e'8
                f'8
            }
        }
    }
    \new Staff {
        {
            \time 6/16
            \fraction \times 3/4 {
                g'8
                a'8
                b'8
                c''8
            }
        }
    }
>>

Return string.

This Page