Skip to content

FilterManager

The FilterManager for each player

Constructors

new FilterManager()

new FilterManager(player: Player): FilterManager

The Constructor for the FilterManager

Parameters

ParameterType
playerPlayer

Returns

FilterManager

Defined in

src/structures/Filters.ts:108

Properties

PropertyModifierTypeDefault valueDescriptionDefined in
datapublicFilterDataundefinedThe Filter Data sent to Lavalink, only if the filter is enabled (ofc.)src/structures/Filters.ts:39
equalizerBandspublicEQBand[][]The Equalizer bands currently applied to the Lavalink Serversrc/structures/Filters.ts:12
filterspublicPlayerFiltersundefinedAll “Active” / “disabled” Player Filterssrc/structures/Filters.ts:16
filterUpdatedStatepublicbooleanfalsePrivate Util for the instaFix Filters optionsrc/structures/Filters.ts:14
lavalinkFilterPluginpublicobjectundefined-src/structures/Filters.ts:549
lavalinkFilterPlugin.toggleEchopublic(delay: number, decay: number) => Promise<boolean>undefinedEnables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data)src/structures/Filters.ts:556
lavalinkFilterPlugin.toggleReverbpublic(delays: number[], gains: number[]) => Promise<boolean>undefinedEnables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data)src/structures/Filters.ts:580
lavalinkLavaDspxPluginpublicobjectundefined-src/structures/Filters.ts:443
lavalinkLavaDspxPlugin.toggleEchopublic(decay?: number, echoLength?: number) => Promise<boolean>undefinedEnables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data)src/structures/Filters.ts:529
lavalinkLavaDspxPlugin.toggleHighPasspublic(boostFactor: number, cutoffFrequency: number) => Promise<boolean>undefinedEnables / Disables the HighPass effect, (Optional: provide your Own Data)src/structures/Filters.ts:477
lavalinkLavaDspxPlugin.toggleLowPasspublic(boostFactor: number, cutoffFrequency: number) => Promise<boolean>undefinedEnables / Disables the LowPass effect, (Optional: provide your Own Data)src/structures/Filters.ts:451
lavalinkLavaDspxPlugin.toggleNormalizationpublic(maxAmplitude?: number, adaptive?: boolean) => Promise<boolean>undefinedEnables / Disables the Normalization effect.src/structures/Filters.ts:503
playerpublicPlayerundefinedThe Player assigned to this Filter Managersrc/structures/Filters.ts:106

Methods

applyPlayerFilters()

applyPlayerFilters(): Promise<void>

Apply Player filters for lavalink filter sending data, if the filter is enabled / not

Returns

Promise<void>

Defined in

src/structures/Filters.ts:116


checkFiltersState()

checkFiltersState(oldFilterTimescale?: Partial<TimescaleFilter>): boolean

Checks if the filters are correctly stated (active / not-active)

Parameters

ParameterTypeDescription
oldFilterTimescale?Partial<TimescaleFilter>

Returns

boolean

Defined in

src/structures/Filters.ts:175


clearEQ()

clearEQ(): Promise<FilterManager>

Clears the equalizer bands.

Returns

Promise<FilterManager>

Defined in

src/structures/Filters.ts:689


isCustomFilterActive()

isCustomFilterActive(): boolean

Function to find out if currently there is a custom timescamle etc. filter applied

Returns

boolean

Defined in

src/structures/Filters.ts:655


resetFilters()

resetFilters(): Promise<PlayerFilters>

Reset all Filters

Returns

Promise<PlayerFilters>

Defined in

src/structures/Filters.ts:203


setAudioOutput()

setAudioOutput(type: AudioOutputs): Promise<AudioOutputs>

Set the AudioOutput Filter

Parameters

ParameterTypeDescription
typeAudioOutputs

Returns

Promise<AudioOutputs>

Defined in

src/structures/Filters.ts:303


setEQ()

setEQ(bands: EQBand | EQBand[]): Promise<FilterManager>

Sets the players equalizer band on-top of the existing ones.

Parameters

ParameterTypeDescription
bandsEQBand | EQBand[]

Returns

Promise<FilterManager>

Defined in

src/structures/Filters.ts:663


setPitch()

setPitch(pitch: number): Promise<boolean>

Set custom filter.timescale#pitch . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal

Parameters

ParameterTypeDefault value
pitchnumber1

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:340


setRate()

setRate(rate: number): Promise<boolean>

Set custom filter.timescale#rate . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal

Parameters

ParameterTypeDefault value
ratenumber1

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:365


setSpeed()

setSpeed(speed: number): Promise<boolean>

Set custom filter.timescale#speed . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal

Parameters

ParameterTypeDefault valueDescription
speednumber1

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:316


setVolume()

setVolume(volume: number): Promise<boolean>

Set the Filter Volume

Parameters

ParameterTypeDescription
volumenumber

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:288


toggleKaraoke()

toggleKaraoke(
level: number,
monoLevel: number,
filterBand: number,
filterWidth: number): Promise<boolean>

Enable / Disables a Karaoke like Filter Effect

Parameters

ParameterTypeDefault valueDescription
levelnumber1
monoLevelnumber1
filterBandnumber220
filterWidthnumber100

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:641


toggleLowPass()

toggleLowPass(smoothing: number): Promise<boolean>

Enables / Disables the LowPass effect, (Optional: provide your Own Data)

Parameters

ParameterTypeDefault valueDescription
smoothingnumber20

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:434


toggleNightcore()

toggleNightcore(
speed: number,
pitch: number,
rate: number): Promise<boolean>

Enables / Disables a Nightcore-like filter Effect. Disables/Overrides both: custom and Vaporwave Filter

Parameters

ParameterTypeDefault valueDescription
speednumber1.289999523162842
pitchnumber1.289999523162842
ratenumber0.9365999523162842

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:602


toggleRotation()

toggleRotation(rotationHz: number): Promise<boolean>

Enables / Disables the rotation effect, (Optional: provide your Own Data)

Parameters

ParameterTypeDefault valueDescription
rotationHznumber0.2

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:388


toggleTremolo()

toggleTremolo(frequency: number, depth: number): Promise<boolean>

Enables / Disables the Tremolo effect, (Optional: provide your Own Data)

Parameters

ParameterTypeDefault valueDescription
frequencynumber4
depthnumber0.8

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:420


toggleVaporwave()

toggleVaporwave(
speed: number,
pitch: number,
rate: number): Promise<boolean>

Enables / Disables a Vaporwave-like filter Effect. Disables/Overrides both: custom and nightcore Filter

Parameters

ParameterTypeDefault valueDescription
speednumber0.8500000238418579
pitchnumber0.800000011920929
ratenumber1

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:621


toggleVibrato()

toggleVibrato(frequency: number, depth: number): Promise<boolean>

Enables / Disables the Vibrato effect, (Optional: provide your Own Data)

Parameters

ParameterTypeDefault valueDescription
frequencynumber10
depthnumber1

Returns

Promise<boolean>

Defined in

src/structures/Filters.ts:405