AccelerandoRhythmMaker

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.AccelerandoRhythmMaker.AccelerandoRhythmMaker" [URL="../api/abjadext/rmakers/AccelerandoRhythmMaker.html#abjadext.rmakers.AccelerandoRhythmMaker.AccelerandoRhythmMaker", color=black, fontcolor=white, label="Accelerando\nRhythm\nMaker", target=_top]; "abjadext.rmakers.RhythmMaker.RhythmMaker" [URL="../api/abjadext/rmakers/RhythmMaker.html#abjadext.rmakers.RhythmMaker.RhythmMaker", label="Rhythm\nMaker", target=_top]; "abjadext.rmakers.RhythmMaker.RhythmMaker" -> "abjadext.rmakers.AccelerandoRhythmMaker.AccelerandoRhythmMaker"; } 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.RhythmMaker.RhythmMaker"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjadext.rmakers.AccelerandoRhythmMaker.AccelerandoRhythmMaker(*, beam_specifier=None, division_masks=None, duration_specifier=None, interpolation_specifiers=None, logical_tie_masks=None, tie_specifier=None, tuplet_specifier=None)

Accelerando rhythm-maker.

Makes accelerando for each input division:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Makes ritardando for each input division:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 20),
...         stop_duration=(1, 8),
...         written_duration=(1, 16),
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Set written_duration to 1/16 or less for multiple beams.

Usage follows the two-step configure-once / call-repeatedly pattern shown here.


Attributes Summary

__call__ Calls interpolated rhythm-maker on divisions.
beam_specifier Gets beam specifier.
division_masks Gets division masks.
interpolation_specifiers Gets interpolation specifier.
logical_tie_masks Gets logical tie masks.
state Gets state dictionary.
tie_specifier Gets tie specifier.
tuplet_specifier Gets tuplet specifier.

Special methods

__call__(divisions, previous_state=None)

Calls interpolated 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).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

beam_specifier

Gets beam specifier.

Feather beams each division:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         beam_each_division=True,
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Beams divisions together (without feathering):

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         beam_divisions_together=True,
...         use_feather_beams=False,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

It is important to leave feathering turned off here because LilyPond feathers conjoint beams poorly.

Makes no beams:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         beam_divisions_together=False,
...         beam_each_division=False,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Returns beam specifier.

division_masks

Gets division masks.

No division masks:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     division_masks=None,
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Silences every other division:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     division_masks=[
...         abjadext.rmakers.SilenceMask(
...             pattern=abjad.index([1], 2),
...             ),
...         ],
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 
(RhythmMaker).duration_specifier

Gets duration specifier.

Return type:Optional[DurationSpecifier]
interpolation_specifiers

Gets interpolation specifier.

Makes accelerando for each input division:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Makes accelerandi and ritardandi on alternate divisions:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=[
...         abjadext.rmakers.InterpolationSpecifier(
...             start_duration=(1, 8),
...             stop_duration=(1, 20),
...             written_duration=(1, 16),
...             ),
...         abjadext.rmakers.InterpolationSpecifier(
...             start_duration=(1, 20),
...             stop_duration=(1, 8),
...             written_duration=(1, 16),
...             ),
...         ],
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Makes a single note in the case that interpolation would take too long for a given division:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (1, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Defaults to none.

Set to interpolation specifier or none.

Returns interpolation specifier or none.

logical_tie_masks

Gets logical tie masks.

Silences first and last logical tie:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         beam_each_division=True,
...         beam_rests=True,
...         stemlet_length=0.75,
...         use_feather_beams=True,
...         ),
...     logical_tie_masks=[
...         abjadext.rmakers.silence([0]),
...         abjadext.rmakers.silence([-1]),
...         ],
...     interpolation_specifiers=[
...         abjadext.rmakers.InterpolationSpecifier(
...             start_duration=(1, 8),
...             stop_duration=(1, 20),
...             written_duration=(1, 16),
...             ),
...         abjadext.rmakers.InterpolationSpecifier(
...             start_duration=(1, 20),
...             stop_duration=(1, 8),
...             written_duration=(1, 16),
...             ),
...         ],
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Silences every third logical tie:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         beam_each_division=True,
...         beam_rests=True,
...         stemlet_length=0.75,
...         use_feather_beams=True,
...         ),
...     logical_tie_masks=[
...         abjadext.rmakers.silence([2], 3),
...         ],
...     interpolation_specifiers=[
...         abjadext.rmakers.InterpolationSpecifier(
...             start_duration=(1, 8),
...             stop_duration=(1, 20),
...             written_duration=(1, 16),
...             ),
...         abjadext.rmakers.InterpolationSpecifier(
...             start_duration=(1, 20),
...             stop_duration=(1, 8),
...             written_duration=(1, 16),
...             ),
...         ],
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Defaults to none.

Set to patterns or none.

Returns patterns or none.

(RhythmMaker).previous_state

Gets previous state dictionary.

Return type:OrderedDict
state

Gets state dictionary.

Consumes 3 divisions:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=[
...         abjadext.rmakers.InterpolationSpecifier(
...             start_duration=(1, 8),
...             stop_duration=(1, 20),
...             written_duration=(1, 16),
...             ),
...         abjadext.rmakers.InterpolationSpecifier(
...             start_duration=(1, 20),
...             stop_duration=(1, 8),
...             written_duration=(1, 16),
...             ),
...         ],
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(3, 8), (4, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 
>>> state = rhythm_maker.state
>>> abjad.f(state)
abjad.OrderedDict(
    [
        ('divisions_consumed', 3),
        ('logical_ties_produced', 17),
        ]
    )

Advances 3 divisions; then consumes another 3 divisions:

>>> divisions = [(4, 8), (3, 8), (4, 8)]
>>> selections = rhythm_maker(divisions, previous_state=state)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 
>>> state = rhythm_maker.state
>>> abjad.f(state)
abjad.OrderedDict(
    [
        ('divisions_consumed', 6),
        ('logical_ties_produced', 36),
        ]
    )

Advances 6 divisions; then consumes another 3 divisions:

>>> divisions = [(3, 8), (4, 8), (3, 8)]
>>> selections = rhythm_maker(divisions, previous_state=state)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 
>>> state = rhythm_maker.state
>>> abjad.f(state)
abjad.OrderedDict(
    [
        ('divisions_consumed', 9),
        ('logical_ties_produced', 53),
        ]
    )
Return type:OrderedDict
tie_specifier

Gets tie specifier.

Does not tie across divisions:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tie_specifier=abjadext.rmakers.TieSpecifier(
...         tie_across_divisions=False,
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Ties across divisions:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tie_specifier=abjadext.rmakers.TieSpecifier(
...         tie_across_divisions=True,
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Patterns ties across divisions:

>>> pattern = abjad.Pattern(
...      indices=[0],
...      period=2,
...  )
>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tie_specifier=abjadext.rmakers.TieSpecifier(
...         tie_across_divisions=pattern,
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Returns tie specifier.

tuplet_specifier

Gets tuplet specifier.

Tuplets use note duration bracket:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tie_specifier=abjadext.rmakers.TieSpecifier(
...         tie_across_divisions=False,
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=True,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Tuplets do not use note duration bracket:

>>> rhythm_maker = abjadext.rmakers.AccelerandoRhythmMaker(
...     beam_specifier=abjadext.rmakers.BeamSpecifier(
...         use_feather_beams=True,
...         ),
...     interpolation_specifiers=abjadext.rmakers.InterpolationSpecifier(
...         start_duration=(1, 8),
...         stop_duration=(1, 20),
...         written_duration=(1, 16),
...         ),
...     tie_specifier=abjadext.rmakers.TieSpecifier(
...         tie_across_divisions=False,
...         ),
...     tuplet_specifier=abjadext.rmakers.TupletSpecifier(
...         duration_bracket=False,
...         ),
...     )
>>> divisions = [(5, 8), (3, 8), (5, 8), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = abjad.LilyPondFile.rhythm(
...     selections,
...     divisions,
...     )
>>> abjad.show(lilypond_file) 

Returns tuplet specifier or none.