FilterManager
The FilterManager for each player
Constructors
new FilterManager()
The Constructor for the FilterManager
Parameters
Parameter | Type |
---|---|
player | Player |
Returns
Defined in
Properties
Property | Modifier | Type | Default value | Description | Defined in |
---|---|---|---|---|---|
data | public | FilterData | undefined | The Filter Data sent to Lavalink, only if the filter is enabled (ofc.) | src/structures/Filters.ts:39 |
equalizerBands | public | EQBand [] | [] | The Equalizer bands currently applied to the Lavalink Server | src/structures/Filters.ts:12 |
filters | public | PlayerFilters | undefined | All “Active” / “disabled” Player Filters | src/structures/Filters.ts:16 |
filterUpdatedState | public | boolean | false | Private Util for the instaFix Filters option | src/structures/Filters.ts:14 |
lavalinkFilterPlugin | public | object | undefined | - | src/structures/Filters.ts:549 |
lavalinkFilterPlugin.toggleEcho | public | (delay : number , decay : number ) => Promise <boolean > | undefined | Enables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data) | src/structures/Filters.ts:556 |
lavalinkFilterPlugin.toggleReverb | public | (delays : number [], gains : number []) => Promise <boolean > | undefined | Enables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data) | src/structures/Filters.ts:580 |
lavalinkLavaDspxPlugin | public | object | undefined | - | src/structures/Filters.ts:443 |
lavalinkLavaDspxPlugin.toggleEcho | public | (decay ?: number , echoLength ?: number ) => Promise <boolean > | undefined | Enables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data) | src/structures/Filters.ts:529 |
lavalinkLavaDspxPlugin.toggleHighPass | public | (boostFactor : number , cutoffFrequency : number ) => Promise <boolean > | undefined | Enables / Disables the HighPass effect, (Optional: provide your Own Data) | src/structures/Filters.ts:477 |
lavalinkLavaDspxPlugin.toggleLowPass | public | (boostFactor : number , cutoffFrequency : number ) => Promise <boolean > | undefined | Enables / Disables the LowPass effect, (Optional: provide your Own Data) | src/structures/Filters.ts:451 |
lavalinkLavaDspxPlugin.toggleNormalization | public | (maxAmplitude ?: number , adaptive ?: boolean ) => Promise <boolean > | undefined | Enables / Disables the Normalization effect. | src/structures/Filters.ts:503 |
player | public | Player | undefined | The Player assigned to this Filter Manager | src/structures/Filters.ts:106 |
Methods
applyPlayerFilters()
Apply Player filters for lavalink filter sending data, if the filter is enabled / not
Returns
Promise
<void
>
Defined in
checkFiltersState()
Checks if the filters are correctly stated (active / not-active)
Parameters
Parameter | Type | Description |
---|---|---|
oldFilterTimescale ? | Partial <TimescaleFilter > |
Returns
boolean
Defined in
clearEQ()
Clears the equalizer bands.
Returns
Promise
<FilterManager
>
Defined in
isCustomFilterActive()
Function to find out if currently there is a custom timescamle etc. filter applied
Returns
boolean
Defined in
resetFilters()
Reset all Filters
Returns
Promise
<PlayerFilters
>
Defined in
setAudioOutput()
Set the AudioOutput Filter
Parameters
Parameter | Type | Description |
---|---|---|
type | AudioOutputs |
Returns
Promise
<AudioOutputs
>
Defined in
setEQ()
Sets the players equalizer band on-top of the existing ones.
Parameters
Parameter | Type | Description |
---|---|---|
bands | EQBand | EQBand [] |
Returns
Promise
<FilterManager
>
Defined in
setPitch()
Set custom filter.timescale#pitch . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal
Parameters
Parameter | Type | Default value |
---|---|---|
pitch | number | 1 |
Returns
Promise
<boolean
>
Defined in
setRate()
Set custom filter.timescale#rate . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal
Parameters
Parameter | Type | Default value |
---|---|---|
rate | number | 1 |
Returns
Promise
<boolean
>
Defined in
setSpeed()
Set custom filter.timescale#speed . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
speed | number | 1 |
Returns
Promise
<boolean
>
Defined in
setVolume()
Set the Filter Volume
Parameters
Parameter | Type | Description |
---|---|---|
volume | number |
Returns
Promise
<boolean
>
Defined in
toggleKaraoke()
Enable / Disables a Karaoke like Filter Effect
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
level | number | 1 | |
monoLevel | number | 1 | |
filterBand | number | 220 | |
filterWidth | number | 100 |
Returns
Promise
<boolean
>
Defined in
toggleLowPass()
Enables / Disables the LowPass effect, (Optional: provide your Own Data)
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
smoothing | number | 20 |
Returns
Promise
<boolean
>
Defined in
toggleNightcore()
Enables / Disables a Nightcore-like filter Effect. Disables/Overrides both: custom and Vaporwave Filter
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
speed | number | 1.289999523162842 | |
pitch | number | 1.289999523162842 | |
rate | number | 0.9365999523162842 |
Returns
Promise
<boolean
>
Defined in
toggleRotation()
Enables / Disables the rotation effect, (Optional: provide your Own Data)
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
rotationHz | number | 0.2 |
Returns
Promise
<boolean
>
Defined in
toggleTremolo()
Enables / Disables the Tremolo effect, (Optional: provide your Own Data)
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
frequency | number | 4 | |
depth | number | 0.8 |
Returns
Promise
<boolean
>
Defined in
toggleVaporwave()
Enables / Disables a Vaporwave-like filter Effect. Disables/Overrides both: custom and nightcore Filter
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
speed | number | 0.8500000238418579 | |
pitch | number | 0.800000011920929 | |
rate | number | 1 |
Returns
Promise
<boolean
>
Defined in
toggleVibrato()
Enables / Disables the Vibrato effect, (Optional: provide your Own Data)
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
frequency | number | 10 | |
depth | number | 1 |
Returns
Promise
<boolean
>