sustain_all

rhythmmakertools.sustain_all(inverted=None)

Makes sustain mask that matches all indices.

Example 1. Without mask:

>>> rhythm_maker = rhythmmakertools.TupletRhythmMaker(
...     tuplet_ratios=[(3, 1)],
...     )
>>> divisions = [(7, 16), (3, 8), (7, 16), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = rhythmmakertools.make_lilypond_file(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Example 2. With mask:

>>> mask = rhythmmakertools.sustain_all()
>>> print(format(mask))
rhythmmakertools.SustainMask(
    pattern=patterntools.Pattern(
        indices=(0,),
        period=1,
        ),
    )
>>> rhythm_maker = rhythmmakertools.TupletRhythmMaker(
...     division_masks=[mask],
...     tuplet_ratios=[(3, 1)],
...     )
>>> divisions = [(7, 16), (3, 8), (7, 16), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = rhythmmakertools.make_lilypond_file(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Returns sustain mask.