<- C I ->

DURATION CONTROL STATEMENTS

          ihold
          turnoff  
These statements permit the current note to modify its own duration. ihold - this I-time statement causes a finite-duration note to become a `held' note. It thus has the same effect as a negative p3 ( see Score I-statement), except that p3 here remains positive and the instrument reclassifies itself to being held indefinitely. The note can be turned off explicitly with turnoff, or its space taken over by another note of the same instrument number (i.e. it is tied into that note). Effective at I-time only; no-op during a reinit pass.

turnoff - this P-time statement enables an instrument to turn itself off. Whether of finite duration or 'held', the note currently being performed by this instrument is immediately removed from the active note list. No other notes are affected.

Example:

The following statements will cause a note to terminate when a control signal passes a certain threshold (here the Nyquist frequency).

k1   expon  440, p3/10,880      ; begin gliss and continue
     if     k1 < sr/2 kgoto contin   ; until Nyquist detected
     turnoff                       ; then quit 
contin:     a1   oscil     a1, k1, 1
<- C I ->
Prepared from the MIT Media Lab Csound Manual, PJN, Nov 1994.