/go-equalizer

The go-equalizer provides digital filters based on the RBJ audio EQ cookbook.

Primary LanguageGoMIT LicenseMIT

go-equalizer

go-equalizer provides equalizers based on the Robert Bristow-Johnson's audio EQ cookbook.

This package supports the following digital filters:

  • Low-pass
  • High-pass
  • All-pass
  • Band-pass
  • Band-reject
  • Low-shelf
  • High-shelf
  • Peaking

Install

$ go get -u github.com/moutend/go-equalizer

Example

See the example directory.

Usage

package main

import "github.com/moutend/go-equalizer/pkg/equalizer"

func main() {
	// Audio signal
	input := []float64{ /* ... */ }
	output := make([]float64, len(input))

	// Create the band-pass filter.
	bpf := equalizer.NewBandPass(44100, 440, 0.5)

	for i := range input {
		output[i] = bpf.Apply(input)
	}
}

NOTE: go-equalizer does not provide the way to read the audio file as a float64 slice.

LICENSE

MIT

Author

Yoshiyuki Koyanagi moutend@gmail.com