floor()

floor(value)

Category

Math

Description

Rounds a value downward to the previous integer. For example 2.9 becomes 2, while -2.1 becomes -3. It is useful for quantizers, stepped modulation, and phase wrapping tricks.

Arguments

Typical Values

Use moderate values first, then increase modulation depth while listening for clipping, aliasing, or excessive filter resonance.

Example

floor(8*pos()/len())

Notes

For pitched oscillator functions, X already contains the current MIDI note pitch and transpose information. Prefer saw(X), sin(X), or pwm(X, 0.4) unless you intentionally want an octave or ratio shift such as 0.5*X or 2*X.