pwmslopes()

pwmslopes(x, in_slope, out_slope, width)

Category

Oscillator

Description

Creates a pulse-width oscillator with independently sloped rising and falling parts. It is useful when a normal pwm() wave is too hard-edged, but a triangle is too soft.

Arguments

Typical Values

Use width around 0.15 to 0.85. Low slope values keep a harder PWM tone; higher slope values make the oscillator smoother and more triangular.

Example

0.35*pwmslopes(X, 0.25+0.55*param(0), 0.15+0.65*param(1), 0.35+0.30*param(2))

Notes

pwmslopes() is always available in Syntropy. For very bright settings, use realtime or rendering oversampling to reduce aliasing.