def new(self, **kwargs): r'''Create new tuplet monad rhythm-maker with `kwargs`: :: >>> new_maker = maker.new() :: >>> print new_maker.storage_format rhythmmakertools.TupletMonadRhythmMaker( beam_each_cell=False, beam_cells_together=False ) :: >>> divisions = [(2, 5), (2, 5), (1, 4), (1, 5), (3, 4)] >>> tuplet_lists = new_maker(divisions) >>> tuplets = sequencetools.flatten_sequence(tuplet_lists) >>> staff = stafftools.RhythmicStaff(tuplets) :: >>> show(staff) # doctest: +SKIP Returns new tuplet monad rhythm-maker. ''' return RhythmMaker.new(self, **kwargs)
def new(self, **kwargs): r'''Create new even-run rhythm-maker with `kwargs`: :: >>> new_maker = maker.new(denominator_multiplier_exponent=0) :: >>> print new_maker.storage_format rhythmmakertools.EvenRunRhythmMaker( denominator_multiplier_exponent=0, beam_each_cell=True, beam_cells_together=False ) :: >>> divisions = [(4, 8), (3, 4), (2, 4)] >>> lists = new_maker(divisions) >>> music = sequencetools.flatten_sequence(lists) >>> measures = \ ... measuretools.make_measures_with_full_measure_spacer_skips( ... divisions) >>> staff = stafftools.RhythmicStaff(measures) >>> measures = measuretools.replace_contents_of_measures_in_expr( ... staff, music) :: >>> show(staff) # doctest: +SKIP Returns new even-run rhythm-maker. ''' return RhythmMaker.new(self, **kwargs)
def new(self, **kwargs): r'''Create new skip rhythm-maker with `kwargs`: :: >>> new_maker = maker.new() :: >>> print new_maker.storage_format rhythmmakertools.SkipRhythmMaker() :: >>> divisions = [(1, 4), (3, 16), (5, 8)] >>> leaf_lists = new_maker(divisions) >>> music = 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, music) :: >>> show(staff) # doctest: +SKIP Returns new skip rhythm-maker. ''' return RhythmMaker.new(self, **kwargs)
def reverse(self): r'''Reverse equal-division rhythm-maker: :: >>> reversed_maker = maker.reverse() :: >>> print reversed_maker.storage_format rhythmmakertools.EqualDivisionRhythmMaker( leaf_count=4, is_diminution=True, beam_each_cell=True, beam_cells_together=False ) :: >>> divisions = [(1, 2), (3, 8), (5, 16)] >>> tuplet_lists = reversed_maker(divisions) >>> music = sequencetools.flatten_sequence(tuplet_lists) >>> measures = \ ... measuretools.make_measures_with_full_measure_spacer_skips( ... divisions) >>> staff = stafftools.RhythmicStaff(measures) >>> measures = measuretools.replace_contents_of_measures_in_expr( ... staff, music) :: >>> show(staff) # doctest: +SKIP Defined equal to copy of maker. Returns new equal-division rhythm-maker. ''' return RhythmMaker.new(self)
def new(self, **kwargs): r'''Create new equal-division rhythm-maker with `kwargs`: :: >>> new_maker = maker.new(is_diminution=False) :: >>> print new_maker.storage_format rhythmmakertools.EqualDivisionRhythmMaker( leaf_count=4, is_diminution=False, beam_each_cell=True, beam_cells_together=False ) :: >>> divisions = [(1, 2), (3, 8), (5, 16)] >>> tuplet_lists = new_maker(divisions) >>> music = sequencetools.flatten_sequence(tuplet_lists) >>> measures = \ ... measuretools.make_measures_with_full_measure_spacer_skips( ... divisions) >>> staff = stafftools.RhythmicStaff(measures) >>> measures = measuretools.replace_contents_of_measures_in_expr( ... staff, music) :: >>> show(staff) # doctest: +SKIP Returns new equal-division rhythm-maker. ''' return RhythmMaker.new(self, **kwargs)