measuretools.multiply_contents_of_measures_in_expr

abjad.tools.measuretools.multiply_contents_of_measures_in_expr.multiply_contents_of_measures_in_expr(expr, n)[source]

New in version 1.1.

Multiply contents n - 1 times and adjust meter of every measure in expr:

abjad> measure = Measure((3, 8), "c'8 d'8 e'8")
abjad> spannertools.BeamSpanner(measure.leaves)
BeamSpanner(c'8, d'8, e'8)
abjad> f(measure)
{
    \time 3/8
    c'8 [
    d'8
    e'8 ]
}
abjad> measuretools.multiply_contents_of_measures_in_expr(measure, 3)
abjad> f(measure)
{
    \time 9/8
    c'8 [
    d'8
    e'8 ]
    c'8 [
    d'8
    e'8 ]
    c'8 [
    d'8
    e'8 ]
}

Changed in version 2.0: renamed measuretools.spin() to measuretools.multiply_contents_of_measures_in_expr().

This Page