Reinitialization in Csound - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Reinitialization in Csound

Description:

Re-initialization in Csound. The Csound reinit opcode ... After the re-initialization pass, k-rate execution resumes normally. Re-initialization Opcodes ; ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 8
Provided by: defau5
Category:

less

Transcript and Presenter's Notes

Title: Reinitialization in Csound


1
Re-initialization in Csound
  • The Csound reinit opcode provides a means to
    re-initialize portions of an instrument program
    during performance.
  • During a re-initialization pass, k-rate
    execution pauses temporarily and a new I-time
    pass is made through the range of statements
    specified.
  • After the re-initialization pass, k-rate
    execution resumes normally.

2
Re-initialization Opcodes
3
Basic Coding Principles
  • Re-initialization begins at the statement
    following the reinit label and continues until an
    endin or rireturn opcode is encountered.
  • reinit is always used intermittently, often in a
    conditional context. I.e., if a specified
    condition is met, or if a certain amount of time
    has elapsed, then re-initialize the necessary
    part of the instrument.
  • The Csound timout opcode is very useful in
    conjunction with reinit, and often paired with it
    when periodic re-initialization is needed
  • Syntax timout istart, idur, label

4
Conditional Re-initialization
gliss start reinit here kgliss line 1,
iglissdur,2 rireturn end reinit
here if (kgliss lt 2) kgoto continue reinit gli
ss restart gliss continue kgate linen iamp,iris
e,p3,idecay asig oscili iamp,icpskgliss,ifn ou
t asig endin
5
Periodic Reinitialization

N.B., re-initialization will include the timout
opcode start timout 0, idur,
continue reinit start skipped for idur
secs continue kgate linen iamp,irise,idur,idec
ay asig oscili kgate,icps,ifn out
asig endin
6
Re-initialization Notes
  • Only i-type statements, expressions, and
    arguments will be changed during a
    re-initialization pass.
  • To access the current value of a k-variable
    during re-initialization, use the Csound i()
    function, e.g.

kdur table kindex,ifunction start idur i(kdur
) kgate linen iamp,idur.1,idur,idur.5 timout
0, idur, continue reinit start start reinit
above continue rireturn end reinit here
7
Reading Assignment
  • Read Boulanger Chapter 17 RP Constrained
    Random Event Generation and Retriggering in
    Csound
  • Read the Csound Manual about reinit, rigoto,
    rireturn, and timout.
  • Experiment!
Write a Comment
User Comments (0)
About PowerShow.com