New in version 1.1.
Replace contents of measures in expr with new_contents:
abjad> staff = Staff(measuretools.make_measures_with_full_measure_spacer_skips([(1, 8), (3, 16)]))
abjad> f(staff)
\new Staff {
{
\time 1/8
s1 * 1/8
}
{
\time 3/16
s1 * 3/16
}
}
abjad> notes = [Note("c'16"), Note("d'16"), Note("e'16"), Note("f'16")]
abjad> measuretools.replace_contents_of_measures_in_expr(staff, notes)
[Measure(1/8, [c'16, d'16]), Measure(3/16, [e'16, f'16, s1 * 1/16])]
abjad> f(staff)
\new Staff {
{
\time 1/8
c'16
d'16
}
{
\time 3/16
e'16
f'16
s1 * 1/16
}
}
Preserve duration of all measures.
Skip measures that are too small.
Pad extra space at end of measures with spacer skip.
If not enough measures raise stop iteration.
Return measures iterated.
Changed in version 2.0: renamed measuretools.overwrite_contents() to measuretools.replace_contents_of_measures_in_expr().