Filters
Manages audio effects for the player, including equalization, timescale, karaoke, and more.
The Filters class allows you to apply audio effects to the player's output. You can use built-in presets (like "nightcore" or "bassboost") or manually configure specific filters like the equalizer or timescale.
Properties
Filter Properties
Direct access to filter configuration objects.
Standard Filters
Adjusts the player volume (0.0 to 5.0, where 1.0 is 100%).
Array of 15 bands (0-14) with gains from -0.25 to 1.0.
Karaoke settings (vocal removal).
Changes speed, pitch, and rate of the audio.
Adds a wavering effect to the volume.
Adds a wavering effect to the pitch.
Rotates the audio around the stereo channels (8D effect).
Adds distortion/clipping to the audio.
Mixes left/right channels (e.g. mono).
Low-pass filter (muffles high frequencies).
Management
A Set of currently enabled preset/custom filter names.
List of all available built-in and custom defined filters.
Methods
enable(name)
enable(name)#
→thisEnables a pre-defined filter (builtin or custom) by name.
The name of the filter to enable (e.g., "nightcore", "bassboost-high").
disable(name)
disable(name)#
→thisDisables an active filter by name.
The name of the filter to disable.
clear()
apply()
Sends the current filter configuration to the Lavalink node. You must call this after making changes for them to take effect.
setEqualizer(bands)
setEqualizer(bands)#
→thisSets custom equalizer bands.
Array of band objects { band: number, gain: number }.
setTimescale(options)
Sets the timescale filter (speed, pitch, rate).
Timescale options.
setKaraoke(options)
setKaraoke(options)#
→thisSets the karaoke filter to remove vocals.
Karaoke options.
setTremolo(options)
setTremolo(options)#
→thisSets the tremolo filter (volume oscillation).
Tremolo options.
setVibrato(options)
setVibrato(options)#
→thisSets the vibrato filter (pitch oscillation).
Vibrato options.
setRotation(options)
Sets the rotation filter (8D audio effect).
Rotation options.
setDistortion(options)
Sets the distortion filter.
Distortion options.
setChannelMix(options)
Sets the channel mix filter (mono, left-only, etc.).
Channel mix options.
setLowPass(options)
setLowPass(options)#
→thisSets the low-pass filter (smoothing).
Low-pass options.
setPluginFilters(filters)
Sets custom filters for Lavalink plugins.
Key-value pairs for plugin filters.