tuplettools.FixedDurationTuplet

Inheritance diagram of abjad.tools.tuplettools.FixedDurationTuplet.FixedDurationTuplet.FixedDurationTuplet

class abjad.tools.tuplettools.FixedDurationTuplet.FixedDurationTuplet.FixedDurationTuplet(duration, music=None, **kwargs)[source]

Abjad tuplet of fixed duration and variable multiplier:

abjad> tuplettools.FixedDurationTuplet(Fraction(2, 8), "c'8 d'8 e'8")
FixedDurationTuplet(1/4, [c'8, d'8, e'8])

Return fixed-duration tuplet.

Read-only Properties

FixedDurationTuplet.contents_duration

Note

Inherited from containertools.Container

FixedDurationTuplet.duration_in_seconds

Note

Inherited from containertools.Container

FixedDurationTuplet.format

Read-only LilyPond input format of component.

Note

Inherited from componenttools.Component

FixedDurationTuplet.is_augmentation

True when multiplier is greater than 1. Otherwise false:

abjad> t = tuplettools.FixedDurationTuplet(Duration(2, 8), "c'8 d'8 e'8")
abjad> t.is_augmentation
False

Return boolean.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.is_binary

Read-only boolean true when multiplier numerator is power of two. Otherwise false:

abjad> tuplet = Tuplet((2, 3), "c'8 d'8 e'8")
abjad> tuplet.is_binary
True

Return boolean.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.is_diminution

True when multiplier is less than 1. Otherwise false:

abjad> t = tuplettools.FixedDurationTuplet(Duration(2, 8), "c'8 d'8 e'8")
abjad> t.is_diminution
True

Return boolean.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.is_nonbinary

Read-only boolean true when multiplier numerator is not power of two. Otherwise false:

abjad> tuplet = Tuplet((3, 5), "c'8 d'8 e'8 f'8 g'8")
abjad> tuplet.is_nonbinary
True

Return boolean.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.is_trivial

True when tuplet multiplier is one. Otherwise false:

abjad> tuplet = Tuplet((1, 1), "c'8 d'8 e'8")
abjad> tuplet.is_trivial
True

Return boolean.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.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

FixedDurationTuplet.marks

Read-only tuple of marks attached to component.

Note

Inherited from componenttools.Component

FixedDurationTuplet.multiplied_duration[source]

Read-only multiplied duration of tuplet:

abjad> tuplet = tuplettools.FixedDurationTuplet((1, 4), "c'8 d'8 e'8")
abjad> tuplet.multiplied_duration
Duration(1, 4)

Return duration.

FixedDurationTuplet.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

FixedDurationTuplet.override

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

Note

Inherited from componenttools.Component

FixedDurationTuplet.parent

Note

Inherited from componenttools.Component

FixedDurationTuplet.preprolated_duration

Duration prior to prolation:

abjad> t = tuplettools.FixedDurationTuplet(Duration(2, 8), "c'8 d'8 e'8")
abjad> t.preprolated_duration
Duration(1, 4)

Return duration.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.prolated_duration

Note

Inherited from componenttools.Component

FixedDurationTuplet.prolation

Note

Inherited from componenttools.Component

FixedDurationTuplet.ratio_string

Read-only tuplet multiplier formatted with colon as ratio:

abjad> tuplet = Tuplet((2, 3), "c'8 d'8 e'8")
abjad> tuplet.ratio_string
'3:2'

Return string.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.set

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

Note

Inherited from componenttools.Component

FixedDurationTuplet.spanners

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

Note

Inherited from componenttools.Component

Read/write Properties

FixedDurationTuplet.force_fraction

Read / write boolean to force n:m fraction in LilyPond format:

abjad> tuplet = Tuplet(Fraction(2, 3), "c'8 d'8 e'8")
abjad> tuplet.force_fraction is None
True
abjad> f(tuplet)
\times 2/3 {
    c'8
    d'8
    e'8
}
abjad> tuplet.force_fraction = True
abjad> f(tuplet)
\fraction \times 2/3 {
    c'8
    d'8
    e'8
}

Return boolean or none.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.is_invisible

Read / write boolean to render as LilyPond \scaledDurations construct instead of tuplet:

abjad> tuplet = Tuplet((2, 3), "c'8 d'8 e'8")
abjad> f(tuplet)
\times 2/3 {
    c'8
    d'8
    e'8
}
abjad> tuplet.is_invisible = True
\scaleDurations #'(2 . 3) {
    c'8
    d'8
    e'8
}

This has the effect of rendering no no tuplet bracket and no tuplet number while preserving the rhythmic value of the tuplet and the contents of the tuplet.

Return boolean or none.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.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

FixedDurationTuplet.multiplier[source]

Read-only multiplier of tuplet:

abjad> tuplet = tuplettools.FixedDurationTuplet((1, 4), "c'8 d'8 e'8")
abjad> tuplet.multiplier
Fraction(2, 3)

Return fraction.

FixedDurationTuplet.preferred_denominator

New in version 2.0.

Integer denominator in terms of which tuplet fraction should format:

abjad> tuplet = Tuplet((2, 3), "c'8 d'8 e'8")
abjad> tuplet.preferred_denominator = 4
abjad> f(tuplet)
\times 4/6 {
    c'8
    d'8
    e'8
}

Return positive integer or none.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.target_duration[source]

Read / write target duration of fixed-duration tuplet:

abjad> tuplet = tuplettools.FixedDurationTuplet((1, 4), "c'8 d'8 e'8")
abjad> tuplet.target_duration
Duration(1, 4)
abjad> f(tuplet)
\times 2/3 {
    c'8
    d'8
    e'8
}
abjad> tuplet.target_duration = Duration(5, 8)
abjad> f(tuplet)
\fraction \times 5/3 {
    c'8
    d'8
    e'8
}

Return duration.

Methods

FixedDurationTuplet.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

FixedDurationTuplet.extend(expr)

Extend expr against 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.extend([Note("cs'8"), Note("ds'8"), Note("es'8")])
abjad> f(container)
{
    c'8 [
    d'8
    e'8 ]
    cs'8
    ds'8
    es'8
}

Return none.

New in version 2.3: expr may now be a LilyPond input string.

Note

Inherited from containertools.Container

FixedDurationTuplet.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

FixedDurationTuplet.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

FixedDurationTuplet.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

FixedDurationTuplet.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

FixedDurationTuplet.trim(start, stop='unused')[source]

Trim fixed-duration tuplet elements from start to stop:

abjad> tuplet = tuplettools.FixedDurationTuplet(Fraction(2, 8), "c'8 d'8 e'8")
abjad> tuplet
FixedDurationTuplet(1/4, [c'8, d'8, e'8])
abjad> tuplet.trim(2)
abjad> tuplet
FixedDurationTuplet(1/6, [c'8, d'8])

Preserve fixed-duration tuplet multiplier.

Adjust fixed-duration tuplet duration.

Return none.

Special Methods

FixedDurationTuplet.__add__(arg)

Add two tuplets of same type and with same multiplier.

Note

Inherited from tuplettools.Tuplet

FixedDurationTuplet.__contains__(expr)

True if expr is in container, otherwise False.

Note

Inherited from containertools.Container

FixedDurationTuplet.__delattr__()

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

Note

Inherited from __builtin__.object

FixedDurationTuplet.__delitem__(i)

Find component(s) at index or slice ‘i’ in container. Detach component(s) from parentage. Withdraw component(s) from crossing spanners. Preserve spanners that component(s) cover(s).

Note

Inherited from containertools.Container

FixedDurationTuplet.__eq__(arg)

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

Return boolean.

Note

Inherited from abctools.AbjadObject

FixedDurationTuplet.__ge__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

FixedDurationTuplet.__getitem__(i)

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

Note

Inherited from containertools.Container

FixedDurationTuplet.__gt__(arg)

Abjad objects by default do not implement this method.

Raise exception

Note

Inherited from abctools.AbjadObject

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

Note

Inherited from __builtin__.object

FixedDurationTuplet.__iadd__(expr)

__iadd__ avoids unnecessary copying of structures.

Note

Inherited from containertools.Container

FixedDurationTuplet.__imul__(total)

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

Note

Inherited from containertools.Container

FixedDurationTuplet.__le__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

FixedDurationTuplet.__len__()

Return nonnegative integer number of components in container.

Note

Inherited from containertools.Container

FixedDurationTuplet.__lt__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

FixedDurationTuplet.__mul__(n)

Note

Inherited from componenttools.Component

FixedDurationTuplet.__ne__(arg)

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

Return boolean.

Note

Inherited from abctools.AbjadObject

FixedDurationTuplet.__radd__(expr)

Extend container by contents of expr to the right.

Note

Inherited from containertools.Container

FixedDurationTuplet.__repr__()[source]
FixedDurationTuplet.__rmul__(n)

Note

Inherited from componenttools.Component

FixedDurationTuplet.__setattr__()

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

Note

Inherited from __builtin__.object

FixedDurationTuplet.__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

FixedDurationTuplet.__str__()[source]

Table Of Contents

This Page