abjadext.rmakers.rewrite_sustained(lambda _: abjad.Selection(_).tuplets()), ) long_rhythm_handler = evans.RhythmHandler( rmaker=long_rmaker, forget=False, name="long_rhythm_handler", ) #### SEGMENT 10 tap_rmaker = evans.RTMMaker( rtm=[ "(1 (-1 1 -1))", "(1 (1 -2 1))", "(1 (1 1 -2 1))", "(1 (1 -3 1 -1 1))", "(1 (1 -1 1 1 1 -1))", ] ) tap_rhythm_handler = evans.RhythmHandler( rmaker=tap_rmaker, forget=False, name="tap_rhythm_handler", ) #### SEGMENT 11 noise_rmaker = evans.RTMMaker( rtm=[
padovan_1 = evans.e_dovan_cycle(n=2, iters=30, first=1, second=1, modulus=9) padovan_2 = evans.e_dovan_cycle(n=2, iters=30, first=2, second=3, modulus=5) padovan_3 = evans.e_dovan_cycle(n=2, iters=30, first=1, second=1, modulus=7) padovan_4 = evans.e_dovan_cycle(n=2, iters=30, first=4, second=7, modulus=9) rmaker_three = abjadext.rmakers.stack( abjadext.rmakers.talea(padovan_1, 8, extra_counts=[0, 1, 0, -1]), # B abjadext.rmakers.trivialize(abjad.select().tuplets()), abjadext.rmakers.extract_trivial(abjad.select().tuplets()), abjadext.rmakers.rewrite_rest_filled(abjad.select().tuplets()), abjadext.rmakers.rewrite_sustained(abjad.select().tuplets()), ) # ##### rmaker_four = evans.RTMMaker(rtm=final_rtm_list) # D # ##### rmaker_five = abjadext.rmakers.stack( abjadext.rmakers.talea(padovan_2, 4, extra_counts=[0, 1, 0, -1]), # E abjadext.rmakers.trivialize(abjad.select().tuplets()), abjadext.rmakers.extract_trivial(abjad.select().tuplets()), abjadext.rmakers.rewrite_rest_filled(abjad.select().tuplets()), abjadext.rmakers.rewrite_sustained(abjad.select().tuplets()), ) # ## HANDLERS ### silence_maker_ = abjadext.rmakers.stack( abjadext.rmakers.NoteRhythmMaker(), abjadext.rmakers.force_rest(abjad.select().leaves(pitched=True)), )
[ abjad.Voice( "c'8 c'8 c'8 c'8 c'8 c'8 c'8 c'8", name="Voice 2", ) ], name="Staff 2", ), ], name="group", ) ], name="Score", ) h = evans.IntermittentVoiceHandler( evans.RhythmHandler( rmakers.stack(evans.RTMMaker([ "(1 (1 1 1))", ]), ), forget=False, ), direction=abjad.Up, ) selector = abjad.select().leaf(1) target = selector(score["Voice 1"]) h(target) abjad.show(score)
(1, -1, -2, 1, -1), (-1, 1, 2, -1, -1), (1, 1, -2, -1, -1), (-1, 1, 2, 1, -1), (-1, 1, 2, -1, 1), (-1, -1, 2, 1, 1), ]), # C abjadext.rmakers.trivialize(lambda _: abjad.Selection(_).tuplets()), abjadext.rmakers.extract_trivial(lambda _: abjad.Selection(_).tuplets()), abjadext.rmakers.rewrite_rest_filled( lambda _: abjad.Selection(_).tuplets()), abjadext.rmakers.rewrite_sustained(lambda _: abjad.Selection(_).tuplets()), ) # ##### rmaker_seven = evans.RTMMaker(rtm=final_rtm_list) # ##### rmaker_eight = abjadext.rmakers.stack( abjadext.rmakers.talea(padovan_4, 8, extra_counts=[0, 1, 0, -1]), # E abjadext.rmakers.trivialize(lambda _: abjad.Selection(_).tuplets()), abjadext.rmakers.extract_trivial(lambda _: abjad.Selection(_).tuplets()), abjadext.rmakers.rewrite_rest_filled( lambda _: abjad.Selection(_).tuplets()), abjadext.rmakers.rewrite_sustained(lambda _: abjad.Selection(_).tuplets()), ) # ## HANDLERS ### silence_maker_ = abjadext.rmakers.stack( abjadext.rmakers.NoteRhythmMaker(), abjadext.rmakers.force_rest(
import evans rmaker_one = evans.RTMMaker(rtm=[ "(1 (3 (1 (1 1 1)) (2 (1 1)) (2 (1 1 1 1))))", "(1 ((1 (2 1 1)) 1 2))", "(1 ((1 (1 1 1)) 1 1))", "(1 (3 (3 (1 1 1)) 2))", "(1 (2 (2 (1 1 1)) 1))", "(1 (3 1 2 2))", "(1 (3 1 2 (2 (1 1 1))))", "(1 ((3 (1 1)) 1 2 (2 (1 1 1))))", "(1 ((3 (1 1)) 1 (2 (1 1)) (2 (1 1 1))))", "(1 ((3 (2 2)) 2 (3 (2 2)) (3 (2 2 2))))", "(1 ((3 (3 3)) 3 (3 (3 3)) (3 (3 3 3))))", "(1 (1 2 2 3))", "(1 (1 2 2 (1 (1 1 3))))", "(1 ((1 (1 1)) 2 2 (1 (1 1 3))))", "(1 ((1 (1 1)) 2 (1 (1 2)) (1 (1 1 3))))", "(1 ((2 (2 2)) 3 (2 (2 3)) (2 (2 2 3))))", "(1 ((3 (3 3)) 3 (3 (3 3)) (3 (3 3 3))))", ])
import abjad import evans from abjadext import rmakers rmaker_one = evans.RTMMaker(rtm=[ "(1 ((3 (1 1 1)) 1 2 2))", "(1 (1 2 2 3))", "(1 ((2 (1 1)) 2 3 1))", "(1 ((2 (1 1)) 3 1 2))", ]) rmaker_two = rmakers.stack( rmakers.talea( [3, -1, 2, -2, 3, 1, 2, 2, -3, 1, -2, 2], 4, extra_counts=[0, 3, -1, 2, -2, 0, 3, 1, 2, 2, 0, -3, 1, -2, 2], ), rmakers.trivialize(abjad.select().tuplets()), rmakers.extract_trivial(abjad.select().tuplets()), rmakers.rewrite_rest_filled(abjad.select().tuplets()), rmakers.rewrite_sustained(abjad.select().tuplets()), ) rmaker_three = evans.RTMMaker(rtm=[ "(1 (2 2 1 3))", "(1 (2 2 1 4))", "(1 (3 3 3 5))", "(1 (4 4 4 5))", "(1 (4 4 3 4))", # "(1 (5 4 4 5))", "(1 (2 1 1 2))",
import evans rmaker_one = evans.RTMMaker(rtm=["(1 (1))"])
(2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (5, 4), (4, 4), (3, 4), (2, 4), ] nonlast_tuplets = abjad.select().tuplets()[:-1] last_leaf = abjad.select().leaf(-1) s = rmakers.stack( evans.RTMMaker(final_rtm_list), rmakers.force_rest(abjad.select().leaves().get([0, -2, -1])), rmakers.tie(nonlast_tuplets.map(last_leaf)), rmakers.trivialize(abjad.select().tuplets()), rmakers.extract_trivial(abjad.select().tuplets()), rmakers.rewrite_rest_filled(abjad.select().tuplets()), rmakers.rewrite_sustained(abjad.select().tuplets()), rmakers.beam(), ) h = evans.RhythmHandler(s, forget=False) voice_1_selections = h(durs) staff_1 = abjad.Staff(name="Voice 1", lilypond_type="RhythmicStaff") staff_1.extend(voice_1_selections) quantizer = evans.RhythmTreeQuantizer() final_rtm_list = [quantizer(_) for _ in final_rtm_list]
## ## anuran_maker = rmakers.stack( evans.RTMMaker([ "(1 ((1 (1 1 1 -1 1)) (1 (1 1 -1 1 1)) (1 (1 -1 1 1 -1)) -1))", # vnI-1 01 "(1 ((2 (-1 1 1 1 -1)) (2 (1 1 1 -1 1))))", "(1 ((2 (1 1 -1 1 1)) (1 (2 -3))))", "(1 (-1 (1 (-2 1 1 1)) -1 (1 (1 1 -1 1))))", "(1 ((1 (1 1)) (1 (-1 1)) (1 (1 1)) (1 (1 -1))))", # vnII-1 01 "(1 (-2 (1 (-1 1)) -1))", "(1 ((1 (1 1)) (1 (1 -1)) -1))", "(1 (-1 (1 (1 1)) (1 (1 -1)) (1 (-1 1))))", "(1 (1 -1 1 -1))", # va-1 01 "(1 (1 -1 1 -1))", "(1 (1 -1 1))", "(1 (-1 1 -1 1))", "(1 (-1 1 -1 1))", "(1 (-1 1 -1))", "(1 (1 -1 1 -1))", "(1 ((1 (-1 1 -1)) (1 (1 -1 1)) (1 (-1 1 -1))))", # vc-1 01 "(1 (-1 (1 (-1 1 1)) -1 (1 (-1 1 -1))))", "(1 (-1 (1 (-2 1)) -1 (1 (1 1 -1))))", "(1 (-1 (1 (-1 1)) -1))", "(1 ((1 (-1 1 -1)) -1 (1 (-1 1)) -1))", "(1 (1 1))", # cb 01 "(1 ((3 (1 1)) -1))", ]), rmakers.trivialize(abjad.select().tuplets()), rmakers.extract_trivial(abjad.select().tuplets()), rmakers.rewrite_rest_filled(abjad.select().tuplets()), rmakers.rewrite_sustained(abjad.select().tuplets()),
rmaker_one = evans.RTMMaker( rtm=[ "(1 ((3 (1 2)) 1))", "(1 ((2 (1 1)) 1))", "(1 ((1 (1 1)) 1))", "(1 (4 (2 (3 1 1)) (2 (1 1 2))))", "(1 (3 (1 (2 1 1)) (1 (1 1 1))))", "(1 (2 (1 (1 1 1)) (1 (1 1 1))))", "(1 (1 (1 (1 1 1)) (1 (1 1 1))))", "(1 (1))", "(1 (1 (3 (2 1))))", "(1 (1 (2 (1 1))))", "(1 ((1 (1 1)) 1))", "(1 ((1 (2 2 1)) (2 (2 1 2)) (4 (1 1 1 1))))", "(1 ((1 (1 1 2)) (1 (1 1 1)) 3))", "(1 ((1 (1 1 1)) (1 (1 1 1)) 2))", "(1 (1 (1 (1 1 1)) (1 (1 1 1))))", "(1 (1))", "(1 ((3 (1 1 2 1)) 1))", "(1 ((2 (1 1 1 1)) 1))", "(1 ((1 (1 1 1 1)) 1))", "(1 ((4 (1 1 1)) (2 (3 1 1)) (2 (1 1 2))))", "(1 ((3 (1 1 1)) (1 (2 1 1)) (1 (1 1 1))))", "(1 ((2 (1 1 1)) (1 (1 1 1)) (1 (1 1 1))))", "(1 (1 1 1 1 1 1 1 1 1))", "(1 (1))", ], tie_across_divisions=True, )