async def sighs(ctrl: MidiController, tick: int): if (utils.every_n_ticks(50, tick, offset=ctrl.channel * 10) and utils.coin_flip(0.80)) or utils.coin_flip(0.1): note = ((next(two) if (tick % 480) > 240 else next(one)) + next(maybe_8va) + next(maybe_8va)) await ctrl.play_note(note, utils.r.randint(40, 70), 3) if utils.every_n_ticks(25, tick + utils.r.randint(0, 15)): ctrl.set_cc(1, abs(tick % 7 - tick % 5 - tick % 3 + tick % 2) * 5) ctrl.set_cc(11, abs(tick % 7 - tick % 5 - tick % 3 + tick % 2) * 5)
async def harps(ctrl: MidiController, tick: int): ratio = utils.incrat(tick, 0.001) if (utils.every_n_ticks(75, tick + utils.r.randint(-20, 20)) and utils.coin_flip(0.9 * ratio)) or utils.coin_flip(0.04): await ctrl.play_note( get_note(tick) + 12 + next(up) + next(up) + next(rare_up) - next(up), utils.sine(tick, 80, 100 + 26 * ratio, 75) + utils.r.randint(-5, 5), 1, )
async def strings(ctrl: MidiController, tick: int): ratio = utils.incrat(tick, 0.001) period = 100 + (ctrl.channel - 3) // 3 * 50 ctrl.set_cc(1, utils.sine(tick, 70 + 15 * ratio, 90 + 36 * ratio, period, 50)) ctrl.set_cc(11, utils.sine(tick, 10 + 50 * ratio, 90 + 36 * ratio, period, 50)) random_play = utils.coin_flip(0.05 + 0.05 * ratio) if (utils.every_n_ticks(100 + utils.r.randint(40, 60), tick) and utils.coin_flip(0.5)) or random_play: await ctrl.play_note( get_note(tick) + next(up) + next(up) + next(rare_up), 50, 0.75 + utils.r.randint(-1, 2), )
async def fast_boy(ctrl: MidiController, tick: int): if utils.coin_flip(0.20): await ctrl.play_note( next(notes) + 12 + next(maybe_8va), abs(tick % 7 - tick % 5 + tick % 3) * 6 + utils.r.randint(0, 60), 4, )
async def dots(ctrl: MidiController, tick: int): if utils.every_n_ticks(2, tick, offset=ctrl.channel * 10) and utils.coin_flip(0.4): down_8ba = next(maybe_8va) note = (next(two) if (tick % 500) > 250 else next(one)) - down_8ba - down_8ba await ctrl.play_note(note, utils.r.randint(40, 70), 0.1 if down_8ba == 0 else 5) if utils.every_n_ticks(25, tick): ctrl.set_cc(9, utils.r.randint(30, 87)) ctrl.set_cc(1, utils.r.randint(10, 50))
async def slow_boy(ctrl: MidiController, tick: int): if utils.coin_flip(0.01): note = next(notes) + next(maybe_8va) await ctrl.play_note( note, abs(tick % 7 - tick % 5 - tick % 3 + tick % 2) * 5 + int( (0.05 * tick) % 25), 30 if note == 31 else 8, ) if tick % 50: ctrl.set_cc(10, utils.r.randint(10, 117)) ctrl.set_cc(74, utils.r.randint(40, 80)) if tick % 11: ctrl.set_cc(1, tick % 2 * 2)