measuretools.DynamicMeasure

Inheritance diagram of abjad.tools.measuretools.DynamicMeasure.DynamicMeasure.DynamicMeasure

class abjad.tools.measuretools.DynamicMeasure.DynamicMeasure.DynamicMeasure(music=None, **kwargs)[source]

New in version 1.1.

Measure sets meter dynamically to exactly equal contents duration:

abjad> measure = measuretools.DynamicMeasure("c'8 d'8 e'8")
abjad> measure
DynamicMeasure(3/8, [c'8, d'8, e'8])
abjad> f(measure)
{
    \time 3/8
    c'8
    d'8
    e'8
}

Return dynamic measure.

Read-only Properties

DynamicMeasure.contents_duration

Note

Inherited from containertools.Container

DynamicMeasure.duration_in_seconds

Note

Inherited from containertools.Container

DynamicMeasure.format

Read-only LilyPond input format of component.

Note

Inherited from componenttools.Component

DynamicMeasure.is_binary

Note

Inherited from measuretools.Measure

DynamicMeasure.is_full

True when meter matches duration of measure:

abjad> measure = Measure((4, 8), "c'8 d'8 e'8 f'8")
abjad> measure.is_full
True

False otherwise:

abjad> measure = Measure((4, 8), "c'8 d'8 e'8")
abjad> measure.is_full
False

Return boolean.

Note

Inherited from measuretools.Measure

DynamicMeasure.is_nonbinary

Note

Inherited from measuretools.Measure

DynamicMeasure.is_overfull

New in version 1.1.

True when prolated duration is greater than effective meter duration.

Note

Inherited from measuretools.Measure

DynamicMeasure.is_underfull

New in version 1.1.

True when prolated duration is less than effective meter duration.

Note

Inherited from measuretools.Measure

DynamicMeasure.leaves

Read-only tuple of leaves in container:

abjad> container = Container("c'8 d'8 e'8")
abjad> container.leaves
(Note("c'8"), Note("d'8"), Note("e'8"))

Return tuple of zero or more leaves.

Note

Inherited from containertools.Container

DynamicMeasure.marks

Read-only tuple of marks attached to component.

Note

Inherited from componenttools.Component

DynamicMeasure.measure_number

Note

Inherited from measuretools.Measure

DynamicMeasure.multiplier

Note

Inherited from measuretools.Measure

DynamicMeasure.music

Read-only tuple of components in container:

abjad> container = Container("c'8 d'8 e'8")
abjad> container.music
(Note("c'8"), Note("d'8"), Note("e'8"))

Return tuple or zero or more components.

Note

Inherited from containertools.Container

DynamicMeasure.override

Read-only reference to LilyPond grob override component plug-in.

Note

Inherited from componenttools.Component

DynamicMeasure.parent

Note

Inherited from componenttools.Component

DynamicMeasure.preprolated_duration[source]
DynamicMeasure.prolated_duration

Note

Inherited from componenttools.Component

DynamicMeasure.prolation

Note

Inherited from componenttools.Component

DynamicMeasure.set

Read-only reference LilyPond context setting component plug-in.

Note

Inherited from componenttools.Component

DynamicMeasure.spanners

Read-only reference to unordered set of spanners attached to component.

Note

Inherited from componenttools.Component

Read/write Properties

DynamicMeasure.denominator[source]

Get explicit denominator of dynamic measure:

abjad> measure = measuretools.DynamicMeasure("c'8 d'8 e'8 f'8")
abjad> measure.denominator is None
True

Set explicit denominator of dynamic measure:

abjad> measure.denominator = 8
abjad> f(measure)
{
    \time 4/8
    c'8
    d'8
    e'8
    f'8
}

Set positive integer or none.

DynamicMeasure.is_parallel

Get parallel container:

abjad> container = Container([Voice("c'8 d'8 e'8"), Voice('g4.')])
abjad> f(container)
{
    \new Voice {
        c'8
        d'8
        e'8
    }
    \new Voice {
        g4.
    }
}
abjad> container.is_parallel
False

Return boolean.

Set parallel container:

abjad> container.is_parallel = True
abjad> f(container)
<<
    \new Voice {
        c'8
        d'8
        e'8
    }
    \new Voice {
        g4.
    }
>>

Return none.

Note

Inherited from containertools.Container

DynamicMeasure.suppress_meter[source]

Get meter suppression indicator:

abjad> measure = measuretools.DynamicMeasure("c'8 d'8 e'8 f'8")
abjad> f(measure)
{
    \time 1/2
    c'8
    d'8
    e'8
    f'8
}
abjad> measure.suppress_meter
False

Set meter suppression indicator:

abjad> measure.suppress_meter = True
abjad> measure.suppress_meter
True
abjad> f(measure)
{
    c'8
    d'8
    e'8
    f'8
}

Set boolean.

Methods

DynamicMeasure.append(component)

Append component to container:

abjad> container = Container("c'8 d'8 e'8")
abjad> beam = spannertools.BeamSpanner(container.music)
abjad> f(container)
{
    c'8 [
    d'8
    e'8 ]
}
abjad> container.append(Note("f'8"))
abjad> f(container)
{
    c'8 [
    d'8
    e'8 ]
    f'8
}

Return none.

Note

Inherited from containertools.Container

DynamicMeasure.extend(expr)[source]

Extend dynamic measure:

abjad> measure = measuretools.DynamicMeasure("c'8 d'8 e'8")
abjad> f(measure)
{
    \time 3/8
    c'8
    d'8
    e'8
}
abjad> measure.extend([Note("f'8"), Note("g'8")])
abjad> f(measure)
{
    \time 5/8
    c'8
    d'8
    e'8
    f'8
    g'8
}

Return none.

DynamicMeasure.index(component)

Index component in container:

abjad> container = Container("c'8 d'8 e'8")
abjad> note = container[-1]
abjad> note
Note("e'8")
abjad> container.index(note)
2

Return nonnegative integer.

Note

Inherited from containertools.Container

DynamicMeasure.insert(i, component)

Insert component in container at index i:

abjad> container = Container("c'8 d'8 e'8")
abjad> beam = spannertools.BeamSpanner(container.music)
abjad> f(container)
{
    c'8 [
    d'8
    e'8 ]
}
abjad> container.insert(1, Note("cs'8"))
abjad> f(container)
{
    c'8 [
    cs'8
    d'8
    e'8 ]
}

Return none.

Note

Inherited from containertools.Container

DynamicMeasure.pop(i=-1)

Pop component at index i from container:

abjad> container = Container("c'8 d'8 e'8")
abjad> beam = spannertools.BeamSpanner(container.music)
abjad> f(container)
{
    c'8 [
    d'8
    e'8 ]
}
abjad> container.pop(-1)
Note("e'8")
abjad> f(container)
{
    c'8 [
    d'8 ]
}

Return component.

Note

Inherited from containertools.Container

DynamicMeasure.remove(component)

Remove component from container:

abjad> container = Container("c'8 d'8 e'8")
abjad> beam = spannertools.BeamSpanner(container.music)
abjad> f(container)
{
    c'8 [
    d'8
    e'8 ]
}
abjad> note = container[-1]
abjad> note
Note("e'8")
abjad> container.remove(note)
abjad> f(container)
{
    c'8 [
    d'8 ]
}

Return none.

Note

Inherited from containertools.Container

Special Methods

DynamicMeasure.__add__(arg)

Add two measures together in-score or outside-of-score. Wrapper around measuretools.fuse_measures.

Note

Inherited from measuretools.Measure

DynamicMeasure.__contains__(expr)

True if expr is in container, otherwise False.

Note

Inherited from containertools.Container

DynamicMeasure.__delattr__()

x.__delattr__(‘name’) <==> del x.name

Note

Inherited from __builtin__.object

DynamicMeasure.__delitem__(i)

Container deletion with meter adjustment.

Note

Inherited from measuretools.Measure

DynamicMeasure.__eq__(arg)

True when id(self) equals id(arg).

Return boolean.

Note

Inherited from abctools.AbjadObject

DynamicMeasure.__ge__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

DynamicMeasure.__getitem__(i)

Return component at index i in container. Shallow traversal of container for numeric indices only.

Note

Inherited from containertools.Container

DynamicMeasure.__gt__(arg)

Abjad objects by default do not implement this method.

Raise exception

Note

Inherited from abctools.AbjadObject

DynamicMeasure.__hash__() <==> hash(x)

Note

Inherited from __builtin__.object

DynamicMeasure.__iadd__(expr)

__iadd__ avoids unnecessary copying of structures.

Note

Inherited from containertools.Container

DynamicMeasure.__imul__(total)

Multiply contents of container ‘total’ times. Return multiplied container.

Note

Inherited from containertools.Container

DynamicMeasure.__le__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

DynamicMeasure.__len__()

Return nonnegative integer number of components in container.

Note

Inherited from containertools.Container

DynamicMeasure.__lt__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

DynamicMeasure.__mul__(n)

Note

Inherited from componenttools.Component

DynamicMeasure.__ne__(arg)

True when id(self) does not equal id(arg).

Return boolean.

Note

Inherited from abctools.AbjadObject

DynamicMeasure.__radd__(expr)

Extend container by contents of expr to the right.

Note

Inherited from containertools.Container

DynamicMeasure.__repr__()

String form of measure with parentheses for interpreter display.

Note

Inherited from measuretools.Measure

DynamicMeasure.__rmul__(n)

Note

Inherited from componenttools.Component

DynamicMeasure.__setattr__()

x.__setattr__(‘name’, value) <==> x.name = value

Note

Inherited from __builtin__.object

DynamicMeasure.__setitem__(i, expr)

Set ‘expr’ in self at nonnegative integer index i. Or, set ‘expr’ in self at slice i. Find spanners that dominate self[i] and children of self[i]. Replace contents at self[i] with ‘expr’. Reattach spanners to new contents. This operation leaves all score trees always in tact.

Note

Inherited from containertools.Container

DynamicMeasure.__str__()

String form of measure with pipes for single string display.

Note

Inherited from measuretools.Measure

Table Of Contents

This Page