Monday, July 10, 2017

ex1B01. Limits of Hearing

# ex1B01.py
# Limits Of Hearing

from moduleCsound import *

tags(1)

header(ksmps=32)

# String needs to be raw so \n is kept and passed to csound
# rather than evaluated as newline

add(r"""
instr 1
        prints  "Playing %d Hertz!\n", p4
asig    oscils  .2, p4, 0
        outs    asig, asig
endin
""")

tags(2)

add("""
i 1 0 2 10
i . + . 100
i . + . 1000
i . + . 10000
i . + . 20000
""")

tags(3)

writeRun(__file__)

No comments:

Post a Comment

ex3A05. Audio Vector