Filters
Filters are used to filter the songs based on the user’s choice. The filters are as follows:
.setKaraoke
This filter is used to set the karaoke mode. The karaoke mode is used to remove the vocals from the song.
// set default karaoke mode
player.filters.setKaraoke(true)
// or you can adjust it by passing an object
player.filters.setKaraoke(true, {
level: 1,
monoLevel: 1,
filterBand: 1,
filterWidth: 1
})
// to disable
player.filters.setKaraoke(false)
.setTimescale
This filter is used to change the speed of the song.
// set default timescale
player.filters.setTimescale(true)
// or you can adjust it by passing an object
player.filters.setTimescale(true, {
speed: 1,
pitch: 1,
rate: 1
})
// to disable
player.filters.setTimescale(false)
.setTremolo
This filter is used to add tremolo effect to the song.
// set default tremolo effect
player.filters.setTremolo(true)
// or you can adjust it by passing an object
player.filters.setTremolo(true, {
frequency: 1,
depth: 1
})
// to disable
player.filters.setTremolo(false)
.setVibrato
This filter is used to add vibrato effect to the song.
// set default vibrato effect
player.filters.setVibrato(true)
// or you can adjust it by passing an object
player.filters.setVibrato(true, {
frequency: 1,
depth: 1
})
// to disable
player.filters.setVibrato(false)
.setRotation
This filter is used to add rotation effect to the song.
// set default rotation effect
player.filters.setRotation(true)
// or you can adjust it by passing an object
player.filters.setRotation(true, {
rotationHz: 1
})
// to disable
player.filters.setRotation(false)
.setDistortion
This filter is used to add distortion effect to the song.
// set default distortion effect
player.filters.setDistortion(true)
// or you can adjust it by passing an object
player.filters.setDistortion(true, {
sinOffset: 1,
sinScale: 1,
cosOffset: 1,
cosScale: 1,
tanOffset: 1,
tanScale: 1,
offset: 1,
scale: 1
})
// to disable
player.filters.setDistortion(false)
.setChannelMix
This filter is used to mix the channels of the song.
// set default channel mix
player.filters.setChannelMix(true)
// or you can adjust it by passing an object
player.filters.setChannelMix(true, {
leftToLeft: 1,
leftToRight: 1,
rightToLeft: 1,
rightToRight: 1
})
// to disable
player.filters.setChannelMix(false)
.setLowPass
This filter is used to add low pass effect to the song.
// set default low pass effect
player.filters.setLowPass(true)
// or you can adjust it by passing an object
player.filters.setLowPass(true, {
smoothing: 1
})
// to disable
player.filters.setLowPass(false)
.setBassboost
This filter is used to add bassboost effect to the song.
// set default low pass effect
player.filters.setBassboost(true)
// or you can adjust it by passing an object
player.filters.setBassboost(true, {
value: 1
})
// to disable
player.filters.setBassboost(false)
The value of the bassboost can be between 1 and 5.
.setSlowmode
This filter is used to add slowmode effect to the song.
// set default low pass effect
player.filters.setSlowmode(true);
// or you can adjust it by passing an object
player.filters.setSlowmode(true, {
rate: 0.8
});
// to disable
player.filters.setSlowmode(false);
.setNightcore
This filter is used to add nightcore effect to the song.
// set default low pass effect
player.filters.setNightcore(true);
// or you can adjust it by passing an object
player.filters.setNightcore(true, {
rate: 1.5
});
// to disable
player.filters.setNightcore(false);
.setVaporwave
This filter is used to add vaporwave effect to the song.
// set default low pass effect
player.filters.setVaporwave(true);
// or you can adjust it by passing an object
player.filters.setVaporwave(true, {
pitch: 0.5
});
// to disable
player.filters.setVaporwave(false);
.set8D
This filter is used to add 8D effect to the song.
// set default low pass effect
player.filters.set8D(true);
// or you can adjust it by passing an object
player.filters.set8D(true, {
rotationHz: 0.2
});
// to disable
player.filters.set8D(false);
Clear Filters
Clears all the filters applied to the song.
player.filters.clearFilters();