0.2.3 • Published 8 months ago

@discord-player/equalizer v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@discord-player/equalizer

This library implements Lavaplayer's 15 Band PCM Equalizer & biquad utilities.

Installation

$ npm install --save @discord-player/equalizer

Example

Equalizer

import { EqualizerStream } from '@discord-player/equalizer';

// initialize 15 band equalizer stream
const equalizer = new EqualizerStream();

// set equalizer bands, in this case add some bass
equalizer.setEQ([
    { band: 0, gain: 0.25 },
    { band: 1, gain: 0.25 },
    { band: 2, gain: 0.25 }
]);

// input stream
const input = getPCMAudioSomehow();

// pipe input stream to equalizer
const output = input.pipe(equalizer);

// now do something with the output stream

Biquad

import { BiquadStream, FilterType } from '@discord-player/equalizer';

// initialize biquad stream
const biquad = new BiquadStream();

// initialize with filter
const biquad = new BiquadStream({
    filter: FilterType.LowPass
});

// set filter
biquad.setFilter(FilterType.HighPass);

// set gain (Gain is only applicable to LowShelf, HighShelf and PeakingEQ)
biquad.setGain(5);

// input stream
const input = getPCMAudioSomehow();

// pipe input stream to biquad
const output = input.pipe(biquad);

Supported Biquad Filters

  • SinglePoleLowPassApprox
  • SinglePoleLowPass
  • LowPass
  • HighPass
  • BandPass
  • Notch
  • AllPass
  • LowShelf
  • HighShelf
  • PeakingEQ
0.2.3

8 months ago

0.2.2

11 months ago

0.2.2-dev

11 months ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.4-dev.1

1 year ago

0.1.4-dev

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago