smoothstep
Smoothed fade of inputs
Description
Fade from zero to one or one to zero with a cubic polynomial shape .
Arguments
y [number]
The value of the right edge is the end point of the fade transition. The output reaches 1 when a = y, or when the right edge (y) equals the signal input (a).
a [number]
The input to be smoothed. When x < y, the output fades from 0 to 1 as a moves from x to y. When x > y, the fade is inverted — the output fades from 1 to 0 as a moves from y to x.
Inlets
x [number]
The value of the left edge is the starting point of the fade. The transition begins when a = x, i.e. when the signal input equals the left edge value.
y [number]
The value of the right edge is the end point of the fade transition. The output reaches 1 when a = y, or when the right edge (y) equals the signal input (a).
a [number]
The input to be smoothed. When x < y, the output fades from 0 to 1 as a moves from x to y. When x > y, the fade is inverted — the output fades from 1 to 0 as a moves from y to x.
Outlets
out1 [number]
out1Fixed Attributes
These attributes must be set in the object box and determine the behavior of the object at runtime.
hot [bool] (default: false)
Trigger computation on all inlets.
Dynamic Attributes
These attributes can be modified in the code during execution using the set object
a [number]
The input to be smoothed. When x < y, the output fades from 0 to 1 as a moves from x to y. When x > y, the fade is inverted — the output fades from 1 to 0 as a moves from y to x.
reset [bang] (default: 0)
Banging this attribute will reset the object to its default state.
x [number]
The value of the left edge is the starting point of the fade. The transition begins when a = x, i.e. when the signal input equals the left edge value.
y [number]
The value of the right edge is the end point of the fade transition. The output reaches 1 when a = y, or when the right edge (y) equals the signal input (a).
See Also
| Name | Description |
|---|---|
| smoothstep~ | Smoothed fade of inputs |
| linearinterp | Linear interpolation |
| slide | The discrete derivative of the input |