mc.twist~ Reference

Make Linear Ramps Curved (multichannel)



The twist~ object accepts a ramp between 0 and 1 (such as one generated by phasor~) and produces a piecewise linear approximation of an expoential function using the same algorithm as the curve~ object. The curvature of the ramp is controlled by the curve attribute that ranges from -1 to 1. A curve value of 0 produces an output ramp identical to the input.




curve [float]

The curve attribute sets the parameters of the exponential function that generates the non-linear output. It can range between -1 and 1. For ascending ramps, values of curve less than 1 produce values above the linear input and values of curve greater than 1 produce values below the linear input. As curve values near -1 or 1, the curavture becomes more extreme.

interval [int]

The curved output is a piecewise linear approximation of the exponential function. The interval attribute sets the number of samples used for each line segement. Values of interval must be a power of 2 between 2 and 64 samples. Larger values will produce a less accurate approximation but could be more efficient. If the signal vector size is less than interval, the actual segment length will be the signal vector size. Possible values:

'2' ( 2 sample segment length )
'4' ( 4 sample segment length )
'8' ( 8 sample segment length )
'16' ( 16 sample segment length )
'32' ( 32 sample segment length )
'64' ( 64 sample segment length )

shapemode [int]

The shapemode attribute, when enabled, causes descending ramps to be symmetrical with ascending ramps. shapemode is enabled by default.

syncupdate [int]

When enabled syncupdate defers changes to the curve attribute until either an input ramp starts or changes direction (resets). This avoids discontinuities in the ramp output.

Common Box Attributes

Multichannel Group Attributes



Connect any object producing a signal ramp between 0 and 1.

Multichannel Group Messages

See Also

Name Description