Last active
January 3, 2022 14:14
-
-
Save severak/eda89be0319d69bc5e2d240d8ec4b803 to your computer and use it in GitHub Desktop.
Jan Vana's looper for Bespoke synth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Jan Vana's multichannel looper | |
# Jan Vana implemented this in Ableton, Severak ported it to Bespoke | |
# USAGE | |
# there are four loopers called looper1 to looper4 | |
# these are connected to four gains (outgain1 to outgain4) which goes to one main gain | |
# there are four notegaes (notegate1 to notegate4) which passes notes to currently selected channel | |
# there is one audiorouter called inrouter which is connected to loopers (and send audio to currently selected channel) | |
# paste this into one main script, create other scripts which call this like: | |
# def on_pulse(): | |
# global vl | |
# vl.select(1) | |
# map pulses from midicontroller/grid to these scripts | |
class Vanalooper: | |
def __init__(self): | |
self.selected = 1 | |
self.select(1) | |
# select current active looper | |
def select(self, chan): | |
self.selected = chan | |
me.set("inrouter~route", chan-1) | |
# edit this array to change number of loopers | |
for i in [1, 2, 3, 4]: | |
if i==chan: | |
me.set("notegate" + str(i) + "~open", 1) | |
else: | |
me.set("notegate" + str(i) + "~open", 0) | |
# set volume of current active looper | |
def volume(self, vol): | |
me.set("outgain" + str(self.selected) + "~gain", vol) | |
# start recording in current active looper | |
def record(self): | |
me.set("looper" + str(self.selected) + "~capture", 1) | |
# empties current active looper | |
def empty(self): | |
me.set("looper" + str(self.selected) + "~clear", 1) | |
global vl | |
vl = Vanalooper() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment