def reverse(self): r'''Reverse note rhythm-maker: :: >>> reversed_maker = maker.reverse() :: >>> print reversed_maker.storage_format rhythmmakertools.NoteRhythmMaker( decrease_durations_monotonically=False, forbidden_written_duration=durationtools.Duration(1, 2), tie_rests=False ) :: >>> divisions = [(5, 8), (3, 8)] >>> leaf_lists = reversed_maker(divisions) >>> leaves = sequencetools.flatten_sequence(leaf_lists) >>> measures = \ ... measuretools.make_measures_with_full_measure_spacer_skips( ... divisions) >>> staff = Staff(measures) >>> measures = measuretools.replace_contents_of_measures_in_expr( ... staff, leaves) :: >>> show(staff) # doctest: +SKIP Returns new note rhythm-maker. ''' return DivisionIncisedNoteRhythmMaker.reverse(self)
def __init__( self, decrease_durations_monotonically=True, forbidden_written_duration=None, tie_rests=False, ): DivisionIncisedNoteRhythmMaker.__init__( self, [], [0], [], [0], 1, decrease_durations_monotonically=decrease_durations_monotonically, forbidden_written_duration=forbidden_written_duration, tie_rests=tie_rests, )