Esempio n. 1
0
 def set_notes(self, notes):
     BaseSynth.set_notes(self,notes)
     self.osc.freq = pyo.Noise(add=1, mul=0.3*self.freq)
     self.env_reader.input=self.trig
     self.env_reader.dur = pyo.Max(self.dur, comp=0.3125)
     self.disto_env_reader.dur = self.dur
     self.freq_env_reader.dur = self.dur
     self.disto_env_reader.input = self.trig
     self.freq_env_reader.input = self.trig
Esempio n. 2
0
 def set_notes(self, notes):
     BaseSynth.set_notes(self,notes)
     self.trans_env_reader.input=self.trig
     self.env_reader.input=self.trig
     sine_freqs = []
     for i in range(-1,1):
         freqs = [self.freq*j*(1+0.008*i) for j in range(1,8)]
         sine_freqs.extend(freqs)
     self.osc.freq = sine_freqs
     self.trans_resonator.delay = self.freq**-1
     self.env_reader.dur = pyo.Max(self.dur, comp=0.3125)
Esempio n. 3
0
    def set_notes(self, notes, tempo=96):
        BaseSynth.set_notes(self,notes)
        self.trans_env_reader.input=self.trig
        self.env_reader.input=self.trig
        sine_freqs = []
        for i in range(-1,1):
            sine_freqs.extend([self.freq*(1+0.001*i), self.freq*2*(1+0.002*i), self.freq*3*(1+0.002*i),self.freq*5*(1+0.002*i)])

        self.osc.freq = sine_freqs
        self.trans_resonator.freq = self.freq*4
        self.env_reader.dur = pyo.Max(self.dur, comp=0.3125)
Esempio n. 4
0
 def __init__(self, sequence, amp=1, pan=0.5):
     BaseSynth.__init__(self, sequence, amp, pan)
     self.env = pyo.CosTable([(0,0.0000),(953,1.0000),(5737,0.7254),(8192,0.0000)])
     self.env_reader = pyo.TrigEnv(self.trig, self.env, dur=pyo.Max(self.dur, comp=0.3125))
     self.osc = pyo.LFO(type=2, freq=pyo.Noise(add=1, mul=0.3*self.freq), mul=0.5*self.env_reader)
     self.pre_filter = pyo.Biquad(self.osc, freq=191)
     self.disto_env = pyo.CosTable([(0,0.0000),(2118,0.2694),(8192,0.0000)])
     self.disto_env_reader = pyo.TrigEnv(self.trig, self.disto_env, dur=self.dur, add=0.7)
     self.disto = pyo.Disto(self.pre_filter, drive=self.disto_env_reader, mul=0.3)
     self.freq_env = pyo.CosTable([(0,0.0000),(1553,0.4767),(8192,0.0000)])
     self.freq_env_reader = pyo.TrigEnv(self.trig, self.freq_env, dur=self.dur, add=1000, mul=200)
     self.res_filter = pyo.Biquad(pyo.BrownNoise(mul=self.env_reader), q=6, freq=self.freq_env_reader, mul=0.9, type=2)
     self.panner = pyo.Pan(self.disto+self.res_filter, mul=self.master_amp, pan=self.master_pan)
     self.last_audio_object = self.panner
Esempio n. 5
0
    def __init__(self, sequence, amp=1, pan=0.5):
        BaseSynth.__init__(self, sequence, amp, pan)
        self.env = pyo.CosTable([(0,0.0000),(353,1.0000),(4166,0.6528),(8000,0.0000)])
        self.env_reader = pyo.TrigEnv(self.trig, self.env, dur=pyo.Max(self.dur, comp=0.3125))
        self.sine_freqs = []
        for i in range(-1,1):
            self.sine_freqs.extend([self.freq*(1+0.001*i), self.freq*2*(1+0.002*i), self.freq*3*(1+0.002*i),self.freq*5*(1+0.002*i)])

        self.osc = pyo.Sine(freq=self.sine_freqs, mul=[self.env_reader, self.env_reader*0.2, self.env_reader*0.2, self.env_reader*0.1]*3)

        self.trans_env = pyo.CosTable([(0,0.0000),(123,0.0777),(812,0.0570),(2083,0.0052),(8000,0.0000)])
        self.trans_env_reader = pyo.TrigEnv(self.trig, self.trans_env, dur=0.25)
        self.trans = pyo.Noise(mul=self.trans_env_reader)
        self.trans_filter = pyo.Biquad(self.trans, freq=1690)
        self.trans_resonator = pyo.Biquad(self.trans_filter, q=31, freq=self.freq*4)
        self.panner = pyo.Pan((self.trans_resonator+self.osc).mix(0), mul=(0.1)*self.master_amp, pan=self.master_pan)
        self.last_audio_object = self.panner
Esempio n. 6
0
 def __init__(self, freq=440, base_freq=55, samplerate=44100, phase=0, mul=1, add=0):
     PyoObject.__init__(self, mul, add)
     self._freq = freq
     self._phase = phase
     self._base_freq = base_freq
     self._samplerate = samplerate
     self._max_freq = int(samplerate / 4)
     self._table_size = int((self._max_freq / self._base_freq) * 4)
     self._col_size = int((self._max_freq / self._base_freq) / 2)
     #freq,mul,add,lmax = convertArgsToLists(freq,mul,add)
     
     tables = tables_gen(tri_gen, self._table_size, self._col_size, self._base_freq, self._max_freq)
     self._matrix = pyo.NewMatrix(self._table_size, self._col_size, tables)
     self._ramp = pyo.Phasor(freq, phase)
     self._table_selector_freq = pyo.Sig(freq)
     self._table_selector = pyo.Min(pyo.Max(((pyo.Abs(self._table_selector_freq) / (self._base_freq * 2)) - 0.5) / self._col_size, 0), (self._col_size - 1) / self._col_size)
     self._wave = pyo.MatrixPointer(self._matrix, self._ramp, self._table_selector)
     self._base_objs = self._wave.getBaseObjects()
Esempio n. 7
0
    def __init__(self, sequence, amp=1, pan=0.5):
        BaseSynth.__init__(self, sequence, amp, pan)
        self.env = pyo.CosTable([(0,0.0000),(123,0.9896),(2701,0.4870),(6479,0.2746),(8192,0.0000)])
        self.env_reader = pyo.TrigEnv(self.trig, self.env, dur=pyo.Max(self.dur, comp=0.3125))
        sine_freqs = []
        for i in range(-1,1):
            freqs = [self.freq*j*(1+0.008*i) for j in range(1,8)]
            sine_freqs.extend(freqs)
        harm_amps = [1,0.3,0.4,0.2,0.1,0.04,0.04,0.03,0.02]
        self.osc = pyo.Sine(freq=sine_freqs, mul=[self.env_reader*harm_amps[i] for i in range(8)])

        self.trans_env = pyo.ExpTable([(0,0.3938),(8192,0.0000)])
        self.trans_env_reader = pyo.TrigEnv(self.trig, self.trans_env, dur=0.25)
        self.trans = pyo.Noise(mul=self.trans_env_reader)
        self.trans_filter = pyo.Biquad(self.trans, freq=1690)
        self.trans_resonator = pyo.Delay(pyo.Denorm(self.trans_filter), feedback=0.90, delay=(self.freq**-1))
        self.chorus = pyo.Chorus(self.trans_resonator, depth=0.13, feedback=0.84)
        self.master_filter = pyo.Biquad((self.chorus+self.osc).mix(0), freq=3900)
        self.panner = pyo.Pan(self.master_filter, mul=(0.1)*self.master_amp, pan=self.master_pan)
        self.last_audio_object = self.panner