Acoustic weighting functions (pydsm.audio_weightings)

Some standard acoustic weighting functions.

This module includes the A-, B- and C-weightings from the ANSI Standards S1.4-1983 and S1.42-2001.

It also includes the D-weighting from the now withdrawn IEC 537.

It also includes the F-weighting proposed by R. A. Wannamaker.

The weighting functions can be expressed either in terms of acoustic power or in terms of signal amplitude.

The weighting functions are also available in terms of a filter-based implementation. In this case, be careful since no normalization is present so that the gain at 1 kHz can be arbitrary. The filter transfer function is referred to a signal amplitude weighting.

Weighting functions

a_weighting(f[, normal, power]) Returns the A-weighting as a function of frequency.
b_weighting(f[, normal, power]) Returns the B-weighting as a function of frequency.
c_weighting(f[, normal, power]) Returns the C-weighting as a function of frequency.
d_weighting(f[, normal, power]) Returns the D-weighting as a function of frequency.
f_weighting(f[, normal, power]) Returns the F-weighting as a function of frequency.

Filter implementation of weighting functions

pydsm.audio_weightings.a_zpk

A-weighting filter in zpk form.

pydsm.audio_weightings.b_zpk

B-weighting filter in zpk form.

pydsm.audio_weightings.c_zpk

C-weighting filter in zpk form.

pydsm.audio_weightings.d_zpk

D-weighting filter in zpk form.

pydsm.audio_weightings.f_zpk

F-weighting filter in zpk form.

Normalization constants

pydsm.audio_weightings.a_weighting_gain

Normalization gain to apply to A-weighting filter (namely, the attenuation of the filter at 1 kHz)

pydsm.audio_weightings.b_weighting_gain

Normalization gain to apply to B-weighting filter (namely, the attenuation of the filter at 1 kHz)

pydsm.audio_weightings.c_weighting_gain

Normalization gain to apply to C-weighting filter (namely, the attenuation of the filter at 1 kHz)

pydsm.audio_weightings.d_weighting_gain

Normalization gain to apply to D-weighting filter (namely, the attenuation of the filter at 1 kHz)

pydsm.audio_weightings.f_weighting_gain

Normalization gain to apply to F-weighting filter (namely, the attenuation of the filter at 1 kHz)

Notes

The ANSI and IEC weightings are also described in Wikipedia [1] and summarized in some illustrative web pages such as [R14] and [R15]. The F-weighting is documented in [R16].

The filter-based implementation of the F-weighting is so high-order that evaluation of the transfer function may require special care.

[R13]Wikipedia (http://en.wikipedia.org/wiki/A-weighting)
[R14]Cross spectrum (http://www.cross-spectrum.com/audio/weighting.html)
[R15]Product Technology Parters “Noise Measurement Briefing” (http://www.ptpart.co.uk/noise-measurement-briefing/)
[R16]Robert A. Wannamaker “Psychoacoustically Optimal Noise Shaping,” J. Audio Eng. Soc., Vol. 40 No. 7/8 1992 July/August