pulseslopes()

pulseslopes(x, in_slope, out_slope, width)

Category

Envelope / Control

Description

Creates a unipolar pulse window inside one period. Unlike pulse(), the beginning and end of the active region can be sloped, so it works well as a rhythmic gate, tremolo shape, or oscillator-period envelope.

Arguments

Typical Values

For musical gating, try moderate widths such as 0.25 to 0.75 and slopes around 0.10 to 0.45. Larger slopes produce smoother, less clicky movement.

Example

saw(X)*pulseslopes(posarp()/22050, 0.25, 0.35, 0.60)

Notes

pulseslopes() returns values from 0.0 to 1.0. It is intended as an envelope/control shaper, not as a replacement for bipolar oscillators such as saw(), squa(), or pwmslopes().