The present invention provides an apparatus, method and tangible medium
storing instructions for determining tonality of an input audio signal,
for selection of corresponding masked thresholds for use in perceptual
audio coding. In the various embodiments, the input audio signal is
sampled and transformed using a compressed spectral operation to form a
compressed spectral representation, such as a cepstral representation. A
peak magnitude and an average magnitude of the compressed spectral
representation are determined. Depending upon the ratio of
peak-to-average magnitudes, a masked threshold is selected having a
corresponding degree of tonality, and is used to determine a plurality of
quantization levels and a plurality of bit allocations to perceptually
encode the input audio signal with a distortion spectrum beneath a level
of just noticeable distortion (JND). The invention also includes other
methods and variations for selecting substantially tone-like or
substantially noise-like masked thresholds for perceptual encoding of the
input audio signal.