Tuesday, July 11, 2017

ex1C02_2. RMS Feedback System (randi)

# ex1C02_2.py
# RMS Feedback System (randi)

from moduleCsound import *

tags(1)

header(ksmps=32)

# arndsndL - a random value between -.8 and 0.8 every 0.1-second (10 Hz)
# arndsndR - a random value between -.4 and 0.4 evey 0.05-second (20 Hz)
# points in-between interpolated

add("""
instr 1
arndsndL   randi     .8, 10
arndsndR   randi     .4, 20
            outs      arndsndL, arndsndR
endin
""")

tags(2)

# We will see 10 random values on left-channel (1 s* rate of 10 1/s)
# We will see 20 random values on right-channel (1 s * rate of 20 1/s)
# and linear interpolated for all other points (1 sec has sr points or 44100)

add("""
i 1 0 1
""")

tags(3)

writeRun(__file__)

Output:


No comments:

Post a Comment

ex3A05. Audio Vector