IncisedRhythmMaker

class rhythmmakertools.IncisedRhythmMaker(beam_specifier=None, duration_spelling_specifier=None, division_masks=None, extra_counts_per_division=None, incise_specifier=None, logical_tie_masks=None, replace_rests_with_skips=None, split_divisions_by_counts=None, tie_specifier=None, tuplet_spelling_specifier=None, helper_functions=None)

Incised rhythm-maker.

>>> import abjad
>>> from abjad.tools import rhythmmakertools
>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[0, 1],
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=16,
...         ),
...     )
>>> divisions = 4 * [(5, 16)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

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.IncisedRhythmMaker.IncisedRhythmMaker" [color=black, fontcolor=white, group=2, label=<<B>IncisedRhythmMaker</B>>, shape=box, style="filled, rounded"]; "abjad.tools.rhythmmakertools.RhythmMaker.RhythmMaker" [color=3, group=2, label=RhythmMaker, shape=box]; "abjad.tools.rhythmmakertools.RhythmMaker.RhythmMaker" -> "abjad.tools.rhythmmakertools.IncisedRhythmMaker.IncisedRhythmMaker"; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.rhythmmakertools.RhythmMaker.RhythmMaker"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Attribute summary

beam_specifier Gets beam specifier.
division_masks Gets division masks.
duration_spelling_specifier Gets duration spelling specifier.
extra_counts_per_division Gets extra counts per division.
helper_functions Gets helper functions.
incise_specifier Gets incise specifier.
logical_tie_masks Gets logical tie masks.
replace_rests_with_skips Is true when rhythm-maker should replace rests with skips.
split_divisions_by_counts Gets secondary divisions.
tie_specifier Gets tie specifier.
tuplet_spelling_specifier Gets tuplet spelling specifier.
__call__(divisions[, rotation]) Calls incised rhythm-maker on divisions.
__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.
__hash__() Hashes Abjad value object.
__illustrate__([divisions]) Illustrates rhythm-maker.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

(RhythmMaker).beam_specifier

Gets beam specifier.

Set to beam specifier or none.

IncisedRhythmMaker.division_masks

Gets division masks.

No division masks:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         talea_denominator=16,
...         ),
...     )
>>> divisions = [(4, 8), (3, 8), (4, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Masks every other output division:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         talea_denominator=16,
...         ),
...     division_masks=[
...         abjad.Pattern(
...             indices=[0],
...             period=2,
...             ),
...         ],
...     )
>>> divisions = [(4, 8), (3, 8), (4, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Set to division masks or none.

IncisedRhythmMaker.duration_spelling_specifier

Gets duration spelling specifier.

Spells durations with the fewest number of glyphs:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Forbids notes with written duration greater than or equal to 1/2:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     duration_spelling_specifier=rhythmmakertools.DurationSpellingSpecifier(
...         forbidden_written_duration=(1, 2),
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Spells all divisions metrically when spell_metrically is true:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     duration_spelling_specifier=rhythmmakertools.DurationSpellingSpecifier(
...         spell_metrically=True,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Spells only unassignable durations metrically when spell_metrically is 'unassignable':

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     duration_spelling_specifier=rhythmmakertools.DurationSpellingSpecifier(
...         spell_metrically='unassignable',
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Rewrites meter:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     duration_spelling_specifier=rhythmmakertools.DurationSpellingSpecifier(
...         rewrite_meter=True,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Returns duration spelling specifier or none.

IncisedRhythmMaker.extra_counts_per_division

Gets extra counts per division.

Returns tuple or none.

IncisedRhythmMaker.helper_functions

Gets helper functions.

Returns dictionary or none.

IncisedRhythmMaker.incise_specifier

Gets incise specifier.

Doesn’t incise:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker()
>>> divisions = [(5, 8), (5, 8), (5, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Fills divisions with notes. Incises outer divisions only:

>>> incise_specifier = rhythmmakertools.InciseSpecifier(
...     prefix_talea=[-8, -7],
...     prefix_counts=[2],
...     suffix_talea=[-3],
...     suffix_counts=[4],
...     talea_denominator=32,
...     outer_divisions_only=True,
...     )
>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=incise_specifier,
...     )
>>> divisions = [(5, 8), (5, 8), (5, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Fills divisions with rests. Incises outer divisions only:

>>> incise_specifier = rhythmmakertools.InciseSpecifier(
...     prefix_talea=[7, 8],
...     prefix_counts=[2],
...     suffix_talea=[3],
...     suffix_counts=[4],
...     talea_denominator=32,
...     fill_with_notes=False,
...     outer_divisions_only=True,
...     )
>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=incise_specifier,
...     )
>>> divisions = [(5, 8), (5, 8), (5, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Returns incise specifier or none.

IncisedRhythmMaker.logical_tie_masks

Gets logical tie masks.

No logical tie masks:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         outer_divisions_only=True,
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=16,
...         ),
...     )
>>> divisions = [(4, 8), (3, 8), (4, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Silences every other logical tie:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         outer_divisions_only=True,
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=16,
...         ),
...     logical_tie_masks=[
...         abjad.silence_every([1], period=2),
...         ],
...     )
>>> divisions = [(4, 8), (3, 8), (4, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Set to masks or none.

Defaults to none.

Returns masks or none.

IncisedRhythmMaker.replace_rests_with_skips

Is true when rhythm-maker should replace rests with skips. Otherwise false.

Does not replace rests with skips:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         fill_with_notes=False,
...         prefix_talea=[1],
...         prefix_counts=[1],
...         talea_denominator=16,
...         ),
...     replace_rests_with_skips=False,
...     )
>>> divisions = [(4, 8), (3, 8), (4, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Does replace rests with skips:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         fill_with_notes=False,
...         prefix_talea=[1],
...         prefix_counts=[1],
...         talea_denominator=16,
...         ),
...     replace_rests_with_skips=True,
...     )
>>> divisions = [(4, 8), (3, 8), (4, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Use in keyboard and other polyphonic selections where other voices provide rhythmic alignment.

Set to true, false or none.

Returns true, false or none.

IncisedRhythmMaker.split_divisions_by_counts

Gets secondary divisions.

Returns tuple or none.

IncisedRhythmMaker.tie_specifier

Gets tie specifier.

Does not tie across divisions:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Ties across divisions:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     tie_specifier=rhythmmakertools.TieSpecifier(
...         tie_across_divisions=True,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Patterns ties across divisions:

>>> pattern = abjad.Pattern(
...     indices=[0],
...     period=2,
...     )
>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     tie_specifier=rhythmmakertools.TieSpecifier(
...         tie_across_divisions=pattern,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Uses Messiaen-style ties:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     tie_specifier=rhythmmakertools.TieSpecifier(
...         tie_across_divisions=True,
...         use_messiaen_style_ties=True,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Strips all ties:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     tie_specifier=rhythmmakertools.TieSpecifier(
...         strip_ties=True,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Spells durations metrically and then strips all ties:

>>> rhythm_maker = rhythmmakertools.IncisedRhythmMaker(
...     duration_spelling_specifier=rhythmmakertools.DurationSpellingSpecifier(
...         spell_metrically=True,
...         ),
...     incise_specifier=rhythmmakertools.InciseSpecifier(
...         prefix_talea=[-1],
...         prefix_counts=[1],
...         outer_divisions_only=True,
...         suffix_talea=[-1],
...         suffix_counts=[1],
...         talea_denominator=8,
...         ),
...     tie_specifier=rhythmmakertools.TieSpecifier(
...         strip_ties=True,
...         ),
...     )
>>> divisions = [(8, 8), (4, 8), (6, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Set to tie specifier or none.

Returns tie specifier or none.

IncisedRhythmMaker.tuplet_spelling_specifier

Gets tuplet spelling specifier.

Note

not yet implemented.

Returns tuplet spelling specifier or none.

Special methods

IncisedRhythmMaker.__call__(divisions, rotation=None)

Calls incised rhythm-maker on divisions.

Returns list of selections.

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

(AbjadValueObject).__hash__()

Hashes Abjad value object.

Returns integer.

(RhythmMaker).__illustrate__(divisions=((3, 8), (4, 8), (3, 16), (4, 16)))

Illustrates rhythm-maker.

Returns LilyPond file.

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