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

rate~ Reference

Time-scale the output of a phasor~ or 0. - 1. ramp

rate~

Examples

Arguments

multiplier [auto]

Optional

The multiplier value used to scale the output.

Inlets

phase [auto]

The input to be scaled. Typically supplied by the output of a phasor~, this value should be between 0. and 1..

multiplier [auto]

The multiplier value used to scale the output.

Outlets

out1 [signal]

out1

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

sync [enum] (default: off)

Sets the sync mode of the rate~ object. The sync mode determines whether or not the rate~ object will stay in phase with the input signal, and the method used for synchronization. When the output of the rate~ object is "in phase," the input and output signals align precisely at the least common multiple of their periods (i.e., they pass through zero and begin a new cycle at precisely the same time). If the signals are in phase, and a new multiplier value is received, the rate~ object changes the frequency of its output ramp accordingly. However, the change in multiplier values means that the two signals may be out of phase. The rate~ object handles this situation in one of three different ways, depending on the sync mode.

Possible values:

0 = 'off' ( Disable the sync mode ) The arguments @sync 0 or @sync off disables the sync mode of the rate~ object (the default mode). In this mode rate~ never responds to phase differences; when a new multiplier is received, the rate~ object adjusts the speed of its output ramps and they continue without interruption. Since this mode never introduces a discontinuous jump in the ramp signal, it may be useful if phase is unimportant.

1 = 'lock' ( Set the lock mode for sync ) The arguments @sync 1 or @sync lock set the lock mode of the rate~ object. In sync lock mode, the rate~ object performs synchronization whenever a new multiplier is received. The rate~ object immediately calculates the proper ramp position which corresponds to being "in phase" with the new multiplier value, and jumps to that position.

2 = 'cycle' ( Set the cycle mode for sync ) The arguments @sync 2 or @sync cycle set the cycle mode of the rate~ object. In cycle mode, the rate~ object does not change the phase of its output until the end of the current cycle. When the input ramp reaches its peak and starts over from zero, the rate~ object immediately restarts the output ramp, causing a discontinuity in the output signal, and immediate phase synchronization.

Possible values:

0 = 'off'
1 = 'lock'
2 = 'cycle'

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

multiplier [auto]

The multiplier value used to scale the output.

phase [auto]

The input to be scaled. Typically supplied by the output of a phasor~, this value should be between 0. and 1..

reset [bang] (default: 0)

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

See Also

Name Description
rate~ Time-scale the output of a phasor~
rate Time-scale the output of a phasor~ or 0. - 1. ramp
bline Generates ramps using bang
line~ Linear ramp generator
phasor~ Generate sawtooth signals
line~ Linear ramp generator
snapshot~ Convert signal values to numbers