Talea

class rhythmmakertools.Talea(counts=(1, ), denominator=16)

Talea.

>>> talea = rhythmmakertools.Talea(
...    counts=[2, 1, 3, 2, 4, 1, 1],
...    denominator=16,
...    )

The medieval plural of ‘talea’ is ‘talee’. Abjad documentation uses ‘taleas’ instead.

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" [color=1, group=0, label=AbjadValueObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.abctools.AbjadValueObject.AbjadValueObject"; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_rhythmmakertools { graph [label=rhythmmakertools]; "abjad.tools.rhythmmakertools.Talea.Talea" [color=black, fontcolor=white, group=2, label=<<B>Talea</B>>, shape=box, style="filled, rounded"]; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.rhythmmakertools.Talea.Talea"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

counts Gets counts.
denominator Gets denominator.
__copy__(*arguments) Copies Abjad value object.
__eq__(argument) Is true when all initialization values of Abjad value object equal the initialization values of argument.
__format__([format_specification]) Formats Abjad object.
__getitem__(argument) Gets item or slice identified by argument.
__hash__() Hashes Abjad value object.
__iter__() Iterates talea.
__len__() Gets length.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

Talea.counts

Gets counts.

>>> talea = rhythmmakertools.Talea(
...    counts=[2, 1, 3, 2, 4, 1, 1],
...    denominator=16,
...    )
>>> talea.counts
[2, 1, 3, 2, 4, 1, 1]

Set to integers.

Defaults to [1].

Returns tuple.

Talea.denominator

Gets denominator.

>>> talea = rhythmmakertools.Talea(
...    counts=[2, 1, 3, 2, 4, 1, 1],
...    denominator=16,
...    )
>>> talea.denominator
16

Set to nonnegative integer power of two.

Defaults to 16.

Returns nonnegative integer power of two.

Special methods

(AbjadValueObject).__copy__(*arguments)

Copies Abjad value object.

Returns new Abjad value object.

(AbjadValueObject).__eq__(argument)

Is true when all initialization values of Abjad value object equal the initialization values of argument.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

Talea.__getitem__(argument)

Gets item or slice identified by argument.

Gets item at index:

>>> talea = rhythmmakertools.Talea(
...    counts=[2, 1, 3, 2, 4, 1, 1],
...    denominator=16,
...    )
>>> talea[2]
NonreducedFraction(3, 16)

Gets items in slice:

>>> for nonreduced_fraction in talea[3:9]:
...     nonreduced_fraction
...
NonreducedFraction(2, 16)
NonreducedFraction(4, 16)
NonreducedFraction(1, 16)
NonreducedFraction(1, 16)
NonreducedFraction(2, 16)
NonreducedFraction(1, 16)

Returns nonreduced fraction or nonreduced fractions.

(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

Talea.__iter__()

Iterates talea.

>>> talea = rhythmmakertools.Talea(
...    counts=[2, 1, 3, 2, 4, 1, 1],
...    denominator=16,
...    )
>>> for duration in talea:
...     duration
...
Duration(1, 8)
Duration(1, 16)
Duration(3, 16)
Duration(1, 8)
Duration(1, 4)
Duration(1, 16)
Duration(1, 16)

Yields durations.

Talea.__len__()

Gets length.

>>> talea = rhythmmakertools.Talea(
...    counts=[2, 1, 3, 2, 4, 1, 1],
...    denominator=16,
...    )
>>> len(talea)
7

Defined equal to length of counts.

Returns nonnegative integer.

(AbjadObject).__ne__(argument)

Is true when Abjad object does not equal argument. Otherwise false.

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.