Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.

Commit

Permalink
feat(filters): added channelMix and lowPass (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranet authored May 31, 2021
1 parent a91c74e commit 2ef7f7c
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions src/types/OutgoingPayloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@ export interface OutgoingFilterPayload extends BaseOutgoingPayload {
* {@link https://en.wikipedia.org/wiki/Panning_(audio) Audio Panning}.
*/
rotation?: RotationOptions;

/**
* The channel mix options.
*/
channelMix?: ChannelMixOptions;

/**
* The low pass options.
*/
lowPass?: LowPassOptions;
}

/**
Expand Down Expand Up @@ -323,3 +333,46 @@ export interface RotationOptions {
*/
rotationHz?: number;
}

/**
* 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.
* @note Setting all factors to 0.5 means both channels get the same audio.
* @note This is not available in Lavalink v3.3.
*/
export interface ChannelMixOptions {
/**
* The left-to-left mix, modifies the volume in the left channel.
* @default 1.0
*/
leftToLeft: number;

/**
* The left-to-right mix, modifies how much of the left channel goes to the right one.
* @default 0.0
*/
leftToRight: number;

/**
* The right-to-left mix, modifies how much of the right channel goes to the left one.
* @default 0.0
*/
rightToLeft: number;

/**
* The right-to-right mix, modifies the volume in the right channel.
* @default 1.0
*/
rightToRight: number;
}

/**
* Supresses high frequencies given a frequency.
* @note This is not available in Lavalink v3.3.
*/
export interface LowPassOptions {
/**
* The amount of smoothing done.
*/
smoothing: number;
}

0 comments on commit 2ef7f7c

Please sign in to comment.