slide Reference

Smooth values logarithmically

slide

Description

Filters an input value logarithmically between changes. It's particularly useful for envelope following and lowpass filtering to smooth a stream of continuous data.

Examples

slide performs logarithmic smoothing of an input

Discussion

The formula is y (n) = y (n-1) + ((x (n) - y (n-1))/slide).

Arguments

slide-up [float]

Optional

Specifies the slide up value. The default is 1.

slide-down-value [float]

Optional

A second argument specifies the slide down value. The default is 1.

Attributes

Common Box Attributes

Messages

bang

Performs the same function as float using the last input value.

int

Arguments

input [int]
Converted to float.

float

Arguments

input [float]
In left inlet: An input value to be filtered. When a new value is received, object filters an input value logarithmically between changes using the formula

y (n) = y (n-1) + ((x (n) - y (n-1))/slide)

A given sample output from slide is equal to the last value plus the difference between the last value and the input divided by the slide value. Given a slide value of 1, the output will therefore always equal the input. Given a slide value of 10, the output will only change 1/10th as quickly as the input. This can be particularly useful for lowpass filtering or envelope following.

  (inlet1)

Arguments

input [float]
In middle inlet: Specifies the slide up value to be used when an incoming value is greater than the current value.

  (inlet2)

Arguments

input [float]
In right inlet: Specifies the slide down value to be used when an incoming value is less than the current value.

reset

Resets the current output sample to 0.

set

Arguments

input [int]
The word set followed by a number will set the current input value to the given number without causing output (bang can be used to cause successive output).

Output

float

The filtered input value.

See Also

Name Description
Working with Video in Jitter Working with Video in Jitter
Working with OpenGL Working with OpenGL
expr
Max Data Tutorial 2: Data Scaling Max Data Tutorial 2: Data Scaling