Table of Contents

Class FilterChain

Namespace
Nyra.Entities
Assembly
Nyra.dll

Audio filter chain of a player.

public sealed record FilterChain : IEquatable<FilterChain>
Inheritance
FilterChain
Implements
Inherited Members

Remarks

A sent chain replaces the whole chain server-side, known filters left null are cleared, PluginFilters is only sent when set.

Properties

ChannelMix

Mixes both channels with a configurable factor.

[JsonPropertyName("channelMix")]
public ChannelMixFilter? ChannelMix { get; init; }

Property Value

ChannelMixFilter

Chorus

Layers slightly delayed copies for a thickening effect.

[JsonPropertyName("chorus")]
public ChorusFilter? Chorus { get; init; }

Property Value

ChorusFilter

Remarks

NodeLink only.

Compressor

Squashes the dynamic range of the audio.

[JsonPropertyName("compressor")]
public CompressorFilter? Compressor { get; init; }

Property Value

CompressorFilter

Remarks

NodeLink only.

Distortion

The distortion filter of the chain, null when the server did not apply one.

[JsonPropertyName("distortion")]
public DistortionFilter? Distortion { get; init; }

Property Value

DistortionFilter

Echo

Repeats the audio after a delay.

[JsonPropertyName("echo")]
public EchoFilter? Echo { get; init; }

Property Value

EchoFilter

Remarks

NodeLink only.

Equalizer

Equalizer bands, band ids range from 0 to 14.

[JsonPropertyName("equalizer")]
public IReadOnlyList<EqualizerBand>? Equalizer { get; init; }

Property Value

IReadOnlyList<EqualizerBand>

EqualizerTransition

Animates equalizer changes instead of stepping them.

[JsonIgnore]
public FilterTransition? EqualizerTransition { get; init; }

Property Value

FilterTransition

Remarks

NodeLink only. It travels inside the bands object as "transition", Lavalink parses the bare band array and knows no transition. The chain's converter reads and writes it, so serializing the chain with other options does not emit it as a member of its own.

Flanger

Sweeps a comb delay for a jet-plane effect.

[JsonPropertyName("flanger")]
public FlangerFilter? Flanger { get; init; }

Property Value

FlangerFilter

Remarks

NodeLink only.

HighPass

Suppresses lower frequencies.

[JsonPropertyName("highpass")]
public HighPassFilter? HighPass { get; init; }

Property Value

HighPassFilter

Remarks

NodeLink only.

Karaoke

Eliminates part of a band, usually vocals.

[JsonPropertyName("karaoke")]
public KaraokeFilter? Karaoke { get; init; }

Property Value

KaraokeFilter

LowPass

Suppresses higher frequencies.

[JsonPropertyName("lowPass")]
public LowPassFilter? LowPass { get; init; }

Property Value

LowPassFilter

Phaser

Sweeps a notch through the spectrum for a whooshing effect.

[JsonPropertyName("phaser")]
public PhaserFilter? Phaser { get; init; }

Property Value

PhaserFilter

Remarks

NodeLink only.

Phonograph

Degrades the audio like a record player.

[JsonPropertyName("phonograph")]
public PhonographFilter? Phonograph { get; init; }

Property Value

PhonographFilter

Remarks

NodeLink only.

PluginFilters

Plugin-provided filters, keyed by plugin name.

[JsonPropertyName("pluginFilters")]
public IReadOnlyDictionary<string, JsonElement>? PluginFilters { get; init; }

Property Value

IReadOnlyDictionary<string, JsonElement>

Remarks

Lavalink applies them through its plugin system, NodeLink has none and echoes the block back as sent, without applying it.

Reverb

Simulates a room's reflections.

[JsonPropertyName("reverb")]
public ReverbFilter? Reverb { get; init; }

Property Value

ReverbFilter

Remarks

NodeLink only.

Rotation

Rotates the audio around the stereo channels.

[JsonPropertyName("rotation")]
public RotationFilter? Rotation { get; init; }

Property Value

RotationFilter

Spatial

Places the audio at a point in space around the listener.

[JsonPropertyName("spatial")]
public SpatialFilter? Spatial { get; init; }

Property Value

SpatialFilter

Remarks

NodeLink only, it ignores the three position members, they round-trip through the API.

Tesseract

Rotates the audio through four dimensions.

[JsonPropertyName("tesseract")]
public TesseractFilter? Tesseract { get; init; }

Property Value

TesseractFilter

Remarks

NodeLink only.

Timescale

Changes speed, pitch and rate.

[JsonPropertyName("timescale")]
public TimescaleFilter? Timescale { get; init; }

Property Value

TimescaleFilter

Tremolo

Quickly oscillates the volume.

[JsonPropertyName("tremolo")]
public TremoloFilter? Tremolo { get; init; }

Property Value

TremoloFilter

Vibrato

Quickly oscillates the pitch.

[JsonPropertyName("vibrato")]
public VibratoFilter? Vibrato { get; init; }

Property Value

VibratoFilter

Volume

Volume filter, 0.0-5.0, where 1.0 disables it.

[JsonPropertyName("volume")]
public float? Volume { get; init; }

Property Value

float?

Remarks

Lavalink only, NodeLink accepts the member but never applies it. Independent of the player volume (0-1000), values above 1.0 may clip.

Methods

Equals(FilterChain?)

Indicates whether both chains configure the same filters and plugins.

public bool Equals(FilterChain? other)

Parameters

other FilterChain

The chain to compare with.

Returns

bool

Whether every member matches, the collections compared by content.

GetHashCode()

Returns a hash of the chain's comparable members, the collections stay out.

public override int GetHashCode()

Returns

int

The hash code.