NAME

Peta::Hearing - the Bark scale, the threshold in quiet, masking

VERSION

version 0.2610180

SYNOPSIS

use Peta::Hearing;

my $z     = Peta::Hearing::bark(1000);           # 8.5
my $db    = Peta::Hearing::quiet(4000);          # dB SPL, about -5
my $share = Peta::Hearing::spreading($z1 - $z0); # an energy factor

DESCRIPTION

The pieces of psychoacoustics that Peta::MP3::Encode::Psy and Peta::Vorbis::Encode::Psy both build their models from.

bark

bark($hz): the frequency on the Bark scale.

quiet

quiet($hz): the threshold of hearing in quiet, dB SPL (Terhardt), held below 20 Hz and above 16 kHz.

spreading

spreading($dz): the share of a masker's energy that masks $dz Bark away from it (Schroeder's spreading function).

tone_offset

tone_offset($z): how many dB below a tone at $z Bark noise stays unheard. NOISE_OFFSET is the same for noise masking noise.

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.