Objects API Reference
- class lavaplay.objects.Stats(players: int, playingPlayers: int, uptime: int, memory: Memory, cpu: Cpu, frameStats: Optional[FrameStats] = None)[source]
Info websocket for connection
- class lavaplay.objects.Track(track: str, identifier: str, is_seekable: bool, author: str, length: int, is_stream: bool, position: int, title: str, uri: str, requester: Optional[str] = None, source_name: Optional[str] = None, timestamp: Optional[Any] = None)[source]
Info track object.
- timestamp: Optional[Any] = None
optional option to save a requester for the track
- class lavaplay.objects.ConnectionInfo(guild_id: int, session_id: str, channel_id: Optional[int])[source]
A info for Connection just use to save the connection information.
- class lavaplay.objects.PlayList(name: str, selected_track: int, tracks: List[lavaplay.objects.Track])[source]
- class lavaplay.objects.PlayerState(time: int, connected: bool, ping: int, position: Optional[int] = None)[source]
Event on player update.
- class lavaplay.objects.Version(semver: str, major: int, minor: int, patch: int, preRelease: Optional[str] = None, build: Optional[str] = None)[source]
Version info
- class lavaplay.objects.Info(version: Version, buildTime: int, git: Git, jvm: str, lavaplayer: str, sourceManagers: List[str], filters: List[str], plugins: List[Plugin])[source]
- class lavaplay.objects.Filters(volume: Union[int, float] = 1.0)[source]
All the filters are optional, and leaving them out of this message will disable them.
Adding a filter can have adverse effects on performance. These filters force Lavaplayer to decode all audio to PCM, even if the input was already in the Opus format that Discord uses. This means decoding and encoding audio that would normally require very little processing. This is often the case with YouTube videos.
Parameters
- volume:
int
|float
Float value where 1.0 is 100%. Values >1.0 may cause clipping
- equalizer(bands: List[Tuple[int, Union[float, int]]])[source]
There are 15 bands (0-14) that can be changed.
“gain” is the multiplier for the given band. The default value is 0. Valid values range from -0.25 to 1.0, where -0.25 means the given band is completely muted, and 0.25 means it is doubled. Modifying the gain could also change the volume of the output.
- karaoke(level: Union[int, float], mono_level: Union[int, float], filter_band: Union[int, float], filter_width: Union[int, float])[source]
Uses equalization to eliminate part of a band, usually targeting vocals.
- timescale(speed: Union[int, float], pitch: Union[int, float], rate: Union[int, float])[source]
Changes the speed, pitch, and rate. All default to 1.
- tremolo(frequency: Union[int, float], depth: Union[int, float])[source]
Uses amplification to create a shuddering effect, where the volume quickly oscillates. Example: https://en.wikipedia.org/wiki/File:Fuse_Electronics_Tremolo_MK-III_Quick_Demo.ogv
- vibrato(frequency: Union[int, float], depth: Union[int, float])[source]
Similar to tremolo. While tremolo oscillates the volume, vibrato oscillates the pitch.
- rotation(rotation_hz: Union[int, float])[source]
Rotates the sound around the stereo channels/user headphones aka Audio Panning. It can produce an effect similar to: https://youtu.be/QB9EB8mTKcc (without the reverb)
- distortion(sin_offset: Union[int, float], sin_scale: Union[int, float], cos_offset: Union[int, float], cos_scale: Union[int, float], tan_offset: Union[int, float], tan_scale: Union[int, float], offset: Union[int, float], scale: Union[int, float])[source]
Distortion effect. It can generate some pretty unique audio effects.
- channel_mix(left_to_left: Union[int, float], left_to_right: Union[int, float], right_to_left: Union[int, float], right_to_right: Union[int, float])[source]
Mixes both channels (left and right), with a configurable factor on how much each channel affects the other.
With the defaults, both channels are kept independent from each other.
Setting all factors to 0.5 means both channels get the same audio.
- volume: