Created
November 27, 2019 00:43
-
-
Save Dagothig/5a85050e9920637f811eeac4394e1070 to your computer and use it in GitHub Desktop.
wawa
This file contains 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
from pyo import * | |
class AutoWah: | |
def __init__(self, input, freq=8, q=20, min=0, max=8000): | |
self.follower = Follower(input, freq=freq, mul=max-min, add=min) | |
self.lowpass = Biquad(input, freq=self.follower, q=q, type=0) | |
self.follower.ctrl() | |
self.lowpass.ctrl() | |
def out(self, chnl=0): | |
self.lowpass.out(chnl) | |
return self | |
def sig(self): | |
return self.lowpass | |
@property | |
def freq(self): | |
return self.follower.freq | |
@freq.setter | |
def freq(self, freq): | |
self.follower.setFreq(freq) | |
def setFreq(self, freq): | |
self.freq = freq | |
@property | |
def q(self): | |
return self.lowpass.q | |
@q.setter | |
def q(self, q): | |
self.lowpass.setQ(q) | |
def setQ(self, q): | |
self.q = q | |
@property | |
def min(self): | |
return self.follower.add | |
@min.setter | |
def min(self, min): | |
max = self.max | |
self.follower.add=min | |
self.max = max | |
def setMin(self, min): | |
self.min = min | |
@property | |
def max(self): | |
return self.follower.mul+self.follower.add | |
@max.setter | |
def max(self, max): | |
self.follower.mul=max-self.follower.add | |
def setMax(self, max): | |
self.max = max | |
server = Server() | |
server.boot() | |
son = SfPlayer(SNDS_PATH + "/transparent.aif", loop=True, mul=0.5) | |
aw = AutoWah(son).out() | |
server.start() | |
server.gui(locals()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment