idur1 -- duration in seconds of first segment. A zero or negative value will cause all initialization to be skipped.
idur2, idur3, etc. -- duration in seconds of subsequent segments. A zero or negative duration jumps to the next value and continues with the following segment. The default is zero.
Performance
These units generate control or audio signals whose values can pass through 2 or more specified points. The sum of dur values may or may not equal the instrument's performance time: a shorter performance will truncate the specified pattern, while a longer one will cause the last value to be repeated until the end of the note.
Segment durations round to the nearest whole control period for kres or sample for ares. A positive duration that rounds to zero jumps to the next value without taking an extra step.
Examples
Here is an example of the linseg opcode. It uses the file linseg.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;realtime audio out;-iadc ;;;uncomment -iadc if realtime audio input is needed too; For Non-realtime ouput leave only the line below:;-o linseg.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1giSineftgen0,0,2^10,10,1instr1kcps=cpspch(p4)kenvlinseg0,0.25,1,0.75,0; together = 1 secasigposcilkenv,kcps,giSineoutsasig,asigendininstr2; scaling to durationkcps=cpspch(p4)kenvlinseg0,p3*0.25,1,p3*0.75,0asigposcilkenv,kcps,giSineoutsasig,asigendininstr3; with negative valuekcps=cpspch(p4)aenvlinseg0,0.1,1,0.5,-0.9,0.4,0asigposcilaenv,kcps,giSineoutsasig,asigendin</CsInstruments><CsScore>i1017.00; = 1 sec, p3 fits exactlyi1227.00; = 2 sec, p3 truncated at 1 seci2417.00; scales to durationi2627.00; of p3i3927.00e</CsScore></CsoundSynthesizer>