Skip to content

Filters#

Filters #

Filters(
    *,
    volume: float | None = None,
    equalizer: typing.Sequence[filters_.Equalizer] = [],
    karaoke: filters_.Karaoke | None = None,
    timescale: filters_.Timescale | None = None,
    tremolo: filters_.Tremolo | None = None,
    vibrato: filters_.Vibrato | None = None,
    rotation: filters_.Rotation | None = None,
    distortion: filters_.Distortion | None = None,
    channel_mix: filters_.ChannelMix | None = None,
    low_pass: filters_.LowPass | None = None,
    plugin_filters: typing.Mapping[str, typing.Any] = {}
)

Bases: filters_.Filters

Filters.

An empty filter object.

PARAMETER DESCRIPTION
volume

Volume of the player.

TYPE: float | None DEFAULT: None

equalizer

A sequence of equalizer objects.

TYPE: typing.Sequence[filters_.Equalizer] DEFAULT: []

karaoke

A karaoke object.

TYPE: filters_.Karaoke | None DEFAULT: None

timescale

A timescale object.

TYPE: filters_.Timescale | None DEFAULT: None

tremolo

A tremolo object.

TYPE: filters_.Tremolo | None DEFAULT: None

vibrato

A vibrato object.

TYPE: filters_.Vibrato | None DEFAULT: None

rotation

A rotation object.

TYPE: filters_.Rotation | None DEFAULT: None

distortion

A distortion object.

TYPE: filters_.Distortion | None DEFAULT: None

channel_mix

A channel mix object.

TYPE: filters_.ChannelMix | None DEFAULT: None

low_pass

A low pass object.

TYPE: filters_.LowPass | None DEFAULT: None

plugin_filters

A dict of plugin filters.

TYPE: typing.Mapping[str, typing.Any] DEFAULT: {}

volume property #

volume: float | None

Volume.

The volume of the player.

equalizer property #

Equalizer.

15 bands with different gains.

karaoke property #

karaoke: Karaoke | None

Karaoke.

Eliminates part of a band, usually targeting vocals.

timescale property #

timescale: Timescale | None

Timescale.

The speed, pitch, and rate.

tremolo property #

tremolo: Tremolo | None

Tremolo.

Creates a shuddering effect, where the volume quickly oscillates.

vibrato property #

vibrato: Vibrato | None

Vibrato.

Creates a shuddering effect, where the pitch quickly oscillates.

rotation property #

rotation: Rotation | None

Rotation.

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

distortion property #

distortion: Distortion | None

Distortion.

Distorts the audio.

channel_mix property #

channel_mix: ChannelMix | None

Channel Mix.

Mixes both channels (left and right).

low_pass property #

low_pass: LowPass | None

Low Pass.

Filters higher frequencies.

plugin_filters property #

plugin_filters: typing.Mapping[str, typing.Any]

Plugin Filters.

Filter plugin configurations.

from_filter classmethod #

from_filter(filters: filters_.Filters) -> Filters

From Filter.

Convert a immutable filter, into a mutable filter.

Note

The purpose of this is so that you can modify a players filter object, without directly modifying it.

PARAMETER DESCRIPTION
filters

The filter to pull data from.

TYPE: filters_.Filters

set_volume #

set_volume(volume: float) -> Filters

Set Volume.

Set the volume of the filter.

PARAMETER DESCRIPTION
volume

The volume of the player. (Must be greater than 0.)

TYPE: float

add_equalizer #

add_equalizer(
    band: filters_.BandType, gain: float
) -> Filters

Add Equalizer.

Add a new equalizer band, with appropriate gain.

PARAMETER DESCRIPTION
band

The BandType.

TYPE: filters_.BandType

gain

The gain of the band. (-0.25 to 1.0)

TYPE: float

remove_equalizer #

remove_equalizer(band: filters_.BandType) -> Filters

Remove Equalizer.

Remove a equalizer via its band.

PARAMETER DESCRIPTION
band

The BandType.

TYPE: filters_.BandType

clear_equalizer #

clear_equalizer() -> Filters

Clear Equalizer.

Clear all equalizer bands from the filter.

set_karaoke #

set_karaoke(
    *,
    level: hikari.UndefinedNoneOr[float] = hikari.UNDEFINED,
    mono_level: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    filter_band: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    filter_width: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED
) -> Filters

Set Karaoke.

Set karaoke values.

PARAMETER DESCRIPTION
level

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

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

mono_level

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

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

filter_band

The filter band (in Hz).

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

filter_width

The filter width.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

clear_karaoke #

clear_karaoke() -> Filters

Clear Karaoke.

Clear all karaoke values from the filter.

set_timescale #

set_timescale(
    *,
    speed: hikari.UndefinedNoneOr[float] = hikari.UNDEFINED,
    pitch: hikari.UndefinedNoneOr[float] = hikari.UNDEFINED,
    rate: hikari.UndefinedNoneOr[float] = hikari.UNDEFINED
) -> Filters

Set Timescale.

Set timescale values.

PARAMETER DESCRIPTION
speed

The playback speed 0.0 ≤ x.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

pitch

The pitch 0.0 ≤ x.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

rate

The rate 0.0 ≤ x.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

clear_timescale #

clear_timescale() -> Filters

Clear Timescale.

Clear all timescale values from the filter.

set_tremolo #

set_tremolo(
    *,
    frequency: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    depth: hikari.UndefinedNoneOr[float] = hikari.UNDEFINED
) -> Filters

Set Tremolo.

Set tremolo values.

PARAMETER DESCRIPTION
frequency

The frequency 0.0 < x.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

depth

The tremolo depth 0.0 < x ≤ 1.0.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

clear_tremolo #

clear_tremolo() -> Filters

Clear Tremolo.

Clear all tremolo values from the filter.

set_vibrato #

set_vibrato(
    *,
    frequency: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    depth: hikari.UndefinedNoneOr[float] = hikari.UNDEFINED
) -> Filters

Set Vibrato.

Set vibrato values.

PARAMETER DESCRIPTION
frequency

The frequency 0.0 < x ≤ 14.0.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

depth

The vibrato depth 0.0 < x ≤ 1.0.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

clear_vibrato #

clear_vibrato() -> Filters

Clear Vibrato.

Clear all vibrato values from the filter.

set_rotation #

set_rotation(
    *,
    rotation_hz: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED
) -> Filters

Set Rotation.

Set rotation values.

PARAMETER DESCRIPTION
rotation_hz

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

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

clear_rotation #

clear_rotation() -> Filters

Clear Rotation.

Clear all rotation values from the filter.

set_distortion #

set_distortion(
    *,
    sin_offset: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    sin_scale: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    cos_offset: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    cos_scale: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    tan_offset: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    tan_scale: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    offset: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    scale: hikari.UndefinedNoneOr[float] = hikari.UNDEFINED
) -> Filters

Set Distortion.

Set distortion values.

PARAMETER DESCRIPTION
sin_offset

The sin offset.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

sin_scale

The sin scale.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

cos_offset

The cos offset.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

cos_scale

The cos scale.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

tan_offset

The tan offset.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

tan_scale

The tan scale.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

offset

The offset.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

scale

The scale.

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

clear_distortion #

clear_distortion() -> Filters

Clear Distortion.

Clear all distortion values from the filter.

set_channel_mix #

set_channel_mix(
    *,
    left_to_left: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    left_to_right: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    right_to_left: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED,
    right_to_right: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED
) -> Filters

Set Channel Mix.

Set tremolo values.

PARAMETER DESCRIPTION
left_to_left

The left to left channel mix factor (0.0 ≤ x ≤ 1.0).

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

left_to_right

The left to right channel mix factor (0.0 ≤ x ≤ 1.0).

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

right_to_left

The right to left channel mix factor (0.0 ≤ x ≤ 1.0).

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

right_to_right

The right to right channel mix factor (0.0 ≤ x ≤ 1.0).

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

clear_channel_mix #

clear_channel_mix() -> Filters

Clear Channel Mix.

Clear all channel mix values from the filter.

set_low_pass #

set_low_pass(
    *,
    smoothing: hikari.UndefinedNoneOr[
        float
    ] = hikari.UNDEFINED
) -> Filters

Set Low Pass.

Set low pass values.

PARAMETER DESCRIPTION
smoothing

The smoothing factor (1.0 < x).

TYPE: hikari.UndefinedNoneOr[float] DEFAULT: hikari.UNDEFINED

clear_low_pass #

clear_low_pass() -> Filters

Clear Low Pass.

Clear all low pass values from the filter.

set_plugin_filters #

set_plugin_filters(
    plugin_filters: typing.Mapping[str, typing.Any] = {}
) -> Filters

Set Plugin Filters.

Set the filters for plugins.

PARAMETER DESCRIPTION
plugin_filters

The plugin filters you wish to set.

TYPE: typing.Mapping[str, typing.Any] DEFAULT: {}