#!/usr/local/Caskroom/miniconda/base/envs/music_venv/bin/pythonw


from pyo import * 

s = Server().boot()

# Creates a noise source
n = Noise()

# Creates an LFO oscillating +/- 500 around 1000 (filters frequency)
lfo1 = Sine(freq = 0.1, mul = 500, add = 1000)

# Creates an LFOoscillating between 2 and 8 (filter's Q)
lfo2 = Sine(freq = 0.4).range(2,8)

# Creates a dynamic bandpass filter applied to the noise source
bp1 = ButBP(n, freq = lfo1, q = lfo2).out()

# the lfo object provides more waveforms than just a sine wave

# creates a ramp oscillating +/- 1000 around 12000 (filter's frequency)
lfo3 = LFO(freq = 0.25, type = 1, mul = 1000, add = 1200)

#creates a square oscillating between 4 and 12 (filter's Q)
lfo4 = LFO(freq = 4, type = 2).range(4, 12)

#Creates a second dynamic bandpass filter applied to the noise source
bp2 = ButBP(n, freq = lfo3, q = lfo4).out(1)


# Displays the wave forms
sc = Scope([lfo1, lfo2, lfo3, lfo4, bp1, bp2])



s.gui(locals()) 
