def test_crush(self): snd = dsp.read('tests/sounds/linux.wav') out = fx.crush(snd) out.write('tests/renders/fx_crush_linux.wav') snd = dsp.read('tests/sounds/guitar1s.wav') out = fx.crush(snd) out.write('tests/renders/fx_crush_guitar.wav')
def makekick(ctx): length = kick_lfo.interp(ctx.pos) out = noise.bln('square', length, [dsp.rand(80, 100), dsp.rand(50, 100)], [dsp.rand(150, 200), dsp.rand(50, 70)]) out = fx.crush(out, dsp.rand(6, 10), dsp.rand(11000, 44100)) out = fx.lpf(out, 200).vspeed([1, 0.5]) return out.env('pluckout').taper(0.02) * dsp.rand(0.6, 1)
def test_crush(self): snd = dsp.read('tests/sounds/linux.wav') out = fx.crush(snd) out.write('tests/renders/fx_crush_linux.wav') snd = dsp.read('tests/sounds/guitar10s.wav') out = fx.crush(snd) out.write('tests/renders/fx_crush_guitar.wav') out = fx.crush(snd, dsp.win('sine', 2, 16), 44100) out.write('tests/renders/fx_crush_guitar_vbitdepth.wav') out = fx.crush(snd, 16, dsp.win('sine', 200, 44100)) out.write('tests/renders/fx_crush_guitar_vsamplerate.wav') out = fx.crush(snd, dsp.win('hannin', 2, 16), dsp.win('sine', 200, 44100)) out.write('tests/renders/fx_crush_guitar_vboth.wav')
def theme_synth(length, pos, total_length): notes = [ rhodes.rhodes(dsp.rand(4, 7), freq, 0.3) for freq in scale ] themes = [ [ note.speed(dsp.choice(speeds)) for note in notes * 2 ] for theme in range(8) ] theme = dsp.choice(themes) theme_note = dsp.choice(theme) note = fx.crush(theme_note) return fx.lpf(fx.softclip(note), dsp.win('rnd', 1000, 5000))
def blips(length, pos, total_length): print('BLIPS', length, pos) notes = [ rhodes.rhodes(dsp.rand(4, 7), freq, 0.3) for freq in scale ] the_blip = notes[0].speed(2.0 * dsp.randint(1, 3)) * 0.4 blip = dsp.mix([ the_blip, notes[0].speed(1.5 * dsp.randint(1, 4)) * 0.4 ]) out = dsp.buffer(length=length) for _ in range(dsp.randint(2, 6)): ba = blip.cut(dsp.rand(0, blip.dur / 4), length / 2).pad(dsp.rand(0, length)) bb = blip.cut(dsp.rand(0, blip.dur / 4), length / 2).pad(dsp.rand(0, length)) b = dsp.mix([ba.pan(dsp.rand()), bb.pan(dsp.rand())]).taper(0.01) b = fx.crush(b) b = mixdrift(b) out.dub(b) return out