kr linen kamp, irise, idur, idec ar linen xamp, irise, idur, idec kr linenr kamp, irise, idec, iatdec ar linenr xamp, irise, idec, iatdec kr envlpx kamp, irise, idur, idec, ifn, iatss, iatdec[,ixmod] ar envlpx xamp, irise, idur, idec, ifn, iatss, iatdec[,ixmod] kr envlpxr kamp, irise, idec, ifn, iatss, iatdec[,ixmod][, irind] ar envlpxr xamp, irise, idec, ifn, iatss, iatdec[, ixmod][, irind]
idur - overall duration in seconds. A zero or negative value will cause initialization to be skipped.
idec - decay time in seconds. Zero means no decay. An idec > idur will cause a truncated decay.
irind (optional) - independence flag. If left zero, the release time (idec) will influence the extended life of the current note following a note-off. If non-zero, the idec time is quite independent of the note extension (see below). The default value is 0.
ifn - function table number of stored rise shape with extended guard point.
iatss - attenuation factor, by which the last value of the envlpx rise is modified during the note's pseudo steady state. A factor > l causes an exponential growth, and < l an exponential decay. A 1 will maintain a true steady state at the last rise value. Note that this attenuation is not by fixed rate (as in a piano), but is sensitive to a note's duration. However, if iatss is negative (or if steady state < 4 k-periods) a fixed attenuation rate of abs(iatss) per second will be used. 0 is illegal.
iatdec - attenuation factor by which the closing steady state value is reduced exponentially over the decay period. This value must be positive and is normally of the order of .01. A large or excessively small value is apt to produce a cutoff which is audible. A zero or neg value is illegal.
ixmod (optional, between +- .9 or so) - exponential curve modifier, influencing the steepness of the exponential trajectory during the steady state. Values less than zero will cause an accelerated growth or decay towards the target (e.g. subito piano). Values greater than zero will cause a retarded growth or decay. The default value is zero (unmodified exponential).
linenr is unique within Csound in containing a note-off sensor and release time extender. When it senses either a score event termination or a MIDI noteoff, it will immediately extend the performance time of the current instrument by idec seconds, then execute an exponential decay towards the factor iatdec. For two or more units in an instrument, extension is by the greatest idec.
linenr, envlpxr are examples of the special Csound "r" units that contain a note-off sensor and release time extender. Unless made independent by irind, when each senses a score event termination or a MIDI noteoff, it will immediately extend the performance time of the current instrument by idec seconds, then begin a decay (as described above) from wherever it was at the time. These "r" units can also be modified by MIDI noteoff velocities (see veloffs). If the irind flag is on (non-zero), the overall performance time is unaffected by note-off and veloff data.
Mulitple "r" units. When two or more "r" units occur in the same instrument
it is usual to have only one of them influence the overall note duration.
This is normally the master amplitude unit. Other units controlling, say,
filter motion can still be sensitive to note-off commands while not affecting
the duration by making them independent (irind non-zero). Depending on
their own idec (release time) values, independent "r" units may or may
not reach their final destinations before the instrument terminates. If
they do, they will simply hold their target values until termination. If
two or more "r" units are simultaneously master, note extension is by the