Skip to main content
Version: v2.10.5

Filters

Configures shared filters and guarded native NodeLink effects on a player. Native effects are not Lavalink plugin-filter payloads.

Signatures below match the public source surface in 2.10.5. Use manager/player factories for ordinary application setup.

Constructor​

constructor(player: Player, manager: Manager);

Properties​

Property or getterDeclaration
distortionpublic distortion: DistortionOptions | null
equalizerpublic equalizer: Band[]
karaokepublic karaoke: KaraokeOptions | null
rotationpublic rotation: RotationOptions | null
timescalepublic timescale: TimescaleOptions | null
tremoloOptionspublic tremoloOptions: TremoloOptions | null
vibratopublic vibrato: VibratoOptions | null
channelMixpublic channelMix: ChannelMixOptions | null
lowPasspublic lowPass: LowPassOptions | null
highpasspublic highpass: HighPassOptions | null
echopublic echo: EchoOptions | null
choruspublic chorus: ChorusOptions | null
compressorpublic compressor: CompressorOptions | null
flangerpublic flanger: FlangerOptions | null
phaserpublic phaser: PhaserOptions | null
phonographpublic phonograph: PhonographOptions | null
spatialpublic spatial: SpatialOptions | null
tapepublic tape: TapeOptions | null
pluginFilterspublic pluginFilters: Record<string, unknown>
reverbpublic reverb: ReverbOptions | null
volumepublic volume: number
bassBoostlevelpublic bassBoostlevel: number
filtersStatuspublic filtersStatus: Record<AvailableFilters, boolean>
managerpublic manager: Manager
playerpublic player: Player

Methods​

updateFilters​

public async updateFilters(): Promise<this>;

Sends current filter settings. REST failures are currently caught and logged, so successful awaiting does not prove server acceptance.

syncFromNode​

public syncFromNode(payload: LavalinkFilters | { filters: LavalinkFilters }): this;

Hydrates direct or wrapped native filter data without sending a REST update.

getFilterStatus​

public getFilterStatus(filter: AvailableFilters): boolean;

Returns preset/status flags; these are not a complete inventory of externally modified remote filters.

clearFilters​

public async clearFilters(): Promise<this>;

Clears all filters applied to the audio.

setEqualizer​

public async setEqualizer(bands?: Band[]): Promise<this>;

Sets the own equalizer bands on the audio.

setKaraoke​

public async setKaraoke(karaoke?: KaraokeOptions): Promise<this>;

Sets the own karaoke options to the audio.

setTimescale​

public async setTimescale(timescale?: TimescaleOptions): Promise<this>;

Sets the own timescale options to the audio.

setVibrato​

public async setVibrato(vibrato?: VibratoOptions): Promise<this>;

Sets the own vibrato options to the audio.

setTremolo​

public async setTremolo(tremolo?: TremoloOptions): Promise<this>;

Sets the tremolo options on the audio.

setChannelMix​

public async setChannelMix(channelMix?: ChannelMixOptions): Promise<this>;

Sets the stereo channel mix options on the audio.

setLowPass​

public async setLowPass(lowPass?: LowPassOptions): Promise<this>;

Sets the low pass filter options on the audio.

setHighPass​

public async setHighPass(highpass?: HighPassOptions): Promise<this>;

Sets the NodeLink high pass filter options on the audio.

setEcho​

public async setEcho(echo?: EchoOptions): Promise<this>;

Sets the NodeLink echo filter options on the audio.

setReverb​

public async setReverb(reverb?: ReverbOptions): Promise<this>;

Sets the NodeLink reverb filter options on the audio.

setChorus​

public async setChorus(chorus?: ChorusOptions): Promise<this>;

Sets the NodeLink chorus filter options on the audio.

setCompressor​

public async setCompressor(compressor?: CompressorOptions): Promise<this>;

Sets the NodeLink compressor filter options on the audio.

setFlanger​

public async setFlanger(flanger?: FlangerOptions): Promise<this>;

Sets the NodeLink flanger filter options on the audio.

setPhaser​

public async setPhaser(phaser?: PhaserOptions): Promise<this>;

Sets the NodeLink phaser filter options on the audio.

setPhonograph​

public async setPhonograph(phonograph?: PhonographOptions): Promise<this>;

Sets the NodeLink phonograph filter options on the audio.

setSpatial​

public async setSpatial(spatial?: SpatialOptions): Promise<this>;

Sets the NodeLink spatial filter options on the audio.

setTape​

public async setTape(tape?: TapeOptions): Promise<this>;

Sets the NodeLink tape filter options on the audio.

setNodeLinkHighPass​

public async setNodeLinkHighPass(highpass?: HighPassOptions): Promise<this>;

Alias for setHighPass; uses the same native backend requirement.

setNodeLinkEcho​

public async setNodeLinkEcho(echo?: EchoOptions): Promise<this>;

Alias for setEcho; uses the same native backend requirement.

setNodeLinkReverb​

public async setNodeLinkReverb(reverb?: ReverbOptions): Promise<this>;

Alias for setReverb; uses the same native backend requirement.

setNodeLinkChorus​

public async setNodeLinkChorus(chorus?: ChorusOptions): Promise<this>;

Alias for setChorus; uses the same native backend requirement.

setNodeLinkCompressor​

public async setNodeLinkCompressor(compressor?: CompressorOptions): Promise<this>;

Alias for setCompressor; uses the same native backend requirement.

setNodeLinkFlanger​

public async setNodeLinkFlanger(flanger?: FlangerOptions): Promise<this>;

Alias for setFlanger; uses the same native backend requirement.

setNodeLinkPhaser​

public async setNodeLinkPhaser(phaser?: PhaserOptions): Promise<this>;

Alias for setPhaser; uses the same native backend requirement.

setNodeLinkPhonograph​

public async setNodeLinkPhonograph(phonograph?: PhonographOptions): Promise<this>;

Alias for setPhonograph; uses the same native backend requirement.

setNodeLinkSpatial​

public async setNodeLinkSpatial(spatial?: SpatialOptions): Promise<this>;

Alias for setSpatial; uses the same native backend requirement.

setNodeLinkTape​

public async setNodeLinkTape(tape?: TapeOptions): Promise<this>;

Alias for setTape; uses the same native backend requirement.

setPluginFilters​

public async setPluginFilters(pluginFilters?: Record<string, unknown>, requiredPluginNames: string | string[] = Filters.defaultPluginFilterPlugins): Promise<this>;

Checks a nonempty payload against advertised plugin names. Defaults to LavaDSPX-Plugin aliases; custom names can be supplied. Empty calls clear without requiring a plugin.

setRotation​

public async setRotation(rotation?: RotationOptions): Promise<this>;

Sets the own rotation options effect to the audio.

setDistortion​

public async setDistortion(distortion?: DistortionOptions): Promise<this>;

Sets the own distortion options effect to the audio.

bassBoost​

public async bassBoost(stage: number): Promise<this>;

Sets the bass boost level on the audio.

chipmunk​

public async chipmunk(status: boolean): Promise<this>;

Toggles the chipmunk effect on the audio.

china​

public async china(status: boolean): Promise<this>;

Toggles the "China" effect on the audio.

eightD​

public async eightD(status: boolean): Promise<this>;

Toggles the 8D audio effect on the audio.

nightcore​

public async nightcore(status: boolean): Promise<this>;

Toggles the nightcore effect on the audio.

slowmo​

public async slowmo(status: boolean): Promise<this>;

Toggles the slowmo effect on the audio.

soft​

public async soft(status: boolean): Promise<this>;

Toggles a soft equalizer effect to the audio.

tv​

public async tv(status: boolean): Promise<this>;

Toggles the TV equalizer effect on the audio.

trebleBass​

public async trebleBass(status: boolean): Promise<this>;

Toggles the treble/bass equalizer effect on the audio.

vaporwave​

public async vaporwave(status: boolean): Promise<this>;

Toggles the vaporwave effect on the audio.

distort​

public async distort(status: boolean): Promise<this>;

Toggles the distortion effect on the audio.

pop​

public async pop(status: boolean): Promise<this>;

Toggles the party effect on the audio.

party​

public async party(status: boolean): Promise<this>;

Toggles a party effect on the audio.

earrape​

public async earrape(status: boolean): Promise<this>;

Toggles earrape effect on the audio.

electronic​

public async electronic(status: boolean): Promise<this>;

Toggles electronic effect on the audio.

radio​

public async radio(status: boolean): Promise<this>;

Toggles radio effect on the audio.

tremolo​

public async tremolo(status: boolean): Promise<this>;

Toggles a tremolo effect on the audio.

darthvader​

public async darthvader(status: boolean): Promise<this>;

Toggless a darthvader effect on the audio.

daycore​

public async daycore(status: boolean): Promise<this>;

Toggles a daycore effect on the audio.

doubletime​

public async doubletime(status: boolean): Promise<this>;

Toggles a doubletime effect on the audio.

demon​

public async demon(status: boolean): Promise<this>;

Toggles the demon effect on the audio.

Types and Guides​