apollon.signal.critical_bands module

apollon.signal.critical_bands.filter_bank(frqs)

Return a critical band rate scaled filter bank.

Each filter is triangular, which lower and upper cuttoff frequencies set to lower and upper bound of the given critical band rate.

Parameters:frqs (ndarray) –
Returns:(ndarray) Bark scaled filter bank.
apollon.signal.critical_bands.frq2cbr(frq) → numpy.ndarray

Transform frquencies in Hz to critical band rates in Bark.

Parameters:Frequency in Hz. (frq) –
Returns:Critical band rate.
apollon.signal.critical_bands.level(cbi: numpy.ndarray)

Compute the critical band level L_G from critical band intensities I_G.

Parameters:cbi (ndarray) –
Returns:(nddarray) Critical band levels.
apollon.signal.critical_bands.sharpness(cbr_spctrm: numpy.ndarray) → numpy.ndarray

Calculate a measure for the perception of auditory sharpness from a spectrogram of critical band levels.

Parameters:cbr_spctrm (ndarray) –
Returns:(ndarray) Sharpness for each time instant of the cbr_spctrm
apollon.signal.critical_bands.specific_loudness(cbr: numpy.ndarray)

Compute the specific loudness of a critical band rate spectra.

The specific loudness is the loudness per critical band rate. The spectra should be scaled in critical band levels.

Parameters:cbr (ndarray) –
Returns:(ndarray) Specific loudness.
apollon.signal.critical_bands.total_loudness(cbr: numpy.ndarray)

Compute the totals loudness of critical band rate spectra.

The total loudness is the sum of the specific loudnesses. The spectra should be scaled to critical band levels.

Parameters:cbr_spctr (ndarray) –
Returns:(ndarray) Total loudness.
apollon.signal.critical_bands.weight_factor(z)

Return weighting factor per critical band rate for sharpness calculation.

This is an improved version of Peeters (2004), section 8.1.3.

Parameters:z (ndarray) –
Returns:(ndarray) Wheighting factor.