MeterManager

class metertools.MeterManager

A meter manager.

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.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_metertools { graph [label=metertools]; "abjad.tools.metertools.MeterManager.MeterManager" [color=black, fontcolor=white, group=2, label=<<B>MeterManager</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.AbjadObject.AbjadObject" -> "abjad.tools.metertools.MeterManager.MeterManager"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

get_offsets_at_depth(depth, offset_inventory) Gets offsets at depth in offset_inventory.
is_acceptable_logical_tie([...]) Is true if logical tie is acceptable.
is_boundary_crossing_logical_tie([...]) Is true if logical tie crosses meter boundaries.
iterate_rewrite_inputs(argument) Iterates topmost masked logical ties, rest groups and containers in argument, masked by argument.
__eq__(argument) Is true when ID of argument equals ID of Abjad object.
__format__([format_specification]) Formats Abjad object.
__hash__() Hashes Abjad object.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Class & static methods

static MeterManager.get_offsets_at_depth(depth, offset_inventory)

Gets offsets at depth in offset_inventory.

static MeterManager.is_acceptable_logical_tie(logical_tie_duration=None, logical_tie_starts_in_offsets=None, logical_tie_stops_in_offsets=None, maximum_dot_count=None)

Is true if logical tie is acceptable.

static MeterManager.is_boundary_crossing_logical_tie(boundary_depth=None, boundary_offsets=None, logical_tie_start_offset=None, logical_tie_stop_offset=None)

Is true if logical tie crosses meter boundaries.

static MeterManager.iterate_rewrite_inputs(argument)

Iterates topmost masked logical ties, rest groups and containers in argument, masked by argument.

>>> from abjad.tools import metertools
>>> from abjad.tools import scoretools
>>> string = "abj: ! 2/4 c'4 d'4 ~ !"
>>> string += "! 4/4 d'8. r16 r8. e'16 ~ "
>>> string += "2/3 { e'8 ~ e'8 f'8 ~ } f'4 ~ !"
>>> string += "! 4/4 f'8 g'8 ~ g'4 a'4 ~ a'8 b'8 ~ !"
>>> string += "! 2/4 b'4 c''4 !"
>>> string = string.replace('!', '|')
>>> staff = scoretools.Staff(string)
>>> for x in metertools.MeterManager.iterate_rewrite_inputs(
...     staff[0]): x
...
LogicalTie([Note("c'4")])
LogicalTie([Note("d'4")])
>>> for x in metertools.MeterManager.iterate_rewrite_inputs(
...     staff[1]): x
...
LogicalTie([Note("d'8.")])
LogicalTie([Rest('r16'), Rest('r8.')])
LogicalTie([Note("e'16")])
Tuplet(Multiplier(2, 3), "e'8 ~ e'8 f'8 ~")
LogicalTie([Note("f'4")])
>>> for x in metertools.MeterManager.iterate_rewrite_inputs(
...     staff[2]): x
...
LogicalTie([Note("f'8")])
LogicalTie([Note("g'8"), Note("g'4")])
LogicalTie([Note("a'4"), Note("a'8")])
LogicalTie([Note("b'8")])
>>> for x in metertools.MeterManager.iterate_rewrite_inputs(
...     staff[3]): x
...
LogicalTie([Note("b'4")])
LogicalTie([Note("c''4")])

Returns generator.

Special methods

(AbjadObject).__eq__(argument)

Is true when ID of argument equals ID of Abjad object. Otherwise false.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

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

Returns string.

(AbjadObject).__hash__()

Hashes Abjad object.

Required to be explicitly redefined on Python 3 if __eq__ changes.

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