Class : Filters
Constructor
- Filters : options
new Magmastream.Filters(player: Player)
Parameter | Type | Description | Optional |
---|---|---|---|
player | Player | The guild player. |
Table of contents
Properties
distortion
Get the distortion filter options
Return:
distortionOptions{}
| null
equalizer
Get the equalizer filter options
Return:
Band[]
karaoke
Get the karaoke filter options
Return:
karaokeOptions{}
| null
player
The guild player
Return:
Player
rotation
Get the rotation filter options
Return:
rotationOptions{}
| null
timescale
Get the timescale filter options
Return:
timescaleOptions{}
| null
vibrato
Get the vibrato filter options
Return:
vibratoOptions{}
| null
reverb
Get the reverb filter options
Return:
reverbOptions{}
| null
volume
Get the volume the player
Return: number
bassBoostLevel
Get the bassBoostLevel filter level
Return: number
filtersStatus
Get the filters status
Return: number
Methods
bassBoost(stage)
async functionSets the bass boost level on the audio.
This method scales the gain of a predefined equalizer curve to the specified level. The curve is designed to emphasize or reduce low frequencies, creating a bass-heavy or bass-reduced effect.
Parameter Type Description Optional stage
number The level of bass boost to apply. The value ranges from -3 to 3, where negative values reduce bass, 0 disables the effect, and positive values increase bass.
china(status)
async functionToggles the "China" effect on the audio.
This method applies or removes a filter that reduces the pitch of the audio by half, changing the speed or rate. This creates a "hollow" or "echoey" sound.
Parameter Type Description Optional status
boolean Whether to enable or disable the china effect.
chipmunk(status)
async functionToggles the chipmunk effect on the audio.
This method applies or removes a chipmunk effect by adjusting the timescale settings. When enabled, it increases the speed, pitch, and rate of the audio, resulting in a high-pitched, fast playback similar to the sound of a chipmunk.
Parameter Type Description Optional status
boolean Whether to enable or disable the chipmunk effect.
clearFilters()
async functionClears all filters applied to the audio.
This method resets all filter settings to their default values and removes any active filters from the player.
darthvader(status)
async functionToggless a darthvader effect on the audio.
This method applies darthvader effect to audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the darthvader effect.
daycore(status)
async functionToggles a daycore effect on the audio.
This method applies a daycore effect to audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the daycore effect.
demon(status)
async functionToggles the demon effect on the audio.
This method applies or removes a demon effect by adjusting the equalizer, timescale, and reverb settings. When enabled, it creates a deeper and more intense sound by lowering the pitch and adding reverb to the audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the daycore effect.
distort(status)
async functionToggles the distortion effect on the audio.
This method applies or removes a distortion effect by adjusting the distortion settings. When enabled, it adds a rougher, more intense quality to the sound by altering the audio signal to create a more jagged, irregular waveform.
Parameter Type Description Optional status
boolean Whether to enable or disable the distort effect.
doubletime(status)
async functionToggles a doubletime effect on the audio.
This method applies a doubletime effect to audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the doubletime effect.
earrape(status)
async functionToggles earrape effect on the audio.
This method applies earrape effect to audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the earrape effect.
eightD(status)
async functionApplies the "8D audio" effect by setting a rotation filter.
This method applies or removes an 8D audio effect by adjusting the rotation settings. When enabled, it creates a sensation of the audio moving around the listener's head, providing an immersive audio experience.
Parameter Type Description Optional status
boolean Whether to enable or disable the eightD effect.
electronic(status)
async functionToggles electronic effect on the audio.
This method applies electronic effect to audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the eightD effect.
getFilterStatus(filter)
Retrieves the status of a specific filter.
This method returns whether a specific filter is currently applied or not.Return: boolean
Parameter Type Description Optional filter
AvailableFilters The filter to check.
nightcore(status)
async functionToggles the nightcore effect on the audio.
This method applies or removes a nightcore effect by adjusting the timescale settings. When enabled, it increases the speed and pitch of the audio, giving it a more upbeat and energetic feel.
Parameter Type Description Optional status
boolean Whether to enable or disable the nightcore effect.
party(status)
async functionToggles a party effect on the audio.
This method applies a party effect to audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the party effect.
pop(status)
async functionToggles the party effect on the audio.
This method applies or removes a party effect by adjusting the equalizer settings. When enabled, it enhances the bass and treble frequencies, providing a more energetic and lively sound.
Parameter Type Description Optional status
boolean Whether to enable or disable the pop effect.
radio(status)
async functionToggles radio effect on the audio.
This method applies radio effect to audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the radio effect.
setDistortion(distortion)
async functionSets the distortion effect on the audio.
This method applies a distortion effect to the audio, which adds a rougher, more intense quality to the sound. The effect is created by altering the audio signal to create a more jagged, irregular waveform.
Parameter Type Description Optional distortion
distortionOptions{}
The distortion options to apply. If nothing are provided, the distortion is reset.
setEqualizer(bands)
async functionSets the equalizer on the audio.
This method adjusts the equalization curve of the player's audio output, allowing you to control the frequency response.
Parameter Type Description Optional bands
Band[]
The equalizer bands to apply (band, gain).
setKaraoke(karaoke)
async functionSets the karaoke options to the audio.
This method adjusts the audio so that it sounds like a karaoke song, with the original vocals removed. Note that not all songs can be successfully made into karaoke tracks, and some tracks may not sound as good.
Parameter Type Description Optional karaoke
karaokeOptions{}
The karaoke settings to apply (level, mono level, filter band, etc.). If nothing are provided, the karaoke is reset.
setRotation(rotation)
async functionSets the rotation effect on the audio.
This method applies a rotation effect to the audio, which simulates the sound moving around the listener's head. This effect can create a dynamic and immersive audio experience by altering the directionality of the sound.
Parameter Type Description Optional rotation
rotationOptions{}
The rotation settings (rotationHz). If nothing are provided, the rotation is reset.
setTimescale(timescale)
async functionSets the timescale of the audio.
This method adjusts the speed and pitch of the audio, allowing you to control the playback speed.
Parameter Type Description Optional timescale
timescaleOptions{}
The timescale settings to apply (speed, pitch, rate). If nothing are provided, the timescale is reset.
setVibrato(timescale)
async functionSets the vibrato effect on the audio.
This method applies a vibrato effect to the audio, which adds a wavering, pulsing quality to the sound. The effect is created by rapidly varying the pitch of the audio.
Parameter Type Description Optional timescale
timescaleOptions{}
The vibrato settings to apply (frequency and depth).
slowmo(status)
async functionToggles the slowmo effect on the audio.
This method applies or removes a slowmo effect by adjusting the timescale settings. When enabled, it slows down the audio while keeping the pitch the same, giving it a more relaxed and calming feel.
Parameter Type Description Optional status
boolean Whether to enable or disable the status effect.
soft(status)
async functionApplies a soft equalizer effect to the audio.
This method applies or removes a soft equalizer effect by adjusting the equalizer settings. When enabled, it reduces the bass and treble frequencies, giving the audio a softer and more mellow sound.
Parameter Type Description Optional status
boolean Whether to enable or disable the soft effect.
tremolo(status)
async functionToggles a tremolo effect on the audio.
This method applies a tremolo effect to audio.
Parameter Type Description Optional status
boolean Whether to enable or disable the termolo effect.
trebleBass(status)
async functionApplies the treble/bass equalizer effect to the audio.
This method applies or removes a treble/bass equalizer effect by adjusting the equalizer settings. When enabled, it enhances the treble and bass frequencies, giving the audio a more balanced sound.
Parameter Type Description Optional status
boolean Whether to enable or disable the treble bass effect.
tv(status)
async functionToggles the TV equalizer effect on the audio.
This method applies or removes a TV equalizer effect by adjusting the equalizer settings. When enabled, it enhances specific frequency bands to mimic the audio characteristics typically found in television audio outputs.
Parameter Type Description Optional status
boolean Whether to enable or disable the tv effect.
updateFilters()
async functionUpdates the player's audio filters.
This method sends a request to the player's node to update the filter settings based on the current properties of theFilters
instance. The filters include distortion, equalizer, karaoke, rotation, timescale, vibrato, and volume. Once the request is sent, it ensures that the player's audio output reflects the changes in filter settings.
vaporwave(status)
async functionApplies the vaporwave effect by adjusting the equalizer and pitch.
This method applies or removes a vaporwave effect by adjusting the equalizer settings. When enabled, it gives the audio a dreamy and nostalgic feel, characteristic of the vaporwave genre.
Parameter Type Description Optional status
boolean Whether to enable or disable the vaporwave effect.