Filters
Constructorโ
- Filters : options
new Magmastream.Filters(player: Player)
| Parameter | Type | Description |
|---|---|---|
player | Player | The guild player. |
Table of contentsโ
Propertiesโ
distortionโ
Get the distortion filter options
Returns:
distortionOptions{}| null
equalizerโ
Get the equalizer filter options
Returns:
Band[]
karaokeโ
Get the karaoke filter options
Returns:
karaokeOptions{}| null
playerโ
The guild player
Returns:
Player
rotationโ
Get the rotation filter options
Returns:
rotationOptions{}| null
timescaleโ
Get the timescale filter options
Returns:
timescaleOptions{}| null
vibratoโ
Get the vibrato filter options
Returns:
vibratoOptions{}| null
volumeโ
Get the volume the player
Returns: number
Methodsโ
bassBoost()โ
Apply the bass boost audio effect.
This filter sets the equalizer bands to the values defined in thebassBoostEqualizerarray.Returns: this
clearFilters()โ
Removes the audio effects and resets the filter status.
This method is useful for removing all audio effects and resetting the filter status to its default state.
It is also a convenient way to disable all audio effects without having to manually reset each filter individually.
distort()โ
Applies the distortion audio effect to the player.
This filter applies a distortion effect to the audio by applying a sine, cosine, and tangent
transformation to the audio signal.Returns: this
eightD()โ
Applies the eight dimension audio effect.
This filter applies a rotationHz of 0.2 to the player.Returns: this
getFilterStatus()โ
Returns the status of the specified filter.
Returns: boolean
Parameter Type Description filteravailableFilters''The filter to get the status of.
nightcore()โ
Applies the nightcore audio effect.
This filter sets the timescale of the player to 1.1 speed, 1.125 pitch, and 1.05 rate.Returns: this
setDistortion()โ
Applies the distortion audio effect to the player.
This method takes an optionaldistortionOptionsobject as a parameter, which can be used to customize the distortion effect. If no options are provided, the filter will be reset and the distortion effect will be disabled.Returns: this
Parameter Type Description distortiondistortionOptions{}The distortion options to apply.
setEqualizer()โ
Sets the equalizer bands and updates the filters on the player.
This method updates the player's equalizer settings by applying the provided bands configuration. The equalizer is an array of Band objects, each containing a band number and a gain value. The method ensures that the filters are updated after setting the equalizer, to reflect the changes in audio output.Returns: this
Parameter Type Description bandsBand[]The equalizer bands to apply. Each band includes a band number and a gain value. If no bands are provided, the equalizer is reset.
setKaraoke()โ
Applies the karaoke options specified by the filter.
This method takes an optionalkaraokeOptionsobject as a parameter, which can be used to customize the karaoke effect. If no options are provided, the filter will be reset and the karaoke effect will be disabled.Returns: this
Parameter Type Description karaokekaraokeOptions{}The karaoke options to apply.
setRotation()โ
Applies the karaoke options specified by the filter.
This method takes an optionalkaraokeOptionsobject as a parameter, which can be used to customize the karaoke effect. If no options are provided, the filter will be reset and the karaoke effect will be disabled.Returns: this
Parameter Type Description rotationrotationOptions{}The rotation options to apply.
setTimescale()โ
Applies the timescale options specified by the filter.
This method sets the timescale of the audio player using the provided timescale options. Timescale options may include speed, pitch, and rate adjustments to modify the playback characteristics of the audio.Returns: this
Parameter Type Description timescaletimescaleOptions{}The timescale options to apply.
setVibrato()โ
Applies the vibrato options specified by the filter.
This method takes an optionalvibratoOptionsobject as a parameter, which can be used to customize the vibrato effect. If no options are provided, the filter will be reset and the vibrato effect will be disabled.Returns: this
Parameter Type Description timescaletimescaleOptions{}The timescale options to apply.
slowmo()โ
Applies the slow motion audio effect.
This filter sets the timescale of the player to 0.7 speed, 1.0 pitch, and 0.8 rate.Returns: this
soft()โ
Applies the soft audio effect to the player.
This method sets the equalizer bands to the values defined in thesoftEqualizerarray, which is designed to create a softer sound effect by reducing the gain of certain frequency bands.Returns: this
trebleBass()โ
Applies the treble bass audio effect.
This filter applies a treble boost and a bass boost to the audio.Returns: this
tv()โ
Applies the television audio effect.
This filter applies a equalizer effect designed to make the audio sound like it is coming from a television.Returns: this
vaporwave()โ
Applies the vaporwave audio effect.
This filter applies a timescale effect with a pitch of 0.55 and an equalizer effect designed to create a vaporwave sound effect.Returns: this