trapezoid~
Description
trapezoid~ is a trapezoidal wavetable with signal inputs to change ramp up/down phase position. The default lo/hi points are 0. and 1., but may be changed using the lo/hi messages.
Examples

trapezoid~ generates a trapezoidal waveform that lets you specify the phase points at which it changes direction
Arguments
ramp-up [float]
Optional
A floating-point value can be used to specify the ramp up value. The arguments
produce a ramp waveform, and produces a triangle waveform.ramp-down [float]
Optional
A floating-point value can be used to specify the ramp down value. The arguments
produce a ramp waveform, and produces a triangle waveform.Attributes
hi [float]
Sets the maximum value of trapezoid~ for signal output. The default value is
lo [float]
Sets the minimum value of trapezoid~ for signal output. The default value is
Common Box Attributes
Messages
float
Arguments
trapezoidal-control
[float]
In left inlet: Any float or signal or an input signal progressing from 0 to 1 is used to scan the trapezoid~ object's wavetable. The output of a phasor~ or some other audio signal can be used to control trapezoid~ as an oscillator, treating the contents of the wavetable as a repeating waveform.
In middle inlet: The ramp up portion of the trapezoidal waveform, specified as a fraction of a cycle between 0 and 1.0. The default is .1.
In right inlet: The ramp up portion of the trapezoidal waveform, specified as a fraction of a cycle between 0 and 1.0. The default is 0.9.
In middle inlet: The ramp up portion of the trapezoidal waveform, specified as a fraction of a cycle between 0 and 1.0. The default is .1.
In right inlet: The ramp up portion of the trapezoidal waveform, specified as a fraction of a cycle between 0 and 1.0. The default is 0.9.
signal
In left inlet: Any float or signal or an input signal progressing from 0 to 1 is used to scan the trapezoid~ object's wavetable. The output of a phasor~ or some other audio signal can be used to control trapezoid~ as an oscillator, treating the contents of the wavetable as a repeating waveform.
In middle inlet: The ramp up portion of the trapezoidal waveform, specified as a fraction of a cycle between 0 and 1.0. The default is .1.
In right inlet: The ramp up portion of the trapezoidal waveform, specified as a fraction of a cycle between 0 and 1.0. The default is 0.9.
In middle inlet: The ramp up portion of the trapezoidal waveform, specified as a fraction of a cycle between 0 and 1.0. The default is .1.
In right inlet: The ramp up portion of the trapezoidal waveform, specified as a fraction of a cycle between 0 and 1.0. The default is 0.9.
Output
signal
A signal which corresponds to the value referenced by the trapezoid~ object's input signal. If the output of a phasor~ or some other audio signal is used to scan the trapezoid~ object, the output will be a periodic waveform.
See Also
Name | Description |
---|---|
buffer~ | |
cos~ | |
phasor~ | |
wave~ | |
MSP Basics Tutorial 2: Adjustable Oscillator | MSP Basics Tutorial 2: Adjustable Oscillator |
MSP Basics Tutorial 3: Wavetable Oscillator | MSP Basics Tutorial 3: Wavetable Oscillator |