trigexpseg — Triggers a series of exponential segments between specified points.
ares trigexpseg kTrig, ia, idur1, ib [, idur2] [, ic] [...]
kres trigexpseg kTrig, ia, idur1, ib [, idur2] [, ic] [...]
ia -- starting value. Zero is illegal for exponentials.
ib, ic, etc. -- value after dur1 seconds, etc. For exponentials, must be non-zero and must agree in sign with ia.
idur1 -- duration in seconds of first segment
idur2, idur3, etc. -- duration in seconds of subsequent segments.
kTrig -- trigger value. Will trigger playback of envelop when kTrig is equal 1
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. Triggering the envelop while it is already playing will cause the envelop to jump to the start and play again. This might cause a pop or a click. It is best to wait till the envelope has ended before retriggering it.
Here is an example of the trigexpseg opcode. Play trigexpseg.csd
Example 1118. Example of the trigexpseg opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform ; Audio out Audio in No messages -odac -d -m0d -M0 -+rtmidi=virtual ;;;RT audio I/O with MIDI in ; For Non-realtime ouput leave only the line below: ; -o midiin.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 instr 1 aEnv expseg 0.0001, .2, 1, .2, .5, .2, .7, .2, 0.0001 a1 oscili aEnv, 400 outs a1, a1 endin instr 2 kTrig metro 1 aEnv trigexpseg kTrig, 0.0001, .2, 1, .2, .5, .2, .7, .2, 0.0001 a1 oscili aEnv, 400 outs a1, a1 endin </CsInstruments> <CsScore> i1 0 1 i2 3 8 </CsScore> </CsoundSynthesizer>