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

triangle~ Reference

Triangle/ramp wavetable

triangle~

Description

triangle~ is a triangle/ramp wavetable with signal input to change phase offset of the peak value. The default lo/hi points are -1. and 1., but may be changed using the lo/hi messages.

Examples

triangle~ lets you generate ramping waveforms with different reversal points

Arguments

peak-value-phase-offset [float]

Optional

Peak value phase offset, expressed as a fraction of a cycle, from 0 to 1.0. The default is 0.5. A value of 0 produces a ramp waveform when the triangle~ object is driven by a phasor~, and a value of 1.0 produces a sawtooth waveform.

Attributes

hi [float]

Sets the maximum value of triangle~ for signal output. The default value is 1.0

lo [float]

Sets the minimum value of triangle~ for signal output. The default value is -1.0

Common Box Attributes

Messages

float

Arguments

triangular-control [float]
In left inlet: Any signal, float, or an input signal progressing from 0 to 1 is used to scan the triangle~ object's wavetable. The output of a phasor~ or some other audio signal can be used to control triangle~ as an oscillator, treating the contents of the wavetable as a repeating waveform.

In right inlet: Peak value phase offset, expressed as a fraction of a cycle, from 0 to 1.0. The default is 0.5. Scanning through the triangle~ object's wavetable using output of a phasor~ with a phase offset value of 0 produces a ramp waveform, and a phase offset of 1.0 produces a sawtooth waveform.

signal

In left inlet: Any signal, float, or an input signal progressing from 0 to 1 is used to scan the triangle~ object's wavetable. The output of a phasor~ or some other audio signal can be used to control triangle~ as an oscillator, treating the contents of the wavetable as a repeating waveform.

In right inlet: Peak value phase offset, expressed as a fraction of a cycle, from 0 to 1.0. The default is 0.5. Scanning through the triangle~ object's wavetable using output of a phasor~ with a phase offset value of 0 produces a ramp waveform, and a phase offset of 1.0 produces a sawtooth waveform.

Output

signal

A signal which corresponds to the value referenced by the triangle~ object's input signal. If the output of a phasor~ or some other audio signal is used to scan the triangle~ object, the output will be a periodic waveform.

See Also

Name Description
buffer~
cos~
phasor~
trapezoid~
tri~
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