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

rampsmooth~

Smooth an incoming signal

Description

rampsmooth~ smooths an incoming signal across n samples. Each time an incoming value changes, it begins a linear ramp of n samples to reach this value. This is useful for envelope following and lowpass filtering. The number of samples is specified either as arguments or with the ramp, rampup, rampdown messages.

Arguments

Name Type Opt Description
ramp-sample-pair int opt The number of samples across which to generate a ramp up or ramp down can be specified by a pair of numbers.

Messages

signal A signal or value to be smoothed. Each time an incoming value changes, the rampsmooth~ object begins a linear ramp over a specified number of samples to reach the new value.
ramp smoothing-size (samples) [int]
In left inlet: The word ramp, followed by a number, specifies the number of samples over which a signal will be smoothed. Each time an incoming value changes, the rampsmooth~ object begins a linear ramp of the specified number of samples to reach the new value. The default value is 0.
rampdown downward-smoothing-size (samples) [int]
In left inlet: The word rampdown, followed by a number, specifies the number of samples over which a signal will be smoothed when an incoming value less than the current value arrives.
rampup upward-smoothing-size (samples) [int]
In left inlet: The word rampup, followed by a number, specifies the number of samples over which a signal will be smoothed when an incoming value greater than the current value arrives.

Information for box attributes common to all objects

Output

signal: The smoothed signal is sent out the outlet.

Examples

rampsmooth~ performs linear smoothing on an input signal

See Also

Name Description
line~ Linear ramp generator
slide~ Filter a signal logarithmically
MSP Compression Tutorial 1: Peak Limiting MSP Compression Tutorial 1: Peak Limiting
MSP Compression Tutorial 7: Keying MSP Compression Tutorial 7: Keying
MSP Compression Tutorial 8: Microsounds MSP Compression Tutorial 8: Microsounds
MSP Compression Tutorial 9: Ducking MSP Compression Tutorial 9: Ducking