Skip to main content

Module dsp

Module dsp 

Source
Expand description

Constants for DSP, audio, and RF noise/link-budget calculations.

Constants§

A4_HZ
Concert pitch A4, Hz
BLACKMAN_A0
Blackman window a₀ (classic)
BLACKMAN_A0_EXACT
Blackman window a₀ (exact): 7938/18608
BLACKMAN_A1
Blackman window a₁ (classic)
BLACKMAN_A2
Blackman window a₂ (classic)
BLACKMAN_A1_EXACT
Blackman window a₁ (exact): 9240/18608
BLACKMAN_A2_EXACT
Blackman window a₂ (exact): 1430/18608
BLACKMAN_HARRIS_A
4-term Blackman–Harris window coefficients (−92 dB sidelobes)
CENT_RATIO
Equal-temperament cent frequency ratio: 2^(1/1200)
CG_BLACKMAN
Coherent gain — Blackman
CG_HAMMING
Coherent gain — Hamming
CG_HANN
Coherent gain — Hann
CG_RECT
Coherent gain (mean of window) — rectangular
DBM_REF_WATTS
Watts in 0 dBm
DB_PER_AMPLITUDE_DOUBLING
dB change per doubling of amplitude: 20·log₁₀(2)
DB_PER_NEPER
dB per neper (amplitude): 20·log₁₀(e)
DB_PER_POWER_DOUBLING
dB change per doubling of power: 10·log₁₀(2)
ENBW_BLACKMAN
Noise-equivalent bandwidth in bins — Blackman
ENBW_BLACKMAN_HARRIS
Noise-equivalent bandwidth in bins — 4-term Blackman–Harris
ENBW_HAMMING
Noise-equivalent bandwidth in bins — Hamming
ENBW_HANN
Noise-equivalent bandwidth in bins — Hann
ENBW_RECT
Noise-equivalent bandwidth in bins — rectangular
FLATTOP_A
5-term flat-top window coefficients (SciPy / MATLAB convention)
FS_8K
FS_11K025
FS_16K
FS_22K05
FS_32K
FS_44K1
CD audio sample rate
FS_48K
Professional audio / DVD sample rate
FS_88K2
FS_96K
FS_176K4
FS_192K
HALF_POWER_AMPLITUDE
Half-power amplitude (−3 dB point of a magnitude response): 1/√2
HALF_POWER_DB
Half-power point in dB: 10·log₁₀(½)
HAMMING_A0
Hamming window a₀ (classic)
HAMMING_A0_EXACT
Hamming window a₀ (exact, zeroes the first side-lobe): 25/46
HAMMING_A1
Hamming window a₁ (classic)
HAMMING_A1_EXACT
Hamming window a₁ (exact): 21/46
HANN_A0
Hann window a₀
HANN_A1
Hann window a₁
HEARING_MAX_HZ
Upper limit of nominal human hearing, Hz
HEARING_MIN_HZ
Lower limit of nominal human hearing, Hz
I_REF_AIR
Reference sound intensity (0 dB SPL), W/m²
KAISER_BETA_60DB
Kaiser window β giving ≈ 60 dB stop-band attenuation (≈ 5.65)
KAISER_BETA_80DB
Kaiser window β giving ≈ 80 dB stop-band attenuation (≈ 7.86)
KAISER_BETA_AUDIO
Kaiser window β commonly used for audio resampling
KT0
Thermal noise power density at T₀: k·T₀, W/Hz (≈ −174 dBm/Hz)
KT0_DBM_PER_HZ
Thermal noise floor at T₀ in dBm/Hz: 10·log₁₀(k·T₀ / 1 mW) (≈ −173.98)
KT300_DBM_PER_HZ
Thermal noise floor at 300 K in dBm/Hz: 10·log₁₀(k·300 K / 1 mW) (≈ −173.83)
MIDI_A4
MIDI note number for A4
NEPER_PER_DB
nepers per dB (amplitude): ln(10)/20
NUTTALL_A
4-term Nuttall window coefficients (continuous first derivative)
P_REF_AIR
Reference sound pressure in air (0 dB SPL), Pa
P_REF_WATER
Reference sound pressure in water, Pa
Q7_SCALE
Q7 fixed-point scale (2⁷)
Q15_SCALE
Q15 fixed-point scale (2¹⁵)
Q31_SCALE
Q31 fixed-point scale (2³¹)
Q_BESSEL
2nd-order Bessel Q: 1/√3
Q_BUTTERWORTH
Butterworth Q of a 2nd-order section (maximally flat): 1/√2
Q_CRITICAL
Critical-damping Q: 1/2
Q_LINKWITZ_RILEY
Linkwitz–Riley 2nd-order Q (= 0.5)
SEMITONE_RATIO
Equal-temperament semitone frequency ratio: 2^(1/12)
SQNR_DB_PER_BIT
Ideal quantizer SNR slope: 20·log₁₀(2) dB per bit
SQNR_OFFSET_DB
Ideal sine-wave SQNR offset: 10·log₁₀(1.5) dB (SQNR = 6.02·N + 1.76)
T0_NOISE
IEEE standard reference noise temperature T₀, K
W_REF_AIR
Reference sound power, W