'A vocoder built around stft, sinbank, and noisebank.' import dlal import time # components audio = dlal.Audio(driver=True) comm = dlal.Comm() audio.add(audio) lpf1 = dlal.Lpf(0.99) lpf2 = dlal.Lpf(0.99) peak_lo = dlal.Peak(name='peak_lo') oracle_lo = dlal.Oracle(m=20, format=('set', '%'), name='oracle_lo') hpf1 = dlal.Hpf() hpf2 = dlal.Hpf() peak_hi = dlal.Peak(name='peak_hi') oracle_hi = dlal.Oracle(m=2e4, format=('set', '%'), name='oracle_hi') stft = dlal.Stft(512) sinbank = dlal.Sinbank(44100 / 512) noisebank = dlal.Noisebank() gain_tone = dlal.Gain(name='gain_tone') gain_noise = dlal.Gain(name='gain_noise') mul = dlal.Mul(1) buf_tone = dlal.Buf(name='buf_tone') buf_noise = dlal.Buf(name='buf_noise') buf = dlal.Buf() tape = dlal.Tape(1 << 17)
import dlal import midi as mid import math import threading import time audio = dlal.Audio() dlal.driver_set(audio) comm = dlal.Comm() midi = dlal.Midi() train = dlal.Train() iir = dlal.Iir() buf = dlal.Buf() tape = dlal.Tape(1 << 17) dlal.connect( midi, train, [buf, '<+', iir], [audio, tape], ) iir.pole_pairs_bandpass(0, 0.1) def sweep(): low_freq = 440 sweep_speed = 0.02 sweep.w = low_freq
self.lfo.freq(freq) self.lfo.amp(amp) self.oracle.b(b) self.oracle.format(fmt_name, *fmt_args, **fmt_kwargs) self.lfo.connect(self.oracle) def add_to(self, driver): driver.add(self.lfo) driver.add(self.oracle) def connect(self, other): self.oracle.connect(other) # init driver = dlal.Audio() comm = dlal.Comm() Voice('drum', 'buf') Voice('piano', 'sonic') Voice('bass', 'sonic', 'lim', 'buf') Voice('ghost', 'gain', 'midman', 'rhymel', 'lpf', 'lfo', 'oracle', 'sonic', 'lim', 'buf', input=['rhymel'])