TYPE: CHOP
TITLE: Trigger CHOP

This CHOP adds an audio-style attack/decay/sustain/release envelope to all
trigger points in the input channels. A trigger point occurs whenever the first
input's channel crosses the trigger threshold value while increasing. The
envelope consists of six major sections: delay, attack, peak, decay, sustain
and release.

The peak and sustain levels can be set independently, but peak can never be 
less than sustain. Without an input connected, a single full envelope is
generated.

From the time the threshold is reached and while the channel's value is above
the release threshold, the envelope is in its sustain phase during which it will
delay attack, peak-hold, decay and then maintain its sustain value. Then the
envelope will decay to 0.

This CHOP can be time sliced and take advantage of Minimal Time Slice Cooks
(see the Time Slice Preferences dialog in the Options menu).

Parameters:
Trigger
    Release = Trigger Threshold   - If on, the trigger and release
                          thresholds are the same value.
    Trigger Threshold   - The trigger threshold (see above)        /threshup
    Release Threshold   - The release threshold (see above)        /threshdown
    Re-trigger Delay    - The amount of time after a trigger       /retrigger
			  point that a new trigger may occur.
    Min Trigger Length  - The minimum amount of time that the      /mintrigger
			  trigger will remain active.
    Trigger On          - Determines whether a trigger occurs on
			  an increasing slope or decreasing slope
			  when passing the trigger threshold.
			  A release will occur on the opposite slope.
Attack
    Delay Length        - The amount of time to delay the
			  envelope after the trigger point.
    Attack Length       - The amount of rise time from zero to     /attack
			  the peak level.
    Attack Shape        - The shape of the attack ramp.
    Peak Level          - The peak level.                          /peak
    Peak Length         - The length of time of the peak.          /peaklen
Sustain
    Decay Length        - The amount of decay time from the        /decay
			  peak level to the sustain level.
    Decay Shape         - The shape of the decay ramp.
    Sustain Level       - The sustain level. This level is         /sustain
			  held until a release point is reached.
    Release Length      - The amount of release time from the      /release
			  sustain level to zero.
    Release Shape       - The shape of the release ramp.
Chan
    Channel Name        - Channel name when no inputs connected.
    Sample Rate         - Sample rate when no inputs connected.    /rate
    Complete Envelope   - If on, a complete envelope is produced for
			  each trigger point. If off, the envelope may
			  be terminated at any time by a release point.
    Remainder - What to do with remaining samples at end of the interval.
	Discard Remainder          - Output interval = input interval.
	Make Output Longer         - Output longer if envelope unfinished.
	Mix Remainder to Beginning - Add remainder to samples at the start.

Local Variables
    C   - The current channel (0 to NC-1).
    NC  - The total number of channels.

See also: Count, Hold
