InciseSpecifier

class rhythmmakertools.InciseSpecifier(prefix_talea=None, prefix_counts=None, suffix_talea=None, suffix_counts=None, talea_denominator=None, body_ratio=None, fill_with_notes=True, outer_divisions_only=None)

Incise specifier.

Example 1. Specifies one sixteenth rest cut out of the beginning of every division:

>>> incise_specifier = rhythmmakertools.InciseSpecifier(
...     prefix_talea=[-1],
...     prefix_counts=[1],
...     talea_denominator=16,
...     )

Example 2. Specifies sixteenth rests cut out of the beginning and end of each division:

>>> incise_specifier = rhythmmakertools.InciseSpecifier(
...     prefix_talea=[-1],
...     prefix_counts=[1],
...     suffix_talea=[-1],
...     suffix_counts=[1],
...     talea_denominator=16,
...     )

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.InciseSpecifier.InciseSpecifier" [color=black, fontcolor=white, group=2, label=<<B>InciseSpecifier</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.InciseSpecifier.InciseSpecifier"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

body_ratio Gets body ratio.
fill_with_notes Is true when rhythm-maker should fill divisions with notes.
outer_divisions_only Is true when rhythm-maker should incise outer divisions only.
prefix_counts Gets prefix counts.
prefix_talea Gets prefix talea.
suffix_counts Gets suffix counts.
suffix_talea Gets suffix talea.
talea_denominator Gets talea denominator.
__copy__(\*args) Copies Abjad value object.
__eq__(expr) Is true when all initialization values of Abjad value object equal the initialization values of expr.
__format__([format_specification]) Formats incise specifier.
__hash__() Hashes Abjad value object.
__ne__(expr) Is true when Abjad object does not equal expr.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

InciseSpecifier.body_ratio

Gets body ratio.

Example 1. Divides middle part of every division 1:1:

>>> incise_specifier = rhythmmakertools.InciseSpecifier(
...     prefix_talea=[-1],
...     prefix_counts=[0, 1],
...     suffix_talea=[-1],
...     suffix_counts=[1],
...     talea_denominator=16,
...     body_ratio=mathtools.Ratio((1, 1)),
...     )
>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=incise_specifier,
...     )
>>> divisions = 4 * [(5, 16)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = rhythmmakertools.make_lilypond_file(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Defaults to none.

Returns ratio or none.

InciseSpecifier.fill_with_notes

Is true when rhythm-maker should fill divisions with notes. Otherwise false.

Todo

Add examples.

Defaults to true.

Set to true or false.

Returns true or false.

InciseSpecifier.outer_divisions_only

Is true when rhythm-maker should incise outer divisions only. Is false when rhythm-maker should incise all divisions.

Todo

Add examples.

Set to true, false or none.

Defaults to none.

Returns true, false or none.

InciseSpecifier.prefix_counts

Gets prefix counts.

Todo

Add examples.

Returns tuple or none.

InciseSpecifier.prefix_talea

Gets prefix talea.

Todo

Add examples.

Returns tuple or none.

InciseSpecifier.suffix_counts

Gets suffix counts.

Todo

Add examples.

Returns tuple or none.

InciseSpecifier.suffix_talea

Gets suffix talea.

Todo

Add examples.

Returns tuple or none.

InciseSpecifier.talea_denominator

Gets talea denominator.

Todo

Add examples.

Returns positive integer-equivalent number.

Special methods

(AbjadValueObject).__copy__(*args)

Copies Abjad value object.

Returns new Abjad value object.

(AbjadValueObject).__eq__(expr)

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

Returns true or false.

InciseSpecifier.__format__(format_specification='')

Formats incise specifier.

Example 1. Formats incise specifier:

>>> incise_specifier = rhythmmakertools.InciseSpecifier(
...     prefix_talea=[-1],
...     prefix_counts=[1],
...     talea_denominator=16,
...     )
>>> print(format(incise_specifier))
rhythmmakertools.InciseSpecifier(
    prefix_talea=(-1,),
    prefix_counts=(1,),
    talea_denominator=16,
    )

Example 2. Formats incise specifier:

>>> incise_specifier = rhythmmakertools.InciseSpecifier(
...     prefix_talea=[-1],
...     prefix_counts=[0, 1],
...     suffix_talea=[-1],
...     suffix_counts=[1],
...     talea_denominator=16,
...     )
>>> print(format(incise_specifier))
rhythmmakertools.InciseSpecifier(
    prefix_talea=(-1,),
    prefix_counts=(0, 1),
    suffix_talea=(-1,),
    suffix_counts=(1,),
    talea_denominator=16,
    )

Returns string.

(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

(AbjadObject).__ne__(expr)

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

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.