NAME

Peta::Synth::EQ - the master equalizer

VERSION

version 0.2610180

SYNOPSIS

my $eq = Peta::Synth::EQ->new(rate => 48000);
$eq->set(low => { gain => 3 }, high => { gain => -2, freq => 6000 });
my ($l, $r) = $eq->process(\@left, \@right);

DESCRIPTION

Four bands of biquads: a low shelf, two peaking bands and a high shelf, each with a frequency, a gain of -12 to 12 dB and (peaking bands) a Q. Bands at 0 dB cost nothing.

METHODS

new

new(rate => 48000, bands => { ... }): all bands at 0 dB, then bands as for set.

set

set(low => { gain => 3 }, mid2 => { freq => 3000, q => 2 }): the bands' frequency, gain or Q, each held within its range. Returns the equalizer.

params

{ low => { freq, gain, q }, ... }: the bands as they are set.

clear

Forgets the sound so far: the filters start from silence again.

active

Whether any band is not at 0 dB.

quiet

Whether the filters have rung out (what they hold is below -200 dB).

response

The response in dB at a frequency.

process

process(\@left, \@right): the sound through the bands; fresh arrays.

FUNCTIONS

names, range

The bands' names; the range of freq, gain or q.

AUTHOR

PetaMem s.r.o. <info@petamem.com>

COPYRIGHT

Copyright (c) 2026 PetaMem s.r.o.

LICENSE

This package is free software, dual-licensed under the Artistic License 2.0 and the BSD 2-Clause License. See the LICENSE file of the distribution.