silence_first

rhythmmakertools.silence_first(n=1, inverted=None, use_multimeasure_rests=None)

Makes silence mask that matches the first n indices.

Silences first division:

>>> mask = rhythmmakertools.silence_first()
>>> f(mask)
rhythmmakertools.SilenceMask(
    pattern=patterntools.Pattern(
        indices=[0],
        ),
    )
>>> rhythm_maker = rhythmmakertools.NoteRhythmMaker(
...     division_masks=[mask],
...     )
>>> divisions = [(7, 16), (3, 8), (7, 16), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = rhythmmakertools.make_lilypond_file(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Silences first two divisions:

>>> mask = rhythmmakertools.silence_first(n=2)
>>> f(mask)
rhythmmakertools.SilenceMask(
    pattern=patterntools.Pattern(
        indices=[0, 1],
        ),
    )
>>> rhythm_maker = rhythmmakertools.NoteRhythmMaker(
...     division_masks=[mask],
...     )
>>> divisions = [(7, 16), (3, 8), (7, 16), (3, 8)]
>>> selections = rhythm_maker(divisions)
>>> lilypond_file = rhythmmakertools.make_lilypond_file(
...     selections,
...     divisions,
...     )
>>> show(lilypond_file) 

Silences no first divisions:

>>> mask = rhythmmakertools.silence_first(n=0)
>>> f(mask)
rhythmmakertools.SilenceMask(
    pattern=patterntools.Pattern(
        indices=[],
        ),
    )
>>> rhythm_maker = rhythmmakertools.NoteRhythmMaker(
...     division_masks=[mask],
...     )
>>> 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 silence mask.