), evans.attach("Global Context", mark_60, baca.selectors.leaf(10)), evans.attach( "Global Context", abjad.MetronomeMark((1, 4), 60), baca.selectors.leaf(10), ), evans.attach("Global Context", mark_108, baca.selectors.leaf(13)), evans.attach( "Global Context", abjad.MetronomeMark((1, 4), 108), baca.selectors.leaf(13), ), evans.call( "Voice 1", evans.PitchHandler(["7/1"], forget=False, as_ratios=True), lambda _: abjad.Selection(_).logical_tie(32), ), evans.call( "Voice 2", evans.PitchHandler(["5/1"], forget=False, as_ratios=True), lambda _: abjad.Selection(_).logical_tie(33), ), evans.call( "Voice 3", evans.PitchHandler(["3/1"], forget=False, as_ratios=True), lambda _: abjad.Selection(_).logical_tie(34), ), evans.call( "Voice 4", evans.PitchHandler(["1/1"], forget=False, as_ratios=True),
cello_rotated_chord_4 = evans.rotate(cello_chord_4, 9) cello_random_walk_chord_4 = [ x for x in evans.random_walk( random_seed=17, length=20000, step_list=[2, 1, 2], mapped_list=cello_rotated_chord_4, ) ] # ## HANDLERS ### # violin 1 violin_1_pitch_handler_one = evans.PitchHandler( pitch_list=violin_1_random_walk_chord_1, forget=False, name="violin_1_pitch_handler_one", pitch_count=34, ) violin_1_pitch_handler_two = evans.PitchHandler( pitch_list=violin_1_random_walk_chord_2, forget=False, name="violin_1_pitch_handler_two", pitch_count=56, ) violin_1_pitch_handler_three = evans.PitchHandler( pitch_list=violin_1_random_walk_chord_3, forget=False, name="violin_1_pitch_handler_three", pitch_count=30, ) violin_1_pitch_handler_four = evans.PitchHandler(
out_ = [] for sub_list in out: out_.append(list(sub_list)) voicewise_ratios = evans.sort_voices(out_, voices) handlers = [] fundamentals = ["c", "c'", "c'"] voice_length = 0 for fundamental, voice in zip(fundamentals, voicewise_ratios): handlers.append( evans.PitchHandler( [ evans.JIPitch(fundamental, ratio) for ratio in voicewise_ratios[voice] ], forget=False, )) voice_length = len(voicewise_ratios[voice]) handlers.reverse() maker = abjad.LeafMaker() durations = [abjad.Duration((10, 4)) for _ in range(len(out_))] leaves_1 = [abjad.Rest((3, 8))] + [maker(["c'"], durations)] leaves_2 = [abjad.Rest( (3, 4))] + [maker(["c'"], durations)] + [abjad.Rest((3, 4))] leaves_3 = [maker(["c"], durations)] group = abjad.StaffGroup([
days = evans.Sequence(days).sort().stack_pitches(as_ratios=True) for _ in years: print(_) print("") for _ in days: print(_) staff1 = abjad.Staff([abjad.Note("fs,,4") for _ in years]) staff2 = abjad.Staff([abjad.Note("a,4") for _ in days]) h1 = evans.PitchHandler(years, as_ratios=True, forget=False) h2 = evans.PitchHandler(days, as_ratios=True, forget=False) h1(staff1) abjad.attach(abjad.Clef("bass"), staff1[0]) abjad.attach(abjad.Clef("treble"), staff1[4]) abjad.attach(abjad.Clef("treble^8"), staff1[-2]) h2(staff2) abjad.attach(abjad.Clef("bass"), staff2[0])
metronome_mark=((1, 4), 115), left_note=(abjad.Note("c'2")), right_note=(abjad.Note("c'4")), modulated_beat=(abjad.Note("c'4")), ), baca.selectors.leaf(0), ), evans.call("Voice 1", clef_handlers[0], lambda _: abjad.Selection(_)), evans.call("Voice 2", clef_handlers[1], lambda _: abjad.Selection(_)), evans.call("Voice 3", clef_handlers[2], lambda _: abjad.Selection(_)), evans.call("Voice 4", clef_handlers[3], lambda _: abjad.Selection(_)), evans.call( "Voice 1", evans.PitchHandler( [ "gtqs", ], forget=False, ), lambda _: abjad.Selection(_), ), evans.call( "Voice 1", apply_spanner, lambda _: abjad.Selection(_), ), # evans.attach( # "Voice 1", # abjad.Dynamic("ff"), # baca.selectors.leaf(0), # ), evans.attach(
voice_3_chord_5, voice_3_chord_6, voice_3_chord_7, voice_3_chord_8, voice_4_chord_1, voice_4_chord_2, voice_4_chord_3, voice_4_chord_4, voice_4_chord_5, voice_4_chord_6, voice_4_chord_7, voice_4_chord_8, ) piano_pitch_handler_one_1 = evans.PitchHandler( pitch_list=voice_1_chord_1, forget=False, name="voice_1_chord_1" ) piano_pitch_handler_one_2 = evans.PitchHandler( pitch_list=voice_1_chord_2, forget=False, name="voice_1_chord_2" ) piano_pitch_handler_one_3 = evans.PitchHandler( pitch_list=voice_1_chord_3, forget=False, name="voice_1_chord_3" ) piano_pitch_handler_one_4 = evans.PitchHandler( pitch_list=voice_1_chord_4, forget=False, name="voice_1_chord_4" ) piano_pitch_handler_one_5 = evans.PitchHandler(
source = [2] for interval in source_intervals: source.append(source[-1] + interval) added_sequences = evans.Sequence(source).derive_added_sequences( source_intervals, flat=True ) multiplied_sequences = evans.Sequence(added_sequences).derive_multiplied_sequences( source_intervals, flat=True ) set_one = microtones.PitchClassSet(multiplied_sequences) segment_one = microtones.PitchSegment(set_one).transpose(8) segment_one = segment_one.transpose(9) set_two = microtones.PitchClassSet(multiplied_sequences) segment_two = microtones.PitchSegment(set_two) segment_two += segment_two.invert(4).transpose(6) segment_two = segment_two.transpose(-10).retrograde() + segment_two segment_two = segment_two.transpose(9) saxophone_pitch_handler_one = evans.PitchHandler( pitch_list=segment_one, forget=False, name="saxophone_pitch_handler_one" ) saxophone_pitch_handler_two = evans.PitchHandler( pitch_list=segment_two, forget=False, name="saxophone_pitch_handler_two" )
clef="alto", add_extended_clefs=False, add_ottavas=False ) clef_handler_four = evans.ClefHandler( clef="bass", add_extended_clefs=True, add_ottavas=True ) clef_handlers = [ clef_handler_one, clef_handler_two, clef_handler_three, clef_handler_four, ] pitch_handler_one = evans.PitchHandler(pitch_list=[15], forget=False) pitch_handler_two = evans.PitchHandler(pitch_list=[3], forget=False) pitch_handler_three = evans.PitchHandler(pitch_list=[-9], forget=False) pitch_handler_four = evans.PitchHandler(pitch_list=[-21], forget=False) seg_3_pitch_handler_one = evans.PitchHandler(pitch_list=[15, 4], forget=False) seg_3_pitch_handler_two = evans.PitchHandler(pitch_list=[3, 4], forget=False) seg_3_pitch_handler_three = evans.PitchHandler(pitch_list=[-9, -8], forget=False) seg_3_pitch_handler_four = evans.PitchHandler(pitch_list=[-9, -8], forget=False)
import evans demo = evans.PitchHandler([1], forget=False) ## ## anuran_vn_I_1 = ["gqs''" for _ in range(29)] anuran_vn_II_1 = ["fs'" for _ in range(14)] anuran_va_1 = ["g'" for _ in range(13)] anuran_vc_1 = ["gs" for _ in range(13)] anuran_cb = ["a" for _ in range(4)] anuran_pitches = anuran_vn_I_1 + anuran_vn_II_1 + anuran_va_1 + anuran_vc_1 + anuran_cb anuran_pitch_handler = evans.PitchHandler( anuran_pitches, forget=False, ) va_1_anuran_pitch_handler = evans.PitchHandler( ["g'"], forget=False, ) ## ## guerrero_pitch_handler = evans.PitchHandler( [
import evans from chalk_line.materials.pitch.segment_01.pitches import chord_1 flute_pitch_handler_one = evans.PitchHandler(pitch_list=chord_1, forget=False, name="chord_1")
evans.call( "score", evans.SegmentMaker.beam_score, lambda _: abjad.Selection(_).components(abjad.Score), ), evans.attach( "Global Context", abjad.Markup( r"""\markup \override #'(font-name . "STIXGeneral Bold") \box \caps Plateaus""", direction=abjad.Up, ), baca.selectors.leaf(0), ), evans.call( "Voice 1", evans.PitchHandler([12], apply_all=True, apply_all_spelling="sharp"), lambda _: abjad.Selection(_), ), evans.call( "Voice 2", evans.PitchHandler([0], apply_all=True, apply_all_spelling="sharp"), lambda _: abjad.Selection(_), ), evans.call( "Voice 3", evans.PitchHandler([-12], apply_all=True, apply_all_spelling="sharp"), lambda _: abjad.Selection(_), ), evans.call( "Voice 4", evans.PitchHandler([-24], apply_all=True, apply_all_spelling="sharp"),
"Voice 3", crescendi, lambda _: abjad.Selection(_), ), evans.call( "Voice 4", crescendi, lambda _: abjad.Selection(_), ), evans.call( "Voice 1", evans.PitchHandler( [ ["a'", "b''"], ["a'", "c'''"], ["a'", "cs'''"], ["a'", "ctqs'''"], ], forget=False, ), lambda _: abjad.Selection(_), ), evans.call( "Voice 2", evans.PitchHandler( [ ["e'", "g'"], ["e'", "b'"], ["e'", "c''"], ], forget=False,
import evans from sim.materials.pitch.segment_04.pitches import ( voice_1_chord_1, voice_2_chord_1, voice_3_chord_1, voice_4_chord_1, ) piano_pitch_handler_one_1 = evans.PitchHandler(pitch_list=voice_1_chord_1, forget=False, name="voice_1_chord_1") # ## piano_pitch_handler_two_1 = evans.PitchHandler(pitch_list=voice_2_chord_1, forget=False, name="voice_2_chord_1") # ## piano_pitch_handler_three_1 = evans.PitchHandler(pitch_list=voice_3_chord_1, forget=False, name="voice_3_chord_1") # ## piano_pitch_handler_four_1 = evans.PitchHandler(pitch_list=voice_4_chord_1, forget=False, name="voice_4_chord_1")
evans.attach( "Global Context", abjad.Markup( r"""\markup \override #'(font-name . "STIXGeneral Bold") \box \caps Anomaly""", direction=abjad.Up, ), baca.selectors.leaf(0), ), evans.attach( "Global Context", abjad.LilyPondLiteral(r"\break", format_slot="before"), baca.selectors.leaf(10), ), evans.call( "Voice 1", evans.PitchHandler([0], apply_all=True, apply_all_spelling="sharp"), lambda _: abjad.Selection(_), ), evans.call( "Voice 2", evans.PitchHandler([0], apply_all=True, apply_all_spelling="sharp"), lambda _: abjad.Selection(_), ), evans.call( "Voice 3", evans.PitchHandler([-12], apply_all=True, apply_all_spelling="sharp"), lambda _: abjad.Selection(_), ),
import evans from sim.materials.pitch.segment_01.pitches import chord_1, chord_2, chord_3, chord_4 piano_pitch_handler_one = evans.PitchHandler(pitch_list=chord_1, forget=False, name="chord_1") piano_pitch_handler_two = evans.PitchHandler(pitch_list=chord_2, forget=False, name="chord_2") piano_pitch_handler_three = evans.PitchHandler(pitch_list=chord_3, forget=False, name="chord_3") piano_pitch_handler_four = evans.PitchHandler(pitch_list=chord_4, forget=False, name="chord_4")
for x in evans.Sequence(cello_rotated_chord_4).random_walk( random_seed=17, length=5000, step_list=[2, 1, 2], ) ] cello_random_walk_chord_4 = [ evans.to_nearest_quarter_tone(_) for _ in cello_random_walk_chord_4 ] # ## HANDLERS ### # violin 1 violin_1_pitch_handler_one = evans.PitchHandler( pitch_list=violin_1_random_walk_chord_1, forget=False, name="violin_1_pitch_handler_one", ) violin_1_pitch_handler_two = evans.PitchHandler( pitch_list=violin_1_random_walk_chord_2, forget=False, name="violin_1_pitch_handler_two", ) violin_1_pitch_handler_three = evans.PitchHandler( pitch_list=violin_1_random_walk_chord_3, forget=False, name="violin_1_pitch_handler_three", ) violin_1_pitch_handler_four = evans.PitchHandler( pitch_list=violin_1_random_walk_chord_4, forget=False,
composite_handler_1 = evans.CompositeHandler( rhythm_handler=evans.RhythmHandler( evans.RTMMaker( rtm=[ "(1 (-4 1))", "(1 (3 -1))", "(1 (-2 1))", "(1 (1 -1))", ] ), forget=False, ), attachment_handlers=[ evans.PitchHandler( [0, 1, 2, 3], forget=False, ), evans.BendHandler( [2.5, -3.5, 3, -3, 3.5, -2.5], boolean_vector=[0, 1, 0, 0, 1], ), evans.DynamicHandler( dynamic_list=["f", "mf"], hold_first_boolean_vector=[1, 0], hold_first_forget=False, hold_last_boolean_vector=[0, 1], hold_last_forget=False, forget=False, with_constante_hairpins=False, ), ],
evans.call( "score", evans.SegmentMaker.beam_score, lambda _: abjad.Selection(_).components(abjad.Score), ), evans.attach( "Global Context", abjad.Markup( r"""\markup \override #'(font-name . "STIXGeneral Bold") \box \caps Fluxes/Phylums""", direction=abjad.Up, ), baca.selectors.leaf(0), ), evans.call( "Voice 1", evans.PitchHandler([4], apply_all=True), lambda _: abjad.Selection(_), ), evans.call( "Voice 3", evans.PitchHandler([-3], apply_all=True), lambda _: abjad.Selection(_), ), evans.call( "Voice 4", evans.PitchHandler([-24], apply_all=True), lambda _: abjad.Selection(_), ), evans.call( "Voice 1", clef_handlers[0],