lavalink_rs.model.player API documentation

# lavalink_rs.model.player

class Player:

Information about the player of a guild.

track

The currently playing track.

voice

The voice connection information of the player.

guild_id
volume

The current volume of the player.

paused

Whether the player is paused or not.

state

The state of the player.

filters

The filters currently in use by the player

class State:
ping

The latency of the node to the Discord voice gateway in milliseconds.

None if not connected.

position

The current position of the track in milliseconds.

connected

Whether Lavalink is connected to the discord voice gateway.

time

Unix timestamp in milliseconds.

class ConnectionInfo:

Discord voice websocket connection information.

def fix(self, /):

The type of the None singleton.

token

The Discord voice token to authenticate with.

Provided by `Voice Server Update`.

session_id

The Discord voice session id to authenticate with.

Not to be confused by the Lavalink `session_id`.

Provided by `Voice State Update`.

endpoint

The Discord voice endpoint to connect to.

Provided by `Voice Server Update`.

class Filters:
vibrato
karaoke
low_pass
distortion
channel_mix
plugin_filters
equalizer
volume
timescale
rotation
tremolo
class ChannelMix:

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 of each other. Setting all factors to 0.5 means both channels get the same audio. All values are (0.0 <= x <= 1.0)

right_to_left
left_to_left
left_to_right
right_to_right
class Distortion:

Distortion effect.

It can generate some pretty unique audio effects.

tan_scale
scale
sin_offset
cos_offset
cos_scale
offset
tan_offset
sin_scale
class Equalizer:

A fixed band equalizer.

band

The band (0 to 14)

gain

The gain (-0.25 to 1.0)

-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.

class Karaoke:

Uses equalization to eliminate part of a band, usually targeting vocals.

level

The level (0 to 1.0 where 0.0 is no effect and 1.0 is full effect)

filter_band

The filter band (in Hz)

filter_width

The filter width.

mono_level

The mono level (0 to 1.0 where 0.0 is no effect and 1.0 is full effect)

class LowPass:

Higher frequencies get suppressed, while lower frequencies pass through this filter.

smoothing

The smoothing factor (1.0 < x)

Any smoothing values equal to or less than 1.0 will disable the filter.

class Rotation:

Rotates the sound around the stereo channels/user headphones (aka Audio Panning).

It can produce an effect similar to this without the reverb.

rotation_hz

The frequency of the audio rotating around the listener in Hz.

0.2 is similar to the example video above

class Timescale:

Changes the speed, pitch, and rate.

All default to 1.0.

speed

The playback speed (0.0 <= x)

rate

The rate (0.0 <= x)

pitch

The pitch (0.0 <= x)

class TremoloVibrato:

Tremolo uses amplification to create a shuddering effect, where the volume quickly oscillates.

Demo

Vibrato is similar to tremolo, but rather than oscillating the volume, it oscillates the pitch.

depth

For both tremolo and vibrato (0.0 < x <= 1.0)

frequency

For tremolo (0.0 < x) For vibrato (0.0 < x <= 14.0)