def block2(lib): b2 = free_segment.AlocFreeSegmentBlock(tempo_command=""" " 20'' " """) b2["cco_clarinets"].machine_arrow(lib("intro_phrase_wiggle").crop( "events", 0, 3).ops("events")(0, "p", "\\<", "(")( 2, ")", )(3, "mp", "fermata", beats=4)(), instruction="repeat, freely (staggered)") b2["cco_percussion"].machine_arrow(intro.hold_cell(0, ":32", "fermata"), instruction="(cont. repeating)") b2["cco_violin_i1"].machine_arrow(lib("intro_cell_down").t(17), instruction="repeat") b2["cco_violin_i2"].machine_arrow(intro.hold_cell(19), instruction="repeat") b2["cco_violin_i3"].machine(lib("cell_rest4"), machine_pad=(2, 0), pad=(1.5, 0)) b2["cco_violin_i3"].machine_arrow(lib("intro_phrase_wiggle").crop( "events", 0, 1).ops("events")(0, "pp")(3, "(")(4, ")", beats=2)(), instruction="repeat, freely") b2["cco_violin_ii1"].machine_arrow( lib("intro_rock3_cco_oboe1_c38_41").eps()(), instruction="repeat, freely") b2["cco_violin_ii2"].machine_arrow(intro.hold_cell(4), instruction="repeat") b2["cco_violin_ii3"].machine_arrow(lib("intro_phrase_wiggle").crop( "events", 0, 2).ops("events")(0, "pp")(3, beats=4)(), instruction="repeat, freely") b2["cco_viola1"].machine_arrow(lib("intro_rock3_cco_bassoon_c39_41").crop( "events", 0, 1).eps(0, "pp", "\\<")( 0, 2, "(", )( 1, 3, ")", )(5, "p", beats=4)(), instruction="repeat, freely") b2["cco_viola2"].machine_arrow(intro.hold_cell( -6, "p", ), instruction="repeat") b2["cco_viola3"].machine_arrow(lib("intro_a_phrase_1").cells[1](), instruction="repeat, freely") b2["cco_viola4"].machine_arrow(lib("intro_phrase_straight_i").crop( "events", 3), instruction="repeat, freely") b2["cco_cello1"].machine_arrow(lib("intro_cell_shake").t(5), instruction="repeat, freely") b2["cco_cello2"].machine_arrow(lib("intro_a_cell_2"), instruction="repeat, freely") b2["cco_bass"].machine_arrow(intro.hold_cell( -6, "pp", ), instruction="repeat") return b2
def block0(lib): b0 = free_segment.AlocFreeSegmentBlock( tempo_command=""" \\note #"4" #UP "= 72 ca, freely, 20'' " """) # b0["ooa_bass_guitar"].machine(ImaginaryCell(rhythm=(4,), pitches=(-11,)).eps( # 0,"mp")(), # ) # b0["ooa_bass_guitar"].machine_arrow(lib("cell_rest4"), # # pad=(8,1), # with_repeat=False, # machine_pad=(8,8) # ) b0["cco_percussion"].machine(lib("cell_rest2"), pad=(1.5, 0)) b0["cco_percussion"].machine_arrow( intro.hold_cell(0, "pp", ":32", "fermata", "low tom, soft mallets"), instruction="repeat").eps(0, "\\percStaff")() b0["cco_harp"].machine( ImaginaryCell(rhythm=(1, ), pitches=((1, 2, 19, 20), )).eps(0, ">", "ff")(), ) b0["cco_harp"].machine_arrow( lib("cell_rest4"), # pad=(8,1), with_repeat=False, machine_pad=(6, 6)) b0["cco_violin_i1"].machine_arrow(intro.hold_cell( 20, "pp", ), instruction="repeat") b0["cco_violin_ii1"].machine_arrow(intro.hold_cell( 7, "pp", ), instruction="repeat") b0["cco_viola1"].machine_arrow(intro.hold_cell( -11, "pp", ), instruction="repeat") b0["cco_viola2"].machine(lib("cell_rest2"), pad=(1.5, 0)) b0["cco_viola2"].machine_arrow(lib("intro_a_phrase_0").eps( 0, "pp", )(), instruction="repeat, freely") b0["cco_viola3"].machine(lib("cell_rest2"), pad=(1.5, 0)) b0["cco_viola3"].machine_arrow( lib("intro_phrase_mistify").eps(0, "pp")(), instruction="repeat, freely", ) b0["cco_viola4"].machine(lib("cell_rest2"), pad=(1.5, 0)) b0["cco_viola4"].machine_arrow(lib("intro_phrase_straight_i").eps(1, "pp")(), instruction="repeat, freely") b0["cco_bass"].machine(lib("cell_rest4").eps(0, "fermata", "wait 8-10''")(), pad=(1.5, 1)) b0["cco_bass"].machine_arrow(intro.hold_cell( -4, "pp", ), instruction="repeat") return b0
def block1(lib): b1 = free_segment.AlocFreeSegmentBlock(tempo_command=""" " 20'' " """) b1["cco_clarinets"].machine(lib("cell_rest2")) b1["cco_clarinets"].machine_arrow(lib("intro_line_riff").eps( 0, "(", "ppp", "\\<", "a2, 2nd start after 1st")(5, ")")(6, "mp")(), instruction="repeat, freely (staggered)") b1["cco_percussion"].machine_arrow(intro.hold_cell(0, ":32", "fermata"), instruction="(cont. repeating)") b1["cco_violin_i1"].machine_arrow(lib("intro_cell_down").t(18), instruction="repeat") # same as violin 1 in last measure b1["cco_violin_i2"].machine_arrow(intro.hold_cell( 20, "pp", ), instruction="repeat") b1["cco_violin_ii1"].machine_arrow(intro.hold_cell(7, ), instruction="repeat") b1["cco_violin_ii2"].machine_arrow(lib("intro_cell_down").eps(0, "pp", beats=0.5)(), instruction="repeat") b1["cco_viola1"].machine_arrow(lib("intro_a_phrase_0").t(-10), instruction="repeat, freely") b1["cco_viola2"].machine_arrow(lib("intro_rock3_cco_bassoon_c39_41").eps( 0, "pp", "\\<")( 1, 3, "(", )( 2, 4, ")", )(5, "p")(6, beats=4)(), instruction="repeat, freely") b1["cco_viola3"].machine_arrow(lib("intro_a_phrase_1"), instruction="repeat, freely") b1["cco_viola4"].machine_arrow(lib("intro_phrase_straight_i").crop( "events", 0, 2).eps(5, "fermata", beats=2)(), instruction="repeat, freely") b1["cco_cello1"].machine_arrow(lib("intro_cell_shake"), instruction="repeat, freely") b1["cco_cello2"].machine_arrow(intro.hold_cell( 1, "pp", ), instruction="repeat") b1["cco_bass"].machine_arrow(intro.hold_cell( -5, "pp", ), instruction="repeat") return b1
def score4(lib): s = score.ImaginaryScore() sb = lib("integrate_block4") s = sb().annotate(slur_cells=True, label=("phrases", "cells")).to_score(s) drum_set = ImaginarySegment( get_improv_line(instruction="improv", rhythm=(0.5, ) * 8, times=16).eps(0, "f")(), ) s.staves["ooa_drum_set"].append(drum_set) string_pulses = pulse_on_off_beat.PulseOnOffBeat( sb, fabric_staves=("ooa_violin1", "ooa_violin2", "ooa_cello1", "ooa_cello2", "cco_violin_i", "cco_violin_ii", "cco_viola", "cco_cello", "cco_bass"), after_func=lambda x: x.eps(0, "f")(), phrase_beats=(4, ) * 16, ranges=pitch_ranges.HILL_DOWN_RANGES, ) string_pulses.staves["cco_bass"].phrases[0].t(-12) string_pulses.staves["cco_bass"].phrases[1].t(-12) s.extend_from(string_pulses) guitars = osti.Osti(sb.with_only("bass_drones"), fabric_staves=( "ooa_bass_guitar", "ooa_guitar", ), ranges=pitch_ranges.BOTTOM_RANGES, osti_pulse_duration=1, osti_cell_length=16, osti_cell_count=3, after_func=lambda x: x.eps(0, "fat fx", "f")()) for seg in guitars.segments: seg.stack_p([(0, 7)]) guitars_end = osti.Osti(sb.with_only("bass_drones"), fabric_staves=( "ooa_bass_guitar", "ooa_guitar", ), ranges=pitch_ranges.BOTTOM_RANGES, osti_pulse_duration=4, osti_cell_length=1, osti_cell_count=4, after_func=lambda x: x.eps(0, "distorted") (2, "\\>")()) for seg in guitars_end.segments: seg.stack_p([(0, 7)]) guitars_end.cells.setattrs(respell="sharps") trombones = lambda_segment.LambdaSegment( sb.with_only("bass_line"), fabric_staves=("ooa_trombone", "cco_trombone"), func=lambda x: x.eps(1, "ff")(), # func = lambda x: x.only_first("cells",8) ) timp_seg = trombones.staves["cco_trombone"].segments[0]().crop( "cells", 0, 1) for n in timp_seg.note_events: if not n.pitch in (-23, -21, -16, -11, -9, -4): n.pitch = "R" timp_seg.transformed(calliope.StandardDurations()).ops("note_events")( 0, "ff")() timp_seg.smart_ranges([(-17, -5)]) timp_seg.note_events.tag(">") timp_seg.append( ImaginaryCell(rhythm=(2, 2), ).eps(0, "\\percStaff", "sus. cym. (timp beaters)", "mp", "\\<", ":32")(1, "f", ":32")()) s.staves["cco_percussion"].append(timp_seg) trombones.staves["ooa_trombone"].note_events[-9].tag("\\>") trombones.staves["cco_trombone"].note_events[-9].tag("\\>") trombones.staves["ooa_trombone"].note_events[-1].tag("mf") trombones.staves["cco_trombone"].note_events[-1].tag("p") s.extend_from(guitars, trombones) sax_melody = lambda_segment.LambdaSegment( sb.with_only("high_drones"), fabric_staves=instrument_groups.get_instruments( "ooa_winds", "sax", ) + ("ooa_horn", "ooa_trumpet"), func=lambda x: x.only_first("cells", 4).slur_cells().ops("note_events") (0, "f")(), funcs=( lambda x: x.t(12), #fl lambda x: x, #cl lambda x: x.t(-24), #bsn lambda x: x, #as lambda x: x.t(-5), #as lambda x: x.t(-12), #ts lambda x: x.t(-24), #bs lambda x: x.t(-12), #hn lambda x: x.t(-12), #tpt )) cco_melody = lambda_segment.LambdaSegment( sb.with_only("mid_drones"), fabric_staves=instrument_groups.get_instruments("cco_winds", ) + ("cco_horn", "cco_trumpet"), func=lambda x: x.only_first("cells", 4).slur_cells().ops("note_events") (0, "f")(), funcs=( lambda x: x.t(12), #fl lambda x: x.t(12), #fl lambda x: x.t(12), #ob lambda x: x.t(12), #ob lambda x: x, #cl lambda x: x, #cl lambda x: x.t(-24), #bsn lambda x: x.t(-12), #hn lambda x: x.t(0), #tpt )) altos1 = lambda_segment.LambdaSegments( sb.with_only("counter_line"), fabric_staves=("ooa_alto_sax2", "ooa_alto_sax1"), funcs=( lambda x: x.with_only("cells", 16, 17, 18, 19).poke("cells", 0, 2). smear_after(fill=True, gap_beats=1).slur_cells().eps(0, "f")(), lambda x: x.with_only("cells", 16, 17, 18, 19).poke("cells", 1, 3). smear_after(fill=True, gap_beats=1).slur_cells().eps(2, "f")(), )) altos2 = lambda_segment.LambdaSegments( sb.with_only("melody_line1", "melody_line2"), fabric_staves=("ooa_alto_sax1", "ooa_alto_sax2"), funcs=( lambda x: x.with_only("cells", 10, 11).slur_cells().eps()(), lambda x: x.with_only("cells", 10, 11).slur_cells().eps()(), )) end_doves = x = dovetail.Dovetail( sb, fabric_staves=("cco_horn", "cco_trumpet", "cco_trombone", "cco_bassoon"), ranges=pitch_ranges.LOW_TO_HIGH_RANGES, selectable_start_beat=10 * 4, tag_all_note_events=("."), # dove_count = 4, # dove_event_count = 4, # tail_event_count = 1, dovetail_duration=24, # event_duration = 0.5, offset=3, after_func=lambda x: x.ops("note_events")(0, "f")()) horns_end = lambda_segment.LambdaSegments( sb.with_only("bass_line"), fabric_staves=("ooa_horn", "cco_horn"), bookend_beats=(4 * 4, 0), funcs=( lambda x: x.with_only("cells", 12, 13, 14, 15).t(12).eps(0, "f") (0, 3, 6, "(")(1, 5, 7, ")")(8, 9, 10, 11, 12, 13, 14, 15, 16, "-") ( 8, "\\>", )(16, "mf")(), lambda x: x.with_only("cells", 12, 13, 14, 15).eps(0, "f") (0, 3, 6, "(")(1, 5, 7, ")")(8, 9, 10, 11, 12, 13, 14, 15, 16, "-") ( 8, "\\>", )(16, "p")(), ) # func = lambda x: x.only_first("cells",8) ) end_piano_harp = osti.Osti(sb, fabric_staves=("harp1", "harp2", "piano1", "piano2"), ranges=pitch_ranges.HIGHISH_TO_MID_RANGES, osti_pulse_duration=0.5, osti_cell_length=8, osti_cell_count=12, tag_all_note_events=(">"), after_funcs=( lambda x: x.eps(0, "f")(), lambda x: x, lambda x: x.eps(0, "f")(), lambda x: x, )) end_piano_harp.staves["piano2"].segments[0].t(-12) end_roll = pad.Pad( sb.with_only("bass_drones"), fabric_staves=("ooa_mallets", ), ranges=pitch_ranges.HIGHISH_RANGES, pad_durations=(4, ) * 16, tag_all_note_events=(":32", ), ) s.extend_from(sax_melody, cco_melody, altos1, altos2, horns_end, end_piano_harp, end_roll, guitars_end) s.fill_rests(beats=12 * 4) # # ================================================ # # LAST 4 BARS improv_tenor_bari_bsn_end = improv.Improv(sb, fabric_staves=("ooa_tenor_sax", "ooa_bari_sax", "ooa_bassoon"), improv_times=4, selectable_start_beat=12 * 4, ranges=pitch_ranges.MID_RANGES, pitch_selectable_indices=(( 1, 3, 4, ), ( 1, 4, 5, ), ( 2, 3, 5, )), dynamic="mf") s.extend_from(improv_tenor_bari_bsn_end, ) s.fill_rests(beats=14 * 4) # # ================================================ # # LAST 2 BARS trumpets_end = lambda_segment.LambdaSegments( sb.with_only("melody_line1", "melody_line2"), fabric_staves=("ooa_trumpet", "cco_trumpet"), # bookend_beats=(6*4,0), funcs=(lambda x: x.with_only("cells", 14, 15).eps(1, "mf", "\\>") (8, "mp") (), lambda x: x.with_only("cells", 14, 15).eps(1, "mf", "\\>") (7, "p")()), tag_all_note_events=("-", ), # func = lambda x: x.only_first("cells",8) ) flutes_end = lambda_segment.LambdaSegment( sb.with_only("counter_line"), fabric_staves=("ooa_flute", "cco_flute1", "cco_flute2"), func=lambda x: x.with_only("cells", 28, 29, 30, 31), funcs=( lambda x: x.eps(1, "f", "\\>")(15, "mf")(), lambda x: x.eps(1, "f", "\\>")(15, "p")(), lambda x: x.eps(1, "f", "\\>")(15, "p")(), ), tag_all_note_events=("-", ), # func = lambda x: x.only_first("cells",8) ) improv_cl_alto_end = improv.Improv(sb, fabric_staves=("ooa_clarinet", "ooa_alto_sax1", "ooa_alto_sax2"), improv_times=2, selectable_start_beat=4 * 14, ranges=pitch_ranges.HIGHISH_RANGES, pitch_selectable_indices=( (1, 3, 4), (1, 2, 3), (1, 2, 3), ), dynamic="mf") s.extend_from(trumpets_end, flutes_end, improv_cl_alto_end) s.staves["cco_violin_i"].segments[-1].mask("cells", -1, -2, -3, -4) s.staves["cco_violin_ii"].segments[-1].mask("cells", -1, -2) s.staves["cco_cello"].segments[-1].mask("cells", -1, -2) # s.staves["ooa_cello2"].segments[-1].mask("cells",-1,-2) # s.staves["ooa_violin2"].segments[-1].mask("cells",-1,-2) # s.staves["cco_flute2"].segments[0].mask("cells",-1,) # s.staves["cco_flute2"].note_events[-4].tag("\\>") # s.staves["cco_flute2"].note_events[-1].tag("p") e0 = free_segment.AlocFreeSegmentBlock( tempo_command=""" freely, aprox 30'' """) s.staves["ooa_flute"].events[-7].tag("\\>") s.staves["ooa_flute"].events[-1].tag("\\!") e0["ooa_flute"].machine_arrow(intro.hold_cell(20, ).eps(0, ")")(), instruction="repeat, slowing down", with_repeat=False).eps(1, "\\>")(9, "pp")() e0["ooa_flute"].respell = "sharps" e0["ooa_clarinet"].machine_arrow(lib("cell_rest1") + lib("intro_cell_down").t(7), instruction="repeat, slowing down", with_repeat=False).eps( 3, "\\>", )(9, "pp")() e0["ooa_clarinet"].respell = "sharps" e0["ooa_alto_sax1"].machine_arrow( s.staves["ooa_alto_sax1"].cells[-1](), instruction="repeating a simple figure 4X, slowing down", with_repeat=False).eps(1, "\\>")(9, "pp")() e0["ooa_alto_sax2"].machine_arrow( s.staves["ooa_alto_sax2"].cells[-1](), instruction="repeating a simple figure 3X, slowing down", with_repeat=False).eps(1, "\\>")(9, "pp")() tenor_end = lib("intro_a_phrase_0").t(7).cells[1] + lib( "intro_a_phrase_0").t(7).cells[0] e0["ooa_tenor_sax"].machine_arrow(tenor_end, instruction="repeat, slowing down", with_repeat=False).eps( 1, "\\>", )(9, "pp")() e0["ooa_bari_sax"].machine_arrow(intro.hold_cell(-8, ).eps(0, ")")(), instruction="repeat 3X, slowing down", with_repeat=False).eps(1, "\\>")(9, "pp")() e0["ooa_bassoon"].machine_arrow(intro.hold_cell(-15, ).eps(0, ")")(), instruction="repeat 2X, slowing down", with_repeat=False).eps(1, "\\>")(9, "pp")() horn_end = s.staves["ooa_horn"].phrases[-1]() horn_end.events.untag("-") horn_end.t(-12).eps(0, pitch="R")(1, "\\>")(1, 4, "(")(2, 6, ")")(3, 7, 8, beats=2)(8, "pp")() horn_end.note_events[-1].pitch += 12 e0["ooa_horn"].machine_arrow(horn_end, instruction="repeat 3X, slowing down", with_repeat=False) trumpet_end = lib("intro_a_phrase_1").cells[1]().t(14).eps(1, "fermata")() e0["ooa_trumpet"].machine_arrow(trumpet_end, instruction="repeat, 2X", with_repeat=False).eps(1, "\\>")(9, "pp")() e0["ooa_trombone"].machine_arrow(lib("intro_cell_down").t(-5), instruction="repeat 2X", with_repeat=False).eps( 1, "\\>", )(9, "pp")() e0["ooa_trombone"].respell = "sharps" e0["ooa_mallets"].machine_arrow(ImaginaryCell(rhythm=(4, ), pitches=(16, )).eps( 0, ":32")(), with_repeat=False).eps(1, "\\>")(9, "pp")() e0["ooa_drum_set"].machine_arrow(get_improv_line( instruction="improv, rolls", rhythm=(4, ), times=1, ).eps(0, "fermata", ":32")(), with_repeat=False).eps(1, "\\>")(9, "pp")() e0["ooa_guitar"].machine_arrow(intro.hold_cell(8, ), with_repeat=False).eps( 1, "\\>", "distorted, ethereal")(9, "pp")() e0["ooa_guitar"].respell = "sharps" e0["ooa_bass_guitar"].machine_arrow(intro.hold_cell(-15, ), with_repeat=False).eps( 1, "\\>", "distorted, ethereal")(9, "pp")() # (NOTE: switching strings between 1 and 2) ooa_vln1_end = s.staves["ooa_violin2"].phrases[-1]() ooa_vln1_end.note_events[-1].pitch -= 12 e0["ooa_violin1"].machine_arrow( ooa_vln1_end, instruction="repeat 3X, slowing down (not together with others)", with_repeat=False).eps(1, "\\>")(9, "pp")() e0["ooa_violin2"].machine_arrow( s.staves["ooa_violin1"].phrases[-1](), instruction="repeat 4X, slowing down (not together with others)", with_repeat=False).eps(1, "\\>")(9, "pp")() ooa_vc1_end = s.staves["ooa_cello2"].phrases[-1]() ooa_vc1_end.note_events[-1].pitch -= 12 ooa_vc1_end.note_events[-2].pitch -= 12 e0["ooa_cello1"].machine_arrow( ooa_vc1_end, instruction="repeat 2X, slowing down (not together with others)", with_repeat=False).eps(1, "\\>")(9, "pp")() e0["ooa_cello2"].machine_arrow( s.staves["ooa_cello1"].phrases[-1](), instruction="repeat 5X, slowing down (not together with others)", with_repeat=False).eps(1, "\\>")(9, "pp")() e0["cco_flute1"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_flute2"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_oboe1"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_oboe2"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_clarinet1"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_clarinet2"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_bassoon"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_horn"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_trumpet"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_trombone"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_percussion"].machine_arrow(lib("cell_rest4").eps( 0, "fermata", "l.v.")(), with_repeat=False) e0["harp1"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["harp2"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["piano1"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["piano2"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_violin_i"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_violin_ii"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_viola"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_cello"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) e0["cco_bass"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat=False) for bass_seg in s.staves["cco_bass"].segments: bass_seg.transformed(calliope.Transpose(interval=12)) s.fill_rests(beats=16 * 4) for st in s.staves: try: end_seg = e0[st.name] if end_seg.events: end_seg.events[-1].tag("""!\\bar "|." """) st.append(end_seg) except: print("st.name not in final free block") # s.staves["cco_violin_i"].append(b0["cco_violin_i1"] # ) # strings_pulse1 = pulse.Pulse( # fabric_staves = ( # "ooa_violin1", "ooa_violin2", "ooa_cello1", "ooa_cello2", # "cco_violin_i", "cco_violin_ii", "cco_viola"), # pulse_beats = 26, # ) # strings_swell1 = swell_hit.SwellHit( # fabric_staves = ( # "ooa_violin1", "ooa_violin2", "ooa_cello1", "ooa_cello2", # "cco_violin_i", "cco_violin_ii", "cco_viola"), # swell_duration = 5.5, # hit_rest = 0, # ) # strings_low_pulse1 = pulse.Pulse( # fabric_staves = ("cco_cello", "cco_bass"), # pulse_duration = 1, # pulse_beats = 29, # ) # counter_winds = ditto.Ditto( # calliope.LineBlock( # COUNTER_LINE_1(), # COUNTER_LINE_2(), # ), # fabric_staves = ("ooa_flute", "ooa_clarinet", # "cco_flute1", "cco_flute2", # "cco_clarinet1", "cco_clarinet2") # ) # osti_lb = rock.OstiLineBlock( # phrase_count=7, # cuts = ( # dict(crop=(0,6)), # dict(crop=(0,6)), # dict(crop=(0,6)), # dict(crop=(2,0)), # ), # slur_cells = True, # ) # osti1 = ditto.Ditto(osti_lb, # fabric_staves = ("ooa_bassoon", "cco_oboe1", "cco_oboe2", "cco_bassoon") # ) # osti1_accents = hit_cells.HitCells(osti_lb, # fabric_staves = instrument_groups.get_instruments("sax") # ) # # TO DO: move to lyrical section # melody_lb = calliope.LineBlock( # HOME_LINE(), # ) # my_melody = melody.Melody(melody_lb, # fabric_staves = ("ooa_trumpet", "cco_trumpet"), # ) # # TO DO: this doesn't work right... why? # # melody_accents = (hit_cells.HitCells( # # melody_lb, # # fabric_staves = ("ooa_horn", "cco_horn"), # # hit_duration = 0.5, # # ) # # ) # melody_accents = melody.Melody(melody_lb, # fabric_staves = ("ooa_horn", "cco_horn"), # ) # s.extend_from( # counter_winds(), # strings_pulse1(), # strings_low_pulse1, # osti1, # osti1_accents, # my_melody, # melody_accents, # ) # s.extend_from( # strings_swell1(), # extend_last_machine=True, # ) # s.fill_rests(fill_to="cco_violin_i") # # ======================================================= # # bars 9-16 # # ======================================================= # adjust for bass 8va for staff in s.staves: # staff.phrases.transformed(calliope.Label()) # staff.lines.transformed(calliope.Label()) # TO DO: WHY DOESN'T THIS WORK????? if segs := staff.segments: main_seg = segs[0] main_seg.tempo_command = """ \\note #"4" #UP "= 112 ca" """ for next_seg in list(segs[1:-1]): main_seg.extend(next_seg) next_seg.parent.remove(next_seg) main_seg.rehearsal_mark_number = 13 main_seg.compress_full_bar_rests = True
def block2(lib): b2 = free_segment.AlocFreeSegmentBlock(tempo_command=""" " 20'' " """) b2["ooa_flute"].machine_arrow(intro.hold_cell(11, "mf").eps( 0, "growl tone")() + lib("cell_rest4").eps(0, "fermata")(), instruction="repeat 1 or 2 X" ) intro.hold_swell_arrow(b2["ooa_clarinet"], 9, instruction="repeat") # TO DO: pull this from riff b2["ooa_alto_saxes"].machine_arrow(ImaginaryCell( rhythm=(1,)*7 + (0.25,)*6 + (2,), pitches=(4,5,9,11,12,14,16, 4,11,5,12,14,16,9, )).eps( 0, "markup_column:both improvise on|these pitches")( 0,1,2,3,4,5,6, "\\once \\hide Stem")( 7,"markup_column:making use of|this figure")( 7,9,11, "(")( 8,10,12, ")")(), instruction="markup_column:freely at first, eventually with|drum set's quarter note pulse" ) b2["ooa_tenor_sax"].machine_arrow(lib("home_a_phrase_0").sc(0.5).eps( 1, "mp")( 1,4, "(")( 2,6, ")")( 6, "fermata", beats=2)(), instruction="markup_column:repeat, freely at first, eventually with|drum set's quarter note pulse" ) b2["ooa_tenor_sax"].cells[1].t(2) b2["ooa_bari_sax"].machine(lib("cell_rest1")) intro.hold_swell_arrow(b2["ooa_bari_sax"], -8, instruction="repeat") intro.hold_swell_arrow(b2["ooa_bassoon"], -13, instruction="repeat") b2["ooa_horn"].machine(lib("cell_rest1"), machine_pad=(0.5,0)) b2["ooa_horn"].machine( (ImaginaryLine(ImaginaryCell(rhythm=(2,1.5), pitches=(-1,-1))) + lib("intro_rock4_ooa_horn_c43_45").crop("events",6) ).eps( 0, "~", "mp", "\\<", "markup_column:enter simultaneously with ooa tpt./tbn.|match drum set quarter note pulse")( 1, "~!")( 3, "mf")(), pad=(0.5,0) ) b2["ooa_horn"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat = False, machine_pad=(2,2), ) b2["ooa_trumpet"].machine(lib("cell_rest1"), machine_pad=(0.5,0)) b2["ooa_trumpet"].machine(lib("intro_rock4_ooa_trumpet_c43_45").eps( 0, "mp", "\\<", "markup_column:enter simultaneously with OOA hn./tbn.|match drum set quarter note pulse")( 5, "mf")( 0,2,4,6,8,11, "(")( 1,3,5,7,10,13, ")",)( 5,10,12, "[")( 6,11,13, "]")( ), pad=(0.5,0)) b2["ooa_trumpet"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat = False, machine_pad=(2,2), ) b2["ooa_trombone"].machine(lib("cell_rest1"), machine_pad=(0.5,0)) b2["ooa_trombone"].machine( (lib("intro_rock4_ooa_horn_c43_45").crop("events",0,8) + ImaginaryLine(ImaginaryCell( rhythm=(5,), pitches=(-8,))) ).eps( 0,"mp", "\\<", "markup_column:enter simultaneously with OOA hn./tpt.|match drum set quarter note pulse")( 6, "(")( 7, ")", "mf")(), pad=(0.5,0) ) b2["ooa_trombone"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat = False, machine_pad=(2,2), ) # TO DO: fragments of osti! # b1["ooa_mallets"] b2["ooa_mallets"].machine(lib("cell_rest2").eps(0, "fermata")()) b2["ooa_mallets"].machine_arrow( ImaginaryCell(rhythm=(1,), pitches=(16,)), instruction="repeat constant pulse, with drum set") b2["ooa_mallets"].eps( 6, "pp", "\\<")( 20, "mf", "\\>")() b2["ooa_guitar"].machine_arrow( lib("riff_phrase").sc(0.5).crop("events",4).eps( 0, "mp")( 0,4,"[")( 3,7,"]")() + lib("cell_rest2").eps(0, "fermata"), instruction="markup_column:repeat, with drum set quarter note pulse") b2["ooa_bass_guitar"].machine(lib("cell_rest4").eps(0, "fermata")()) b2["ooa_bass_guitar"].machine_arrow( ImaginaryCell(rhythm=(1,), pitches=(-8,)), instruction="repeat constant pulse, with drum set") b2["ooa_bass_guitar"].eps( 6, "pp", "\\<")( 20, "mf", "\\>")() b2["ooa_drum_set"].machine_arrow( ImaginaryCell(rhythm=(1,), pitches=(-1,)), instruction="cont. repeating consant pulse") b2["ooa_drum_set"].eps( 4, "pp", "\\<")( 7, "mf", "\\>")( 10, "pp")() # TO DO: consider pizz games b2["ooa_violins"].machine(ImaginaryCell( rhythm=(-0.5,), pitches="S"), machine_pad=(0,0), with_repeat=True) b2["ooa_violins"].machine( lib("intro_riff_up_wiggle").eps( 0, "markup_column:choose between 1., 2., 3. at random, match drum set quarter note pulse|1.")( 0,2,4,6, "(")( 1,3,5,7, ")")( 0,4,"[")( 3,7,"]")(), pad=(0.5,0), machine_pad=(0,0), ) b2["ooa_violins"].machine( lib("intro_riff_up_wiggle1").eps( 0, "2.")( 0,2,4,6, "(")( 1,3,5,7, ")")( 0,4,"[")( 3,7,"]")(), ) b2["ooa_violins"].machine( ImaginaryCell(rhythm=(2,),pitches=(11,)).eps( 0, "3.")(), ) b2["ooa_violins"].machine_arrow(ImaginaryCell( rhythm=(-0.25,), pitches="S"), machine_pad=(0,0), with_repeat=False, with_repeat_end=True, instruction="repeat (choosing between 1., 2., 3.)", ) # TO DO: b2["ooa_cellos"].machine(ImaginaryCell(rhythm=(1,), pitches=( (-1,0 ),)).eps( 0, "mf", "div., pizz")( ), # instruction="(continue repeating, staggered)" ) b2["ooa_cellos"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(8,8), ) # TO DO: re-think these cells b2["cco_flutes"].machine(ImaginaryCell( rhythm=(-0.5,), pitches="S"), machine_pad=(0,0), with_repeat=True) b2["cco_flutes"].machine(intro.hold_cell(23, "mp").eps( 0, "markup_column:a2, both choose between 1., 2., 3. at random|1.")(), pad=(0.5,0), machine_pad=(0,0), ) b2["cco_flutes"].machine(intro.hold_cell(23).eps( 0, ":32", "Flt.", "2., ")(), pad=(0.5,0), machine_pad=(0,0), ) b2["cco_flutes"].machine(intro.hold_cell("R").eps( 0, "3.")(), ) b2["cco_flutes"].machine_arrow(ImaginaryCell( rhythm=(-0.25,), pitches="S"), machine_pad=(0,0), with_repeat=False, with_repeat_end=True, instruction="repeat (choosing between 1., 2., 3.)", ) b2["cco_oboes"].machine_arrow(lib("intro_riff_winds").eps( 0, "markup_column:a2, 2nd start after 1st|match drum set quarter note pulse")( 4, pitch=11)(), instruction="markup_column:repeat (staggered), freely at first, eventually with|drum set's quarter note pulse") intro.hold_swell_arrow(b2["cco_clarinets"], (5,11), instruction="repeat") b2["cco_bassoon"].machine(lib("intro_phrase_mistify").t(-14).crop("events",0,1).eps( 0, "mp")()) intro.hold_swell_arrow(b2["cco_bassoon"], -12, instruction="repeat") # TO DO... encapsulate this from above so don't have to repeat b2["cco_horn"].machine(lib("cell_rest4").eps(0, "fermata")()) b2["cco_horn"].machine( (ImaginaryLine(ImaginaryCell(rhythm=(4,), pitches=(-1,))) + lib("intro_rock4_ooa_flute_c43_45").crop("events",8) ).eps( 0, "mp", "\\<", "markup_column:enter simultaneously with CCO tpt./hn.|match woodblock eighth note pulse")( 1, "mf", "[")( 2, "]")( 2,4,6, "(")( 3,5,7, ")")(), ) b2["cco_horn"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat = False, machine_pad=(2,2), ) b2["cco_trumpet"].machine(lib("cell_rest4").eps(0, "fermata")()) b2["cco_trumpet"].machine(lib("intro_rock4_ooa_horn_c43_45").t(12).eps( 0, "mp", "\\<", "markup_column:enter simultaneously with CCO hn./tbn.|match woodblock eighth note pulse")( 7, "mf")()) b2["cco_trumpet"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat = False, machine_pad=(2,2), ) b2["cco_trombone"].machine(lib("cell_rest4").eps(0, "fermata")()) b2["cco_trombone"].machine( (lib("intro_rock4_ooa_flute_c43_45").crop("events",0,7) + ImaginaryLine(ImaginaryCell( rhythm=(5,), pitches=(-8,))) ).eps( 0,"mp", "\\<", "markup_column:enter simultaneously with CCO hn./tpt.|match woodblock eighth note pulse")( 0,2,4,6, "[")( 1,3,5,7, "]")( 8, "mf")() ) b2["cco_trombone"].machine_arrow(lib("cell_rest4").eps(0, "fermata")(), with_repeat = False, machine_pad=(2,2), ) b2["cco_percussion"].machine(lib("cell_rest2")) b2["cco_percussion"].machine_arrow( ImaginaryCell(rhythm=(0.5,0.5,0.5,0.5),), instruction="repeat, keeping pulse constant").eps( 5, "markup_column:wood block, hard mallets faster, |NOT with drum set, quarter note = 112 approx")() b2["cco_percussion"].eps( 6, "pp", "\\<")( 10, "mf", "\\>")( 13, "\\!")() b2["cco_harp"].machine(ImaginaryCell(rhythm=(1,), pitches=((4,11,17,24),)).ops("events")( 0, ">")(), ) b2["cco_harp"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7,7) ) def violins_speed_up(staff_name, pitch, intro_name=None): if intro_name: b2[staff_name].machine(lib(intro_name)) b2[staff_name].machine_arrow(ImaginaryCell(rhythm=(2,), pitches=(pitch,)).eps( 0,"pp", "\\<")(), pad_fill=False, arrow_beats=4, instruction="markup_column:repeat, speed up (not|necessary with others) until... ") b2[staff_name].machine_arrow(ImaginaryCell(rhythm=(0.5,0.5,), pitches=(pitch,pitch)).eps( 0, "mf")(), instruction="markup_column:...eventually matching woodblock's|eighth note pulse") violins_speed_up("cco_violin_i1", 28) violins_speed_up("cco_violin_i2", 23) violins_speed_up("cco_violin_i3", 23, intro_name="cell_rest1") violins_speed_up("cco_violin_i4", 17, intro_name="cell_rest2") violins_speed_up("cco_violin_ii1", 24) violins_speed_up("cco_violin_ii2", 12) violins_speed_up("cco_violin_ii3", 11, intro_name="cell_rest1") violins_speed_up("cco_violin_ii4", 4, intro_name="cell_rest2") b2["cco_viola1"].machine(ImaginaryCell(rhythm=(1,), pitches=((11,),)).ops("events")(0, ">")(),) b2["cco_viola1"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7,7) ) b2["cco_viola2"].machine(ImaginaryCell(rhythm=(1,), pitches=((5,),)).ops("events")(0, ">")(),) b2["cco_viola2"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7,7) ) b2["cco_viola3"].machine(ImaginaryCell(rhythm=(1,), pitches=((11,),)).ops("events")(0, ">")(),) b2["cco_viola3"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7,7) ) b2["cco_viola4"].machine(ImaginaryCell(rhythm=(1,), pitches=((5,),)).ops("events")(0, ">")(),) b2["cco_viola4"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7,7) ) b2["cco_cello1"].machine(ImaginaryCell(rhythm=(1,), pitches=((-12,),)).ops("events")(0, ">")(),) b2["cco_cello1"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7,7) ) b2["cco_cello2"].machine(ImaginaryCell(rhythm=(1,), pitches=((-13,),)).ops("events")(0, ">")(),) b2["cco_cello2"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7,7) ) b2["cco_bass"].machine(intro.hold_cell(-8), with_repeat=False) b2["cco_bass"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7,7) ) # b2["ooa_violins"].machine_arrow(ImaginaryCell( # rhythm=(-0.25,), pitches="S"), # machine_pad=(0,0), # with_repeat=False, # with_repeat_end=True, # instruction="repeat (choosing between 1., 2., 3.)", # ) # TO DO: consider pizz games # b1["cco_flutes"].machine_arrow( # lib("intro_line_riff").crop("events",0,1).t(17).sc(0.5).eps( # 0, "(", "ppp", "\\<", "(", "a 2, 2nd start after 1st")() + # lib("intro_line_wiggle").crop("events",0,2).t(10).sc(0.5).eps( # 3, ")", "p") + # lib("cell_rest1"), # instruction="repeat, freely (staggered)" # ) # b1["cco_oboes"].machine_arrow(intro.hold_cell(11), # instruction="repeat, 1,2 staggered" # ) # b1["cco_oboes"].eps( # 1,5, "ppp", "\\<")( # 3, "p", "\\>")() # b1["cco_clarinets"].machine_arrow(winds_phrase, # instruction="repeat, freely (staggered)") # b1["cco_bassoon"].machine_arrow(lib("intro_cell_down").t(-14).eps( # 0, "p")(), # instruction="repeat") # b1["cco_horn"].machine_arrow(intro.hold_cell(0),instruction="repeat") # b1["cco_horn"].eps( # 1,5, "pp", "\\<")( # 3, "mp", "\\>")() # b1["cco_trumpet"].machine(lib("cell_rest4")) # b1["cco_trumpet"].machine_arrow( # ImaginaryCell(rhythm=(2,), pitches=(11,)).eps( # 0, "p", "straight mute")() + # lib("intro_cell_mist").t(5), # instruction="repeat, freely") # b1["cco_trombone"].machine_arrow(lib("intro_a_phrase_1").cells[1](), instruction="repeat, freely") # b1["cco_harp"].machine(ImaginaryCell(rhythm=(1,), pitches=((4,5,23,24),)).ops("events")( # 0, ">","ff")(), # ) # b1["cco_harp"].machine_arrow(lib("cell_rest4"), # # pad=(8,1), # with_repeat=False, # machine_pad=(6,6) # ) # b1["cco_violin_i1"].machine_arrow(intro.hold_cell(29,"mp",), instruction="repeat") # b1["cco_violin_i2"].machine(lib("cell_rest1")) # b1["cco_violin_i2"].machine_arrow(lib("intro_rock3_cco_oboe2_c38_41"), # instruction="repeat") # b1["cco_violin_i3"].machine_arrow(intro.hold_cell(23), instruction="repeat") # b1["cco_violin_i4"].machine(lib("cell_rest1")) # b1["cco_violin_i4"].machine_arrow(lib("intro_cell_down").t(15), instruction="repeat") # b1["cco_violin_ii1"].machine_arrow(lib("intro_rock3_cco_bassoon_c39_41").t(10).eps( # 0, beats=1)( # 1,3,5, "(")( # 2,4,6, ")")( # 6, beats=2)(), # instruction="repeat, freely") # b1["cco_violin_ii2"].machine_arrow(lib("intro_phrase_wiggle").crop("events",0,2).t(-2).eps( # 3, beats=2)(), # instruction="markup_column:repeat freely at first, eventually with|drum set's quarter note pulse") # b1["cco_violin_ii3"].machine_arrow(lib("intro_phrase_mistify").t(-2).eps( # 4, pitch=11)(), # instruction="repeat, freely",) # b1["cco_violin_ii4"].machine(lib("cell_rest1")) # b1["cco_violin_ii4"].machine_arrow( # lib("intro_phrase_wiggle").crop("events",0,3).t(-2) + shake_ef4().t(-12), # instruction="repeat, freely") # b1["cco_viola1"].machine_arrow(lib("intro_cell_shake").t(22).crop("events",2).eps( # 0, "fermata", beats=4, pitch=12)( # 2, "p")(), # instruction="repeat") # b1["cco_viola2"].machine_arrow(intro.hold_cell(-1), instruction="repeat") # b1["cco_viola3"].machine_arrow(intro.hold_cell(-12,"p",), # pad_fill=False, # arrow_beats=4, # instruction="markup_column:repeat, speed up|until... ") # b1["cco_viola3"].machine_arrow(ImaginaryCell(rhythm=(-2,),pitches=(-12,)), # instruction="markup_column:...eventually with drum set's|quarter note pulse") # cco_cello1_straight = lib("intro_phrase_straight_i") # cco_cello1_straight.cells[0].t(-2).crop("events", 1,1).ts(-4) # cco_cello1_straight.cells[1].t(-7).eps( # 1,3, beats=2,)() # b1["cco_cello1"].machine_arrow(cco_cello1_straight, instruction="repeat, freely") # b1["cco_bass"].machine_arrow(intro.hold_cell(-7), instruction="repeat") return b2
def block1(lib): shake_ef4 = ImaginaryCell(rhythm=(4, ), pitches=((16, 17), )).eps(0, "tremolo:3")() b1 = free_segment.AlocFreeSegmentBlock(tempo_command=""" " 20'' " """) b1["ooa_flute"].machine_arrow(shake_ef4(), instruction="repeat hairpin") b1["ooa_flute"].eps(1, 6, "ppp")( 1, "\\<", )( 3, "mp", "\\>", )() b1["ooa_clarinet"].machine_arrow( ImaginaryCell(rhythm=(1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25, 2), pitches=(11, 12, 14, 16, 17, 11, 12, 14, 16, 17)).eps( 0, "markup_column:improvise on|these pitches")( 0, 1, 2, 3, 4, "\\once \\hide Stem")( 5, "(", "markup_column:making use of|this figure")( 9, ")", "fermata")(), instruction= "markup_column:freely at first, eventually with|drum set's quarter note pulse" ) b1["ooa_clarinet"].eps(12, "p", "\\<")(20, "mf")() b1["ooa_alto_saxes"].machine_arrow(intro.hold_cell(12), instruction="repeat, 1,2 staggered") b1["ooa_alto_saxes"].eps(1, 5, "ppp", "\\<")(3, "p", "\\>")() b1["ooa_horn"].machine_arrow(intro.hold_cell(-1), instruction="repeat") b1["ooa_horn"].eps(1, 5, "pp", "\\<")(3, "mp", "\\>")() b1["ooa_trumpet"].machine_arrow(intro.hold_cell(16, "p"), instruction="repeat") b1["ooa_mallets"].machine( ImaginaryCell( rhythm=( -0.5, 2, 4, ), pitches=( "R", 23, 29, ), ).ops("events")( 2, "fermata", )(), ) b1["ooa_mallets"].machine_arrow( lib("cell_rest4"), # pad=(8,1), with_repeat=False, machine_pad=(7, 7), ) b1["ooa_drum_set"].machine(lib("cell_rest2")) b1["ooa_drum_set"].machine_arrow( ImaginaryCell(rhythm=(1, ), pitches=(-1, )), instruction="markup_column:mallets|repeat, keep pulse constant") b1["ooa_drum_set"].eps(5, "pp", "\\<")(8, "mf", "\\>")(14, "\\!")() b1["ooa_violins"].machine_arrow(lib("intro_phrase_wiggle").pop_from( "events", 1).t(-7).eps(0, "p", "(", beats=1)(1, 3, ")", beats=1)(2, "(")(4, "fermata", beats=2)(), instruction="repeat, freely (staggered)") b1["ooa_cellos"].machine_arrow( ImaginaryCell(rhythm=(4, ), pitches=((-1, 0), )).eps(0, "tremolo:3")(), instruction="(continue repeating, staggered)") b1["ooa_cellos"].eps(1, 5, "ppp")( 1, "\\<", )( 3, "mp", "\\>", )() b1["cco_flutes"].machine_arrow( lib("intro_line_riff").crop("events", 0, 1).t(17).sc(0.5).eps( 0, "(", "ppp", "\\<", "(", "a 2, 2nd start after 1st")() + lib("intro_phrase_wiggle").crop("events", 0, 2).t(10).sc(0.5).eps( 3, ")", "p") + lib("cell_rest1"), instruction="repeat, freely (staggered)") b1["cco_oboes"].machine_arrow(intro.hold_cell(11), instruction="repeat, 1,2 staggered") b1["cco_oboes"].eps(1, 5, "ppp", "\\<")(3, "p", "\\>")() b1["cco_clarinets"].machine_arrow(lib("intro_riff_winds"), instruction="repeat, freely (staggered)") b1["cco_bassoon"].machine_arrow(lib("intro_cell_down").t(-14).eps(0, "p")(), instruction="repeat") b1["cco_horn"].machine_arrow(intro.hold_cell(0), instruction="repeat") b1["cco_horn"].eps(1, 5, "pp", "\\<")(3, "mp", "\\>")() b1["cco_trumpet"].machine(lib("cell_rest4")) b1["cco_trumpet"].machine_arrow( ImaginaryCell(rhythm=(2, ), pitches=(11, )).eps( 0, "p", "straight mute")() + lib("intro_cell_mist").t(5), instruction="repeat, freely") b1["cco_trombone"].machine_arrow(lib("intro_a_phrase_1").cells[1](), instruction="repeat, freely") b1["cco_percussion"].machine_arrow(intro.hold_cell( 0, "mp", ":32", "fermata", "high tom").eps(1, 5, "p", "\\<")(9, "mp", "\\>")(), instruction="repeat") b1["cco_harp"].machine( ImaginaryCell(rhythm=(1, ), pitches=((4, 5, 23, 24), )).ops("events")(0, ">")(), ) b1["cco_harp"].machine_arrow( lib("cell_rest4"), # pad=(8,1), with_repeat=False, machine_pad=(6, 6)) b1["cco_violin_i1"].machine_arrow(intro.hold_cell( 29, "mp", ), instruction="repeat") b1["cco_violin_i2"].machine(lib("cell_rest1")) b1["cco_violin_i2"].machine_arrow(lib("intro_rock3_cco_oboe2_c38_41"), instruction="repeat, freely") b1["cco_violin_i3"].machine_arrow(intro.hold_cell(23), instruction="repeat") b1["cco_violin_i4"].machine(lib("cell_rest1")) b1["cco_violin_i4"].machine_arrow(lib("intro_cell_down").t(15), instruction="repeat") b1["cco_violin_ii1"].machine_arrow( lib("intro_rock3_cco_bassoon_c39_41").t(10).eps(0, beats=1)( 1, 3, 5, "(")(2, 4, 6, ")")(6, beats=2)(), instruction="repeat, freely") b1["cco_violin_ii2"].machine_arrow( lib("intro_phrase_wiggle").crop("events", 0, 2).t(-2).eps(3, beats=2)(), instruction= "markup_column:repeat freely at first, eventually match|drum set's quarter note pulse" ) b1["cco_violin_ii3"].machine_arrow( lib("intro_phrase_mistify").t(-2).eps(4, pitch=11)(), instruction="repeat, freely", ) b1["cco_violin_ii4"].machine(lib("cell_rest1")) b1["cco_violin_ii4"].machine_arrow( lib("intro_phrase_wiggle").crop("events", 0, 3).t(-2) + shake_ef4().t(-12), instruction="repeat, freely") b1["cco_viola1"].machine_arrow(lib("intro_cell_shake").t(22).crop( "events", 2).eps(0, "fermata", beats=4, pitch=12)(2, "p")(), instruction="repeat") b1["cco_viola2"].machine_arrow(intro.hold_cell(-1), instruction="repeat") b1["cco_viola3"].machine_arrow( intro.hold_cell( -12, "p", ), pad_fill=False, arrow_beats=4, instruction="markup_column:repeat, speed up|until... ") b1["cco_viola3"].machine_arrow( ImaginaryCell(rhythm=(-2, ), pitches=(-12, )), instruction= "markup_column:...eventually with drum set's|quarter note pulse") cco_cello1_straight = lib("intro_phrase_straight_i") cco_cello1_straight.cells[0].t(-2).crop("events", 1, 1).ts(-4) cco_cello1_straight.cells[1].t(-7).eps( 1, 3, beats=2, )() b1["cco_cello1"].machine_arrow(cco_cello1_straight, instruction="repeat, freely") b1["cco_bass"].machine_arrow(intro.hold_cell(-7), instruction="repeat") return b1
def block0(lib): b0 = free_segment.AlocFreeSegmentBlock(tempo_command=""" " 20'' " """) clarinets_phrase = lib("intro_line_riff").crop("events", 0, 3).eps(0, "p", "\\<", "(")( 2, ")", )(3, "mp", "fermata", beats=4)() b0["ooa_clarinet"].machine_arrow(clarinets_phrase(), instruction="repeat, freely") b0["ooa_horn"].machine( ImaginaryCell(rhythm=(4, ), pitches=(-1, )).eps(0, "pp", "\\<")(), machine_pad=(0.5, 0.5), ) b0["ooa_horn"].cells[1].events[2].tag( "mp") # tagging skip as cresc. work-around b0["ooa_horn"].machine_arrow(lib("cell_rest4"), with_repeat=False, machine_pad=(7, 7)) b0["ooa_trumpet"].machine( lib("cell_rest1"), machine_pad=(0, 0), ) b0["ooa_trumpet"].machine( (lib("intro_line_riff").t(5) + lib("intro_line_riff").t(12).crop("events", 0, 1).mask("events", -1) + lib("intro_a_phrase_0").t(12).sc(0.5) + lib("intro_a_cell_2").t(24)).eps( 0, "p", "\\<", "cup mute, freely, solo", beats=2)(1, beats=1)( 2, "mf", )(5, 6, beats=0.25)(7, ")", beats=2)(10, "-", beats=1)(11, "-", beats=1.5)(23, "fermata", "\\>", beats=2)(0, 2, 6, 8, 13, "(")(1, 5, 7, 9, 14, ")")()(), pad=(0.5, 0), ) b0["ooa_trumpet"].machine_arrow(lib("cell_rest2"), with_repeat=False) b0["ooa_trumpet"].cells[-4].events[0].tag("p") b0["ooa_bass_guitar"].machine( ImaginaryCell(rhythm=(4, ), pitches=(-12, )).eps(0, "mp")(), ) b0["ooa_bass_guitar"].machine_arrow( lib("cell_rest4"), # pad=(8,1), with_repeat=False, machine_pad=(8, 8)) b0["ooa_mallets"].machine( ImaginaryCell(rhythm=( -0.5, 4, ), pitches=( "R", 24, )).ops("events")(0, "bowed, (motor on)")(1, "fermata", "mp")(), ) b0["ooa_mallets"].machine_arrow( lib("cell_rest4"), # pad=(8,1), with_repeat=False, machine_pad=(7, 7)) b0["ooa_violins"].machine_arrow( lib("intro_phrase_wiggle").t(-7).eps(0, "p")(3, "(")(4, ")", beats=1)(5, "fermata", beats=2)(), instruction= "both repeat freely, 2nd starting slightly after 1st (staggered)") b0["ooa_cellos"].machine_arrow(ImaginaryCell(rhythm=(4, ), pitches=((-1, 0), )).eps( 0, "tremolo:3")(), instruction="repeat hairpin, 1,2 staggered") b0["ooa_cellos"].eps(1, 5, "ppp")( 1, "\\<", )( 3, "mp", "\\>", )() b0["cco_clarinets"].machine_arrow(clarinets_phrase(), instruction="repeat, freely (staggered)") b0["cco_percussion"].machine_arrow(intro.hold_cell(0, "p", ":32", "fermata"), instruction="(cont. repeating)") b0["cco_harp"].machine( ImaginaryCell(rhythm=(1, ), pitches=((-6, 6, 23, 24), )).ops("events")(0, ">", "ff")(), ) b0["cco_harp"].machine_arrow( lib("cell_rest4"), # pad=(8,1), with_repeat=False, machine_pad=(6, 6)) b0["cco_violin_i1"].machine_arrow(intro.hold_cell( 24, "p", ), instruction="repeat") b0["cco_violin_i2"].machine_arrow(intro.hold_cell( 18, "p", ), instruction="repeat") b0["cco_violin_i3"].machine_arrow(lib("intro_cell_down").t(17).eps( 0, "p", beats=0.5)(), instruction="repeat") b0["cco_violin_i4"].machine_arrow(lib("intro_a_phrase_1").cells[1].eps( 0, "p")(), instruction="repeat, freely") l_violin_ii1 = lib("intro_rock3_cco_oboe1_c38_41") l_violin_ii1.cells[1].pop_from("events", 0) l_violin_ii1.cells[1:].transformed(calliope.Transpose(interval=-7)) l_violin_ii1.eps(0, "\\<")(3, beats=1.5)() b0["cco_violin_ii1"].machine_arrow(l_violin_ii1, instruction="repeat, freely") b0["cco_violin_ii2"].machine_arrow(lib("intro_phrase_wiggle").crop( "events", 0, 2).t(-7).eps(0, "p")(2, beats=1)(), instruction="repeat, freely") b0["cco_violin_ii3"].machine(lib("cell_rest1")) b0["cco_violin_ii3"].machine_arrow(lib("intro_cell_down").t(-2).eps( 0, "p", )(), instruction="repeat, freely") b0["cco_violin_ii4"].machine_arrow(lib("intro_cell_shake").t(10).eps( 0, "p", beats=1)(2, "fermata", beats=2)(), instruction="repeat, freely") # block_0["cco_violin_i4"].machine_arrow(intro.COUNTER_A0().t(17).ops("events")( # 0, "p", beats=0.5)(), # instruction="repeat") b0["cco_viola1"].machine(lib("cell_rest1")) b0["cco_viola1"].machine_arrow(lib("intro_a_phrase_0").eps( 0, "mp", )(1, 4, beats=2)(), instruction="repeat, freely") b0["cco_viola2"].machine_arrow(lib("intro_rock3_cco_bassoon_c39_41").crop( "events", 1).t(5).eps(0, "p", "\\<")( 0, 2, "(", )( 1, 3, ")", )(5, "mp", beats=4)(), instruction="repeat, freely") b0["cco_viola3"].machine(lib("cell_rest2")) b0["cco_viola3"].machine_arrow(lib("intro_cell_shake").t(17).eps( 0, "p", beats=1)(1, beats=1)(2, "fermata", beats=4, pitch=12)(), instruction="repeat, freely") b0["cco_viola4"].machine(lib("cell_rest1")) b0["cco_viola4"].machine_arrow(intro.hold_cell( -12, "p", ), instruction="repeat") b0["cco_cello1"].machine_arrow(lib("intro_cell_mist").eps(0, "p")(), instruction="repeat, freely") b0["cco_cello2"].machine_arrow( lib("intro_phrase_straight_i").cells[1].t(-7).eps(0, "p")( 1, 3, beats=2, )(), instruction="repeat, freely") b0["cco_bass"].machine_arrow(intro.hold_cell( -6, "p", ), instruction="repeat") return b0