A newer version of Max is available. Click here to access the latest version of the Max documentation

trapezoid Reference

Trapezoid wavetable operator.

trapezoid

Examples

Arguments

rampUp [number]

Optional

The rampUp argument sets the phase value (0.0 ... 1.0) where the trapezoid will hit its peak. A floating-point value can be used to specify the ramp up value. The arguments 0. 0. produce a ramp waveform, and 0.5 0.5 produces a triangle waveform. Default: 0.5.

rampDown [number]

Optional

The rampDown argument sets the phase value (0.0 ... 1.0) where the trapezoid will begin dropping back to the minimum. A floating-point value can be used to specify the ramp down value. The arguments 0. 0. produce a ramp waveform, and 0.5 0.5 produces a triangle waveform. Default: 0.5.

Inlets

phase [number]

The input to trapezoid should be a that repeatedly goes from 0 to 1.

rampUp [number]

The rampUp argument sets the phase value (0.0 ... 1.0) where the trapezoid will hit its peak. A floating-point value can be used to specify the ramp up value. The arguments 0. 0. produce a ramp waveform, and 0.5 0.5 produces a triangle waveform. Default: 0.5.

rampDown [number]

The rampDown argument sets the phase value (0.0 ... 1.0) where the trapezoid will begin dropping back to the minimum. A floating-point value can be used to specify the ramp down value. The arguments 0. 0. produce a ramp waveform, and 0.5 0.5 produces a triangle waveform. Default: 0.5.

Outlets

Out [number]

A floating-point value which corresponds to the value referenced by the trapezoid operator's input floating-point value.

Fixed 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

phase [number]

The input to trapezoid should be a that repeatedly goes from 0 to 1.

rampDown [number]

The rampDown argument sets the phase value (0.0 ... 1.0) where the trapezoid will begin dropping back to the minimum. A floating-point value can be used to specify the ramp down value. The arguments 0. 0. produce a ramp waveform, and 0.5 0.5 produces a triangle waveform. Default: 0.5.

rampUp [number]

The rampUp argument sets the phase value (0.0 ... 1.0) where the trapezoid will hit its peak. A floating-point value can be used to specify the ramp up value. The arguments 0. 0. produce a ramp waveform, and 0.5 0.5 produces a triangle waveform. Default: 0.5.

reset [bang] (default: 0)

Banging this attribute will reset the object to its default state.

See Also

Name Description
triangle~ Triangle/ramp wavetable
triangle~ A triangle/ramp wavetable oscillator with a phase input.
boxtotri~ A variable shape window multiplier, from boxcar to triangle.
phasor~ Generate sawtooth signals
line~ Linear ramp generator