Exemplo n.º 1
0
def block4(lib):
    sb = short_block.get_block().ext_segments(
        melody_line1=lib("home_a_b").t(6).sc(0.5).move_t(),
        melody_line2=lib("home_b_aup4").t(6).sc(0.5).move_t(),
        counter_line=lib("counter_long_imod").t(6).sc(0.5).move_t(),
        bass_line=lib("bass_line").sc(0.5).t(6).move_t().pop_from(
            "cells", 14, 15, 18, 19),
        mid_drones=[
            lib("home_a_b").t(6),
        ],
        high_drones=[
            lib("home_b_aup4").t(6),
        ],
        riff=[
            lib("integrate_riff").t(1) * 16,
            lib("integrate_riff").t(6) * 16,
        ],
        bass_drones=[
            drone.DroneLine(
                line_pitches=((-21, -16, -11), ),
                phrase_rhythm=(8 * 4, ),
                phrase_count=1,
            ),
            drone.DroneLine(
                line_pitches=((-22, -15, -8), ),
                phrase_rhythm=(8 * 4, ),
                phrase_count=1,
            ),
        ],
    )
    sb.fill_rests()
    for ln in sb.lines:
        ln.respell = "sharps"
    return sb
Exemplo n.º 2
0
def block3(lib):
    sb = short_block.get_block().ext_segments(
        melody_line1=lib("home_a_b").t(8).sc(0.5).move_t(),
        melody_line2=lib("home_b_aup4").t(8).sc(0.5).move_t(),
        counter_line=lib("counter_long_imod").t(8).sc(0.5).move_t(),
        mid_drones=[
            lib("home_a_b").t(8),
        ],
        high_drones=[lib("home_b_aup4").t(8).mask("cells", 0, 1, 2, 3)],
        bass_drones=[
            drone.DroneLine(
                line_pitches=((-23, -9), ),
                phrase_rhythm=(8 * 4, ),
                phrase_count=1,
            ),
            drone.DroneLine(
                line_pitches=((-21, -11), ),
                phrase_rhythm=(8 * 4, ),
                phrase_count=1,
            ),
        ],
    )
    sb.fill_rests()
    for ln in sb.lines:
        ln.respell = "flats"
    return sb
Exemplo n.º 3
0
def block1(lib):
    sb1 = short_block.get_block()

    counter_end = lib("counter_long_imod").crop("phrases", 5).ts(2)

    # TO DO: is this even worth it???
    bass_scramble = lib("bass_line").scramble("cells", 8, 9, 7, 0, 1,
                                              7).ts(-2).t(5)
    # bass_scramble.cells[0].ts(-4)
    # bass_scramble.cells[1].ts(-4)
    bass_scramble.cells[1].rhythm = (-1, 1, 2, 1.5, 2.5)
    bass_scramble.cells[4].rhythm = (-1, 3, 4)
    bass_scramble.stack_p(((
        0,
        7,
    ), ), )

    # bass_line_begin = bass.bass_line().with_only("cells",0,1).ts(2)
    # bass_cell_5 = bass.bass_line().crop("cells",5, 2).ts(2)
    # bass_cell7 = bass.bass_line().with_only("cells",7).ts(2)

    high_drones = drone.DroneLine(
        # line_pitches=( (-22,-15), (-24,-8), ),
        line_pitches=((21, 28), ),
        phrase_rhythm=(4, 3, 1),
        # phrase_rhythm = (2,6),
        phrase_count=3,
    )

    bass_drones = drone.DroneLine(
        # line_pitches=( (-22,-15), (-24,-8), ),
        line_pitches=((-24, -15), (-22, -15)),
        phrase_rhythm=(4, ),
        # phrase_rhythm = (2,6),
        phrase_count=12,
    ).t(5)

    sb1.ext_segments(
        melody_line2=[lib("home_a_b").sc(0.5).ts(4).crop("phrases", 2, 0)],
        counter_line=[
            counter_end,
            counter_end,
        ],
        bass_line=[bass_scramble],
        high_drones=[high_drones(), high_drones.t(5)],
        bass_drones=[bass_drones()],
    )
    sb1.fill_rests()
    return sb1
Exemplo n.º 4
0
def block5(lib):
    sb = short_block.get_block().ext_segments(
        melody_line1=lib("home_a_b").t(4).sc(0.5).move_t(),
        melody_line2=lib("home_b_aup4").t(4).sc(0.5).move_t(),
        counter_line=lib("counter_long_imod").t(4).sc(0.5).move_t(),
        bass_line=lib("bass_line").sc(0.5).t(4).move_t().pop_from(
            "cells", 14, 15, 18, 19),
        mid_drones=[
            lib("home_a_b").t(4),
        ],
        riff=[
            lib("integrate_riff_up_down").t(4).bookend_pad(2).mul(3),
            lib("integrate_riff_up_down").t(-3).mul(4),
            lib("integrate_riff_up_down").t(2).bookend_pad(2).mul(2),
            # ImaginaryLine
            # RIFF().t(2).ext(RIFF_REVERSED().ts(1).t(2)).bookend_pad(2).mul(4),
        ],
        bass_drones=[
            drone.DroneLine(
                line_pitches=((-22, -15, -8), ),
                phrase_rhythm=(16 * 4, ),
                phrase_count=1,
            ),
        ])
    sb.fill_rests()
    for ln in sb.lines:
        ln.respell = "sharps"
    return sb
Exemplo n.º 5
0
def block2(lib):
    sb = short_block.get_block().ext_segments(bass_drones=[
        drone.DroneLine(
            line_pitches=((-9, 2), ),
            phrase_rhythm=(4, ),
            phrase_count=1,
        ),
    ])
    sb.fill_rests(beats=4)

    sb.ext_segments(
        melody_line1=lib("home_a_b").t(10).sc(0.5).move_t(),
        counter_line=lib("counter_long_imod").t(3).sc(0.5).bookend_pad(32),
        # mid_drones = [drone.DroneLine(
        #         line_pitches=(10,),
        #         phrase_rhythm = (4*18,),
        #         phrase_count = 1,
        #         ).bookend_pad(4)],
        bass_drones=[
            drone.DroneLine(
                line_pitches=(-16, ),
                phrase_rhythm=(4 * 8, ),
                phrase_count=1,
            ),
            drone.DroneLine(
                line_pitches=((-22, -9), ),
                phrase_rhythm=(2 * 4, ),
                phrase_count=1,
            ),
            drone.DroneLine(
                line_pitches=((-16, -5), ),
                phrase_rhythm=(4 * 4, ),
                phrase_count=1,
            ),
            drone.DroneLine(
                line_pitches=((-23, -9), ),
                phrase_rhythm=(4 * 2, ),
                phrase_count=1,
            ),
        ],
    )
    sb.fill_rests()
    return sb
Exemplo n.º 6
0
def block0(lib):
    sb0 = short_block.get_block()

    my_counter = lib("counter_long_imod").crop("phrases", 0, 2).ts(2)
    my_counter.phrases[2].note_events[2].pitch += 7

    sb0.ext_segments(
        counter_line=[my_counter],
        bass_line=lib("bass_line").ts(1).crop("phrases", 0, 2),
        high_drones=[
            drone.DroneLine(
                line_pitches=(
                    (23, 30),
                    (23, 24),
                ),
                phrase_count=3,
                # phrase_rhythm = (3,3),
            )
        ] + [
            drone.DroneLine(
                line_pitches=(
                    (28, 35),
                    (28, 36),
                ),
                phrase_count=3,
                # phrase_rhythm = (3,3),
            )
        ],
        bass_drones=[
            drone.DroneLine(
                line_pitches=((-20, -15), ),
                phrase_count=6,
            )
        ],
    )

    sb0.fill_rests(beats=8 * 4)

    sb0.ext_segments(
        melody_line2=[lib("home_a_b").sc(0.5).ts(4).crop("phrases", 0, 2)], )

    sb0.fill_rests()
    return sb0
Exemplo n.º 7
0
def block2(lib):
    sb2 = short_block.get_block()
    bass_drones = drone.DroneLine(
        line_pitches=((-24, -17), (-22, -17)),
        phrase_rhythm=(2, 2),
        # phrase_rhythm = (2,6),
        phrase_count=12,
    )

    high_drones1 = drone.DroneLine(
        line_pitches=((22, 33), ),
        phrase_rhythm=(3, 1),
        phrase_count=4,
    )
    high_drones2 = drone.DroneLine(
        line_pitches=((24, 34), ),
        phrase_rhythm=(2, 1, 1),
        phrase_count=4,
    )
    high_drones3 = drone.DroneLine(
        line_pitches=((24, 36), ),
        phrase_rhythm=(1, 1, 1, 1),
        phrase_count=4,
    )

    sb2.ext_segments(
        melody_line1=[
            lib("home_b").t(5).stack_p(((0, 7), ), ),
            lib("home_a").t(-2).sc(0.5).stack_p(((0, 12), ), )
        ],
        counter_line=[lib("counter_i").as_mod().t(5)],
        high_drones=[high_drones1(),
                     high_drones2(),
                     high_drones3()],
        bass_drones=[bass_drones()])
    sb2.fill_rests()
    return sb2
Exemplo n.º 8
0
def block1(lib):
    sb = short_block.get_block().ext_segments(
        melody_line1=[
            lib("integrate_opening_b").t(5).stack_p(
                ((0, 12), )).bookend_pad(4, 2),
        ],
        melody_line2=[
            lib("integrate_opening_b").t(12).stack_p(
                ((0, 12), )).bookend_pad(5, 1),
        ],
        counter_line=[
            lib("integrate_opening_counter_b").bookend_pad(2).t(5).crop(
                "cells", 0, 2)
            # COUNTER_RIFF_B.bookend_pad(4),
            # COUNTER_B
        ],
        bass_line=[
            lib("integrate_opening_b_fifths").t(-7).bookend_pad(4, 1.5)
        ],
        high_drones=[
            drone.DroneLine(
                line_pitches=(24, ),
                phrase_rhythm=(17 * 4, ),
                phrase_count=1,
            )
        ],
        mid_drones=[
            drone.DroneLine(
                line_pitches=(-10, ),
                phrase_rhythm=(4, ),
                phrase_count=3,
            ).t(12),
            drone.DroneLine(
                line_pitches=(((-14, -5), )),
                phrase_rhythm=(4, ),
                phrase_count=3,
            ).t(12),
            drone.DroneLine(
                line_pitches=(((-14, -10), )),
                phrase_rhythm=(4, ),
                phrase_count=3,
            ).t(12),
            drone.DroneLine(
                line_pitches=(((-21, -12), )),
                phrase_rhythm=(4, ),
                phrase_count=3,
            ).t(12),
            drone.DroneLine(
                line_pitches=(((-21, -5), )),
                phrase_rhythm=(4, ),
                phrase_count=2,
            ).t(12),
            drone.DroneLine(
                line_pitches=(((-16, -10), )),
                phrase_rhythm=(4, ),
                phrase_count=3,
            ).t(12),
        ],
        bass_drones=[
            drone.DroneLine(
                line_pitches=(-27, ),
                phrase_rhythm=(9 * 4, ),
                phrase_count=1,
            ),
            drone.DroneLine(
                line_pitches=((-27, -14), ),
                phrase_rhythm=(8 * 4, ),
                phrase_count=1,
            ),
        ],
    )

    sb.fill_rests(beats=15 * 4)
    sb.ext_segments(chords=[
        drone.DroneLine(
            line_pitches=((-4, -2, 0, 9), ),
            phrase_rhythm=(8, ),
            phrase_count=1,
        ),
    ])
    sb.fill_rests()
    return sb
Exemplo n.º 9
0
def block0(lib):

    # TO DO... add some fragments from counter B

    bass_undo = lib("integrate_opening").t(-12).bookend_pad(0, 5)
    up_bass_undo = bass_undo().ts(9)
    for i, e in enumerate(bass_undo.cells[:5].events):
        if not e.skip_or_rest:
            e.pitch = [e.pitch, up_bass_undo.events[i].pitch]
    for c in bass_undo.cells[5:10]:
        c.ts(1).stack_p([
            (
                -12,
                0,
            ),
        ])
    for c in bass_undo.cells[10:]:
        c.stack_p([
            (-12, 0, 12),
        ])
    bass_undo.cells[4].note_events[-1:].transformed(
        calliope.Transpose(interval=-12))

    bass_undo.cells[5].note_events[0].pitch = bass_undo.cells[4].note_events[
        -1].pitch

    sb = short_block.get_block().ext_segments(
        counter_line=[lib("counter").bookend_pad(6 * 4, 0)],
        melody_line1=[lib("counter").bookend_pad(6 * 4, 0)],
        riff=[lib("counter").bookend_pad(5 * 4, 0)],
        bass_line=[
            bass_undo,
        ],
        high_drones=[
            drone.DroneLine(
                line_pitches=(28, ),
                phrase_rhythm=(7 * 4, ),
                phrase_count=1,
            ),
            drone.DroneLine(
                line_pitches=(24, ),
                phrase_rhythm=(7 * 4, ),
                phrase_count=1,
            ),
        ],
        mid_drones=[
            drone.DroneLine(
                line_pitches=(p, ),
                phrase_rhythm=(9, ),
                phrase_count=1,
            ) for p in ((11, 16), (16, 21), (9, 14), (14, 19), (19, 24), (12,
                                                                          17))
        ],
        bass_drones=[
            drone.DroneLine(
                line_pitches=((-8, -1), (-10, 0), (-12, 2), (-14, 5)),
                phrase_rhythm=(14, ),
                phrase_count=4,
            )
        ],
    )

    sb.fill_rests()
    return sb
Exemplo n.º 10
0
def block3(lib):
    sb3 = short_block.get_block()
    melody_line1_b1 = lib("home_b").sc(0.5).t(10).stack_p((
        (0, -7),
        (0, -12),
    ))
    melody_line1_b1.note_events[0,
                                1].transformed(calliope.Transpose(interval=-5))
    melody_line1_ab = lib("home_a_b").sc(0.5).t(15)

    melody_line2_a = lib("home_a").sc(0.5).t(15).stack_p(((0, -12), ))
    melody_line2_ba = lib("home_b_aup4").sc(0.5).t(15)

    my_counter = lib("counter_long_imod").t(15).sc(0.5)
    bass_line_pre = lib("bass_line").t(10).with_only("phrases",
                                                     4).sc(0.5).stack_p(
                                                         ((0, -12), ))
    bass_line = lib("bass_line").t(15).crop("phrases", 0, 1).sc(0.5).stack_p(
        ((0, -12), ))

    high_drones1 = drone.DroneLine(
        line_pitches=((24, 36), ),
        phrase_rhythm=(0.5, 2.5, 1),
        phrase_count=7,
    )
    high_drones2 = drone.DroneLine(
        line_pitches=((25, 37), ),
        phrase_rhythm=(1, 1, 1, 1),
        phrase_count=5,
    )

    bass_drones1 = drone.DroneLine(
        # line_pitches=( (-22,-10), ),
        line_pitches=((-29, -17), ),
        phrase_rhythm=(3, 1),
        phrase_count=3,
    )

    bass_drones2 = drone.DroneLine(
        # line_pitches=( (-21,-9), ),
        line_pitches=(
            (-29, -17),
            (-28, -16),
        ),
        phrase_rhythm=(2, ),
        phrase_count=6,
    )

    bass_drones3 = drone.DroneLine(
        # line_pitches=( (-21,-9), ),
        line_pitches=((-28, -16), ),
        phrase_rhythm=(3, 1),
        phrase_count=3,
    )

    bass_drones4 = drone.DroneLine(
        # line_pitches=( (-21,-9), ),
        line_pitches=(
            (-26, -14),
            (-28, -16),
        ),
        phrase_rhythm=(2, ),
        phrase_count=6,
    )

    sb3.ext_segments(
        melody_line1=[melody_line1_b1, melody_line1_ab],
        melody_line2=[melody_line2_a, melody_line2_ba],
        high_drones=[high_drones1, high_drones2],
        bass_drones=[bass_drones1, bass_drones2, bass_drones3, bass_drones4])
    sb3.fill_rests(beats=8)
    sb3.ext_segments(bass_line=[bass_line_pre], )
    sb3.fill_rests(beats=16)

    sb3.ext_segments(
        counter_line=[my_counter],
        bass_line=[bass_line],
    )

    sb3.fill_rests()
    return sb3
Exemplo n.º 11
0
def block4(lib):
    b4 = short_block.get_block().ext_segments()

    b4.ext_segments(
        riff=[
            lib("riff_8c").t(3).stack_p(ST_4MT),
            lib("riff_8d").t(3).stack_p(ST_4MT),
            lib("riff_8c").t(10).stack_p(ST_4MT),
            lib("riff_8d").t(10).stack_p(ST_4MT),
            lib("riff_8c").t(5).stack_p(ST_4MT),
            lib("riff_8d").t(5).stack_p(ST_4MT),
            lib("riffs_opening"),
            lib("riff_opening_end_wiggle"),
            lib("riff_line"),
            lib("riff_line").t(7).stack_p(ST_UP_II),
            lib("riff_opening_end_wiggle").t(2),
            lib("riff_opening_end_wiggle").t(2),
            lib("riff_line").t(-15).stack_p(ST_7UP).bookend_pad(4),
            lib("riff_line").t(-8).stack_p(ST_DN_II),
            lib("riff_line").t(-1).stack_p(ST_UP_II),
            lib("riff_line").t(6).stack_p(ST_UP_I),
            lib("riff_line").t(13).stack_p(ST_UP_I),
            # lib("riff_line").t(8).bookend_pad(6)
        ],
        counter_line=[
            # home_riffs(1, respell="sharps").t( 4 ).stack_p( ST_7UP )
            lib("riff_home_a").stack_p(((0, 12), ), ).bookend_pad(40, ),
            lib("riff_home_a").stack_p(ST_UP_II),
            lib("riff_home_a").stack_p(((0, 12), ), ).t(2).bookend_pad(12, ),
            lib("riff_home_b").stack_p(((0, 12), ), ).t(2),
            # HOME_RIFF(respell="flats").t( 6 ).stack_p( ST_7DN ).t(-11),
        ],
        high_drones=[
            drone.DroneLine(
                line_pitches=((28, ), ),
                phrase_rhythm=(2, 1, 1),
                phrase_count=16,
            ).bookend_pad(24, 0),
            drone.DroneLine(
                line_pitches=((27, ), ),
                phrase_rhythm=(0.5, ) * 8,
                phrase_count=4,
            ),
            drone.DroneLine(
                line_pitches=((
                    15,
                    27,
                ), ),
                phrase_rhythm=(0.5, ) * 8,
                phrase_count=4,
            ),
            # drone.DroneLine(
            #     line_pitches=( (20,),),
            #     phrase_rhythm = (0.5,)*8,
            #     phrase_count = 4,
            #     ),
        ],
    )

    # segments derived from riff:
    b4.ext_segments(
        melody_line1=crazy_major(
            b4.segments["riff"](),
            poke=(25, 26, 27, 28, 37, 38, 39, 40, 41, 42, 43, 44, 45),
        ).t(12),
        mid_drones=cell_based_pads(b4.segments["riff"](),
                                   mask=(19, 20, 21, 22, 23, 24, 35),
                                   scale_steps=(4, 3)),
        melody_line2=chords.sus_maker(
            b4.segments["riff"],
            phrases={
                6: {
                    **chords.RIFF_DICT_A,
                    **{
                        "octave": 1
                    }
                },
                7: chords.RIFF_DICT_B,
                8: {
                    **chords.RIFF_DICT_A,
                    **{
                        "octave": 1
                    }
                },
                # 9:{**chords.RIFF_DICT_A, **{"octave": 1}},
                10: chords.RIFF_DICT_B,
                11: chords.RIFF_DICT_B,
                21: chords.RIFF_DICT_A,
                23: chords.RIFF_DICT_B,
                24: chords.RIFF_DICT_B,
                # 12:chords.RIFF_DICT_D,
            }),
        bass_line=[
            straight_bass(
                b4.segments["riff"],
                3,
                rhythm_tree=(
                    (3, 1),
                    (1.5, 2.5),
                ),
                input_start_beat=16,
            ).bookend_pad(16),
            straight_bass(
                b4.segments["riff"],
                1,
                rhythm_tree=(
                    (3, 1),
                    (1.5, 2.5),
                ),
                input_start_beat=72,
            ).mul(2).bookend_pad(28),
        ],
        chords=hits(
            b4.segments["riff"](),
            poke=(0, 18, 19, 25),
        ),
    )

    # extras!
    # b4.segments["mid_drones"].cells[45].t(12)

    for p in b4.segments["mid_drones"].phrases[6:]:
        p.stack_p(ST_7UP)

    # TO DO MAKE THIS A FUNCTION
    b4.ext_segments(
        bass_drones=[
            drone.DroneLine(  # Ab
                line_pitches=((-28, ), ),
                phrase_rhythm=(2, ),
                phrase_count=5,
            ).stack_p([(0, 19, 26)]),
            drone.DroneLine(  # Ab
                line_pitches=((-28, ), ),
                phrase_rhythm=(2, ),
                phrase_count=4,
            ).stack_p([(0, 19, 23)]),
            drone.DroneLine(  #A
                line_pitches=((-27, ), ),
                phrase_rhythm=(2, ),
                phrase_count=4,
            ).stack_p([(0, 17, 22)]),
            drone.DroneLine(  #A
                line_pitches=((-27, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 17, 27)]),
            drone.DroneLine(  #Bb
                line_pitches=((-26, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 19, 26)]),
            drone.DroneLine(  #Bb
                line_pitches=((-26, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 19, 23)]),
            drone.DroneLine(  #B
                line_pitches=((-25, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 17, 22)]),
            drone.DroneLine(  #B
                line_pitches=((-25, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 17, 27)]),
            drone.DroneLine(  #C
                line_pitches=((-24, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 19, 26)]),
            drone.DroneLine(  #C
                line_pitches=((-24, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 19, 23)]),
            drone.DroneLine(  #C#
                line_pitches=((-23, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 17, 22)]),
            drone.DroneLine(  #C#
                line_pitches=((-23, ), ),
                phrase_rhythm=(2, ),
                phrase_count=3,
            ).stack_p([(0, 17, 27)]),
            drone.DroneLine(  #D
                line_pitches=((-22, ), ),
                phrase_rhythm=(2, ),
                phrase_count=4,
            ).stack_p([(0, 19, 26)]),
            drone.DroneLine(  #Eb
                line_pitches=((-21, ), ),
                phrase_rhythm=(2, ),
                phrase_count=16,
            ).stack_p([(0, 17, 24)]),
        ], )

    b4.fill_rests()

    return b4
Exemplo n.º 12
0
def block2(lib):
    def sb2_riff(t1=-1, t2=None):
        t2 = t2 or t1 + 7
        return [
            lib("riff_line").crop("events", 0,
                                  5).t(t1).stack_p(ST_UP_I).mul(2),
            lib("riff_line").crop("events", 2).t(t2).stack_p(ST_DN_I),
        ]

    b2 = short_block.get_block().ext_segments(
        high_rhythm=[
            lib("rock_off_rhythm").mul(9, ImaginaryLine),
            lib("rock_high_rhythm_ii").mul(7, ImaginaryLine)
        ],
        bass_rhythm=[lib("rock_off_rhythm_slow").mul(9, ImaginaryLine)],
        riff=sb2_riff(-1, ) + sb2_riff(6, ) + sb2_riff(
            18,
            8,
        ) + [
            lib("riff_line").crop("events", 0, 4).pop_from(
                "events", 1).t(8).stack_p(ST_UP_II),
            lib("riff_line").crop("events", 0, 4).pop_from(
                "events", 1).t(3).stack_p(ST_UP_II),
            lib("riff_line").crop("events", 0, 8).t(3).stack_p(ST_UP_II),
            lib("riff_line").crop("events", 0, 6).t(3).stack_p(ST_UP_I),
            lib("riff_line").crop("events", 0, 6).t(3).pop_from(
                "events", 2, 3).stack_p(ST_DN_II),
            lib("riff_line").crop("events", 0, 10).t(3).stack_p(ST_DN_II),
            lib("riff_line").crop("events", 0, 5).t(3).stack_p(ST_DN_II),
            lib("riff_line").crop("events", 0, 5).t(10).stack_p(ST_DN_I),
            lib("riff_line").crop("events", 2, 0).t(10).stack_p(ST_UP_I),
            lib("riff_line").crop("events", 6, 4).t(10).stack_p(ST_UP_II),
        ] + sb2_riff(5),
        bass_line=[
            # home_riffs(1, respell="sharps").t( 4 ).stack_p( ST_7UP )
            lib("riff_home_a").t(4).stack_p((
                (0, ),
                (
                    0,
                    2,
                ),
            )).t(-12).bookend_pad(0, 4),
            lib("riff_home_a").t(6).stack_p((
                (0, ),
                (
                    0,
                    2,
                ),
            )).t(-12).bookend_pad(4, 0),
            lib("riff_home_a").t(6).stack_p((
                (0, ),
                (
                    0,
                    2,
                ),
            )).t(-12).bookend_pad(0, 4),
            # HOME_RIFF(respell="flats").t( 6 ).stack_p( ST_7DN ).t(-11),
        ],
        high_drones=[
            drone.DroneLine(
                line_pitches=((29, ), ),
                phrase_rhythm=(
                    2,
                    2,
                ),
                phrase_count=7,
            ).bookend_pad(36, ),
            drone.DroneLine(
                line_pitches=((
                    19,
                    26,
                ), ),
                phrase_rhythm=(1, 1, 1, 1),
                phrase_count=3,
            )
        ],
    )
    # TO DO HARMONY CHANGE at 17

    b2.ext_segments(
        melody_line1=crazy_minor(
            b2.segments["riff"](),
            poke=(4, 5, 16, 17, 26, 27, 28, 29, 30, 31),
        ),
        chords=hits(
            b2.segments["riff"](),
            poke=(0, 6, 18, 20, 22, 24, 25, 26, 32, 33),
            # chord_exclude = (2,5,8),
        ),
    )

    b2.fill_rests()

    return b2
Exemplo n.º 13
0
def block1(lib):
    b1 = short_block.get_block().ext_segments(
        high_rhythm=[lib("rock_high_rhythm").mul(11, ImaginaryLine)],
        mid_rhythm=[
            lib("rock_mid_rhythm").mul(8, ImaginaryLine).bookend_pad(24)
        ],
        bass_rhythm=[
            lib("rock_bass_rhythm").mul(8, ImaginaryLine).bookend_pad(24)
        ],
        riff=[
            (lib("riff_line") * 4).t(12).stack_p(ST_DN_I).crop("events", 0, 2),
            lib("riff2_4a").t(12).stack_p(ST_DN_I),
            lib("riff1_6").t(19).stack_p(ST_DN_I),
            lib("riff_line").t(7).stack_p(ST_UP_I),
            lib("riff2_4a").t(14).stack_p(ST_7DN),
            (lib("riff_line") * 2).t(14).stack_p(ST_DN_I),
            lib("riff1_4").t(9).stack_p(ST_UP_I),
            lib("riff2_4a").t(9).stack_p(ST_7DN),
            lib("riff2_4b").t(9).stack_p(ST_DN_I),
            lib("riff2_4b").t(9).stack_p(ST_UP_I),
            lib("riff2_4a").t(16).stack_p(ST_7DN),
            lib("riff1_4").t(16).stack_p(ST_DN_I),
            lib("riff1_4").t(16).stack_p(ST_7UP),
            lib("riff2_4b").t(16).stack_p(ST_7UP),
            lib("riff_line").t(11).stack_p(ST_DN_I),
            lib("riff_line").t(11).stack_p(ST_UP_I),
        ],
        high_drones=[
            drone.DroneLine(
                line_pitches=((28, ), ),
                phrase_rhythm=(2, 1, 1),
                phrase_count=10,
            ).bookend_pad(48, 0),
        ],
        mid_drones=[
            drone.DroneLine(
                line_pitches=((2, ), ),
                phrase_rhythm=(1, 1, 2),
                phrase_count=12,
            ).bookend_pad(24, 0),
            drone.DroneLine(
                line_pitches=((3, ), ),
                phrase_rhythm=(1, 1, 1, 1),
                phrase_count=4,
            ),
        ],
        bass_drones=[
            bass_drones(7, (-22, -24), phrase_rhythm=[(3, )]),
            bass_drones(2, (-24, ), phrase_rhythm=[(2, 2), (3, 3, 3)]),
            bass_drones(5, (-22, -24), phrase_rhythm=[(2, )] + [(3, )] * 4),
            bass_drones(6, (-22, ), phrase_rhythm=[(2, )]),
            bass_drones(2, (-22, -23), phrase_rhythm=[(2, )]),
            bass_drones(4, (-23, -21), phrase_rhythm=[(3, )]),
        ],

        # TO DO: these piano chrods are NICE... continue!
        melody_line2=[
            ImaginaryLine(
                chords.get_chord_phrase1().crop("events", 0,
                                                1).bookend_pad(6, 3),
                chords.get_chord_phrase1().bookend_pad(0, 2),
                chords.get_chord_phrase2(),
            ).stack_p(((
                0,
                12,
            ), ), )
        ])

    b1.ext_segments(
        melody_line1=crazy_minor(
            b1.segments["riff"](),
            poke=(6, 23, 24),
        ),
        chords=hits(
            b1.segments["riff"](),
            poke=(0, 2, 6, 17, 24, 25),
            chord_exclude=(2, 5, 8),
        ),
    )

    b1.fill_rests()

    return b1