Tuesday, July 11, 2017

ex1C03. Fletcher Munson

# ex1C03.py
# Fletcher Munson

from moduleCsound import *

tags(1)

header(ksmps=32)

add("giSine    ftgen     0, 0, 2^10, 10, 1 ;table with a sine wave")

add("""
instr 1
kfreq     expseg    p4, p3, p5
          printk    1, kfreq ;prints the frequencies once a second
asin      poscil    .2, kfreq, giSine
aout      linen     asin, .01, p3, .01
          outs      aout, aout
endin
""")

tags(2)

add("""
i 1 0 5 1000 1000
i 1 6 20 20  20000
""")

tags(3)

writeRun(__file__)

Output: (spectrograph view in Audacity)


No comments:

Post a Comment

ex3A05. Audio Vector