BurnishSpecifier

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=1]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjadext/rmakers/../../abjad/system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; "abjad.system.AbjadValueObject.AbjadValueObject" [URL="../api/abjadext/rmakers/../../abjad/system/AbjadValueObject.html#abjad.system.AbjadValueObject.AbjadValueObject", label="Abjad\nValue\nObject", target=_top]; "abjad.system.AbjadObject.AbjadObject" -> "abjad.system.AbjadValueObject.AbjadValueObject"; } subgraph "cluster_abjadext.rmakers" { graph [label="abjadext.rmakers"]; node [color=2]; "abjadext.rmakers.BurnishSpecifier.BurnishSpecifier" [URL="../api/abjadext/rmakers/BurnishSpecifier.html#abjadext.rmakers.BurnishSpecifier.BurnishSpecifier", color=black, fontcolor=white, label="Burnish\nSpecifier", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadValueObject.AbjadValueObject" -> "abjadext.rmakers.BurnishSpecifier.BurnishSpecifier"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjadext.rmakers.BurnishSpecifier.BurnishSpecifier(*, left_classes=None, middle_classes=None, right_classes=None, left_counts=None, right_counts=None, outer_divisions_only=False)

Burnish specifier.

Forces first leaf of each division to be a rest:

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest],
...     left_counts=[1],
...     )

Forces the first three leaves of each division to be rests:

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest],
...     left_counts=[3],
...     )

Forces last leaf of each division to be a rest:

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     right_classes=[abjad.Rest],
...     right_counts=[1],
...     )

Forces the last three leaves of each division to be rests:

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     right_classes=[abjad.Rest],
...     right_counts=[3],
...     )

Forces the first leaf of every even-numbered division to be a rest; forces the first leaf of every odd-numbered division to be a note.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, abjad.Note],
...     left_counts=[1],
...     )

Forces the last leaf of every even-numbered division to be a rest; forces the last leaf of every odd-numbered division to be a note.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     right_classes=[abjad.Rest, abjad.Note],
...     right_counts=[1],
...     )

Forces the first leaf of every even-numbered division to be a rest; leave the first leaf of every odd-numbered division unchanged.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, 0],
...     left_counts=[1],
...     )

Forces the last leaf of every even-numbered division to be a rest; leave the last leaf of every odd-numbered division unchanged.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     right_classes=[abjad.Rest, 0],
...     right_counts=[1],
...     )

Burnish specifiers are immutable.


Attributes Summary

__call__ Calls burnish specifier on divisions.
__format__ Formats burnish specifier.
__repr__ Gets interpreter representation.
left_classes Gets left classes.
left_counts Gets left counts.
middle_classes Gets middle_classes.
outer_divisions_only Is true when rhythm-maker should burnish only first and last division in output.
right_classes Gets right classes.
right_counts Gets right counts.

Special methods

__call__(divisions)

Calls burnish specifier on divisions.

Return type:List[NonreducedFraction]
(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.

__format__(format_specification='')

Formats burnish specifier.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, 0],
...     left_counts=[1],
...     )
>>> abjad.f(burnish_specifier)
abjadext.rmakers.BurnishSpecifier(
    left_classes=[
        abjad.Rest,
        0,
        ],
    left_counts=[1],
    )
Return type:str
(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

__repr__()

Gets interpreter representation.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, 0],
...     left_counts=[1],
...     )
>>> burnish_specifier
BurnishSpecifier(left_classes=[Rest, 0], left_counts=[1])
Return type:str

Read-only properties

left_classes

Gets left classes.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, 0],
...     right_classes=[abjad.Rest, abjad.Rest, 0],
...     left_counts=[2],
...     right_counts=[1],
...     )
>>> burnish_specifier.left_classes
[<class 'abjad.core.Rest.Rest'>, 0]
Return type:Optional[List[Union[int, type]]]
left_counts

Gets left counts.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, 0],
...     right_classes=[abjad.Rest, abjad.Rest, 0],
...     left_counts=[2],
...     right_counts=[1],
...     )
>>> burnish_specifier.left_counts
[2]
Return type:Optional[List[int]]
middle_classes

Gets middle_classes.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, 0],
...     right_classes=[abjad.Rest, abjad.Rest, 0],
...     left_counts=[2],
...     right_counts=[1],
...     )
>>> burnish_specifier.middle_classes is None
True
Return type:Optional[List[Union[int, type]]]
outer_divisions_only

Is true when rhythm-maker should burnish only first and last division in output.

Is false when rhythm-maker should burnish all divisions.

Return type:Optional[bool]
right_classes

Gets right classes.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, 0],
...     right_classes=[abjad.Rest, abjad.Rest, 0],
...     left_counts=[2],
...     right_counts=[1],
...     )
>>> burnish_specifier.right_classes
[<class 'abjad.core.Rest.Rest'>, <class 'abjad.core.Rest.Rest'>, 0]
Return type:Optional[List[Union[int, type]]]
right_counts

Gets right counts.

>>> burnish_specifier = abjadext.rmakers.BurnishSpecifier(
...     left_classes=[abjad.Rest, 0],
...     right_classes=[abjad.Rest, abjad.Rest, 0],
...     left_counts=[2],
...     right_counts=[1],
...     )
>>> burnish_specifier.right_counts
[1]
Return type:Optional[List[int]]