Table of Contents

Struct EqualizerBand

Namespace
Nyra.Entities
Assembly
Nyra.dll

A single equalizer band adjustment.

public readonly record struct EqualizerBand : IEquatable<EqualizerBand>
Implements
Inherited Members

Remarks

Band ids are map keys, a chain carrying the same id twice sends both entries, the server collapses them, the last one wins.

Constructors

EqualizerBand(int, float)

Creates a band adjustment.

[JsonConstructor]
public EqualizerBand(int bandId, float gain)

Parameters

bandId int

The id of the band to adjust.

gain float

The gain to apply, from -0.25 to 1.0, 0.0 leaves the band unchanged.

Exceptions

ArgumentOutOfRangeException

bandId is not between 0 and BandCount - 1, or gain is not a finite number between -0.25 and 1.0.

Fields

BandCount

Number of equalizer bands, ids run 0 to BandCount - 1.

public const int BandCount = 15

Field Value

int

Properties

BandId

The band to adjust, 0 to BandCount - 1.

[JsonPropertyName("band")]
public int BandId { get; }

Property Value

int

Gain

The band gain, -0.25 to +1.0, 0.0 is unchanged.

[JsonPropertyName("gain")]
public float Gain { get; }

Property Value

float

Remarks

Lavalink, -0.25 mutes and +0.25 doubles the band, NodeLink applies gain as a linear offset around unity instead.