<filename>Pyo_module/documentation_practice/envelopes/exponential_ramp.py<gh_stars>0
#!/usr/local/Caskroom/miniconda/base/envs/music_venv/bin/pythonw

from pyo import *

s = Server().boot()

# 2 seconds linear ramp starting at 0.0 and ending at 0.3
amp = SigTo(value = 0.3, time = 2.0, init = 0.0)


# Pick a new value four times per second
pick = Choice([200, 250, 300, 350, 400], freq = 4)

# Print the chose frequency
pp = Print(pick, method = 1, message = "Frequency")

# Add an exponential portamento on an audio target and detune a second frequency
#Sharp attack for rising notes and long release for falling notes
freq = Port(pick, risetime = 0.001, falltime = 0.25, mul = [1, 1.005])
freq.ctrl()

# PLay a simple wave 
sig = RCOsc(freq, sharp = 0.7, mul = amp).out()

s.gui(locals())

<filename>Pyo_module/documentation_practice/envelopes/exponential_ramp.py<gh_stars>0
#!/usr/local/Caskroom/miniconda/base/envs/music_venv/bin/pythonw

from pyo import *

s = Server().boot()

# 2 seconds linear ramp starting at 0.0 and ending at 0.3
amp = SigTo(value = 0.3, time = 2.0, init = 0.0)


# Pick a new value four times per second
pick = Choice([200, 250, 300, 350, 400], freq = 4)

# Print the chose frequency
pp = Print(pick, method = 1, message = "Frequency")

# Add an exponential portamento on an audio target and detune a second frequency
#Sharp attack for rising notes and long release for falling notes
freq = Port(pick, risetime = 0.001, falltime = 0.25, mul = [1, 1.005])
freq.ctrl()

# PLay a simple wave 
sig = RCOsc(freq, sharp = 0.7, mul = amp).out()

s.gui(locals())

#!/usr/local/Caskroom/miniconda/base/envs/music_venv/bin/pythonw # 2 seconds linear ramp starting at 0.0 and ending at 0.3 # Pick a new value four times per second # Print the chose frequency # Add an exponential portamento on an audio target and detune a second frequency #Sharp attack for rising notes and long release for falling notes # PLay a simple wave