Thursday, July 13, 2017

ex2E02. Record Realtime

# ex2E02.py
# Record RealTime

from moduleCsound import *

add(startSyn)

add(startOpt)
add("-odac")
add(stopOpt)

add(startIns)

header(ksmps=32)

add("seed      0 ;each time different seed for random")

add("""
  instr 1
kFreq     randomi   400, 800, 1 ;random sliding frequency
aSig      poscil    .2, kFreq ;sine with this frequency
kPan      randomi   0, 1, 1 ;random panning
aL, aR    pan2      aSig, kPan ;stereo output signal
          outs      aL, aR ;live output
          fout      "live_record.wav", 18, aL, aR ;write to soundfile
  endin
""")

tags(2)

add("i 1 0 10")
tags(3)

writeRun(__file__)

No comments:

Post a Comment

ex3A05. Audio Vector