예제 #1
0
 def __init__(self, forbidden_written_duration=None):
     DivisionIncisedRestRhythmMaker.__init__(
         self, [],
         [0],
         [],
         [0],
         1,
         decrease_durations_monotonically=True,
         forbidden_written_duration=forbidden_written_duration,
         tie_rests=False,
         )
예제 #2
0
    def reverse(self):
        r'''Reverse rest rhythm-maker:

        ::

            >>> reversed_maker = maker.reverse()

        ::

            >>> print reversed_maker.storage_format
            rhythmmakertools.RestRhythmMaker(
                forbidden_written_duration=durationtools.Duration(1, 4)
                )

        ::

            >>> divisions = [(5, 16), (3, 8)]
            >>> leaf_lists = reversed_maker(divisions)
            >>> leaves = sequencetools.flatten_sequence(leaf_lists)
            >>> measures = \
            ...     measuretools.make_measures_with_full_measure_spacer_skips(
            ...     divisions)
            >>> staff = stafftools.RhythmicStaff(measures)
            >>> measures = measuretools.replace_contents_of_measures_in_expr(
            ...     staff, leaves)

        ::

            >>> show(staff) # doctest: +SKIP

        Returns new rest rhythm-maker.
        '''
        return DivisionIncisedRestRhythmMaker.reverse(self)