def test_crossover(self): snd = dsp.read('tests/sounds/linux.wav') amount = dsp.win('phasor', 0, 1) smooth = 0.3 fade = dsp.win('rsaw', 0, 1) out = fx.crossover(snd, amount, smooth, fade) out.write('tests/renders/fx_crossover_linux.wav') osc = oscs.Osc('sine', amp=0.2) out = osc.play(snd.dur) out = fx.crossover(out, amount, smooth, fade) out.write('tests/renders/fx_crossover_sine.wav')
def test_sandwich_board(self): l = dsp.read('tests/sounds/linux.wav') g = dsp.read('tests/sounds/guitar1s.wav') f = fx.crossover(l, dsp.win('phasor', 0, 1), dsp.rand(0.1, 0.3), dsp.win('rnd', 0, 1)).graph(fontsize=50, label='Weird FX') ws = Waveset(g).substitute('sine').graph(fontsize=50, label='Waveset Manipulation') ps = oscs.Pulsar2d(freq=dsp.rand(10, 80), pulsewidth=shapes.win('hann')).play(2).graph( fontsize=50, label='Pulsar Synthesis') wt = shapes.win('hann', length=0.4) * shapes.win('sine') * shapes.win('rnd') wt.graph( 'tests/renders/graph_sandwich_board.png', insets=[ps, ws, f], width=900, height=340, label='Pippi: Computer Music With Python', stroke=30, fontsize=30, ) # For the readme shutil.copy('tests/renders/graph_sandwich_board.png', 'banner.png')