Tuesday, July 11, 2017

ex2A02. Hello Cabbage

This example requires the csound frontend called Cabbage be installed.


# ex2A02.py
# Hello Cabbage

from moduleCsound import *

add("""
<Cabbage>
form size(420,100)
keyboard bounds(10,10,300,80)
rslider bounds(325,15,80,80), channel("level"), text("Level"), range(0,1,0.3)
</Cabbage>
""")

tags(1)

header(ksmps=32)

# --- instrument

add("""
instr    1
 icps cpsmidi
 klev chnget  "level"
 a1   poscil klev*0.2,icps
      outs   a1,a1
endin
""")

add(stopIns, stopSyn)

writeRun(__file__)

No comments:

Post a Comment

ex3A05. Audio Vector