Friday, July 21, 2017

ex3A02. Performance pass increment

# ex3A02.py
# Performance pass increment

from moduleCsound import *

tags(1)

# Each k-time is 0.1 sec

header(ksmps=4410)

add("""
instr 1
kCount    init      0; set kcount to 0 first
kCount    =         kCount + 1; increase at each k-pass
          printk    0, kCount; print the value
endin
""")

tags(2)

# There are 10 k-passes in 1 sec

add("i 1 0 1")

tags(3)

writeRun(__file__)

No comments:

Post a Comment

ex3A05. Audio Vector