code cleanup
This commit is contained in:
parent
663f3f0491
commit
8d50cb9c28
|
|
@ -1,8 +1,12 @@
|
||||||
import collections
|
import collections
|
||||||
from .exceptions import FilterInvalidArgument
|
from .exceptions import FilterInvalidArgument
|
||||||
|
|
||||||
|
|
||||||
class Filter:
|
class Filter:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.payload = None
|
self.payload = None
|
||||||
|
|
||||||
|
|
||||||
class Equalizer:
|
class Equalizer:
|
||||||
"""
|
"""
|
||||||
Filter which represents a 15 band equalizer.
|
Filter which represents a 15 band equalizer.
|
||||||
|
|
@ -28,6 +32,8 @@ class Equalizer:
|
||||||
return _dict
|
return _dict
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return f"<Pomice.EqualizerFilter eq={self.eq} raw={self.raw}>"
|
return f"<Pomice.EqualizerFilter eq={self.eq} raw={self.raw}>"
|
||||||
|
|
||||||
|
|
||||||
class Timescale(Filter):
|
class Timescale(Filter):
|
||||||
"""Filter which changes the speed and pitch of a track.
|
"""Filter which changes the speed and pitch of a track.
|
||||||
Do be warned that this filter is bugged as of the lastest Lavalink dev version
|
Do be warned that this filter is bugged as of the lastest Lavalink dev version
|
||||||
|
|
@ -51,6 +57,8 @@ class Timescale(Filter):
|
||||||
"rate": self.rate}}
|
"rate": self.rate}}
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f"<Pomice.TimescaleFilter speed={self.speed} pitch={self.pitch} rate={self.rate}>"
|
return f"<Pomice.TimescaleFilter speed={self.speed} pitch={self.pitch} rate={self.rate}>"
|
||||||
|
|
||||||
|
|
||||||
class Karaoke(Filter):
|
class Karaoke(Filter):
|
||||||
"""Filter which filters the vocal track from any song and leaves the instrumental.
|
"""Filter which filters the vocal track from any song and leaves the instrumental.
|
||||||
Best for karaoke as the filter implies.
|
Best for karaoke as the filter implies.
|
||||||
|
|
@ -77,6 +85,8 @@ class Karaoke(Filter):
|
||||||
f"<Pomice.KaraokeFilter level={self.level} mono_level={self.mono_level} "
|
f"<Pomice.KaraokeFilter level={self.level} mono_level={self.mono_level} "
|
||||||
f"filter_band={self.filter_band} filter_width={self.filter_width}>"
|
f"filter_band={self.filter_band} filter_width={self.filter_width}>"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class Tremolo(Filter):
|
class Tremolo(Filter):
|
||||||
"""Filter which produces a wavering tone in the music,
|
"""Filter which produces a wavering tone in the music,
|
||||||
causing it to sound like the music is changing in volume rapidly.
|
causing it to sound like the music is changing in volume rapidly.
|
||||||
|
|
@ -95,6 +105,8 @@ class Tremolo(Filter):
|
||||||
"depth": self.depth}}
|
"depth": self.depth}}
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f"<Pomice.TremoloFilter frequency={self.frequency} depth={self.depth}>"
|
return f"<Pomice.TremoloFilter frequency={self.frequency} depth={self.depth}>"
|
||||||
|
|
||||||
|
|
||||||
class Vibrato(Filter):
|
class Vibrato(Filter):
|
||||||
"""Filter which produces a wavering tone in the music, similar to the Tremolo filter,
|
"""Filter which produces a wavering tone in the music, similar to the Tremolo filter,
|
||||||
but changes in pitch rather than volume.
|
but changes in pitch rather than volume.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue