pyFDN.graphicEQ package#
Submodules#
pyFDN.graphicEQ.absorption_geq module#
Absorption filter design via graphic EQ for FDN delay lines.
Translation of absorptionGEQ.m from fdnToolbox.
- Reference:
Schlecht and Habets, “Accurate reverberation time control in feedback delay networks,” Proc. DAFx, 2017.
- pyFDN.graphicEQ.absorption_geq.absorption_geq(rt, delays, fs)[source]#
Design per-delay GEQ absorption filters matching target reverberation times.
Each delay line gets its own cascade of biquad sections whose combined attenuation per round trip matches the desired RT at each frequency band.
- Parameters:
- Return type:
- Returns:
Per-channel SOS bank of shape
(num_bands, 6, num_delays)(the canonical SOS bank layout) wherenum_bands = 11(flat + low-shelf + 8 bandpass + high-shelf). All sections are normalised soa[0] = 1.
pyFDN.graphicEQ.bandpass_filter module#
Peaking bandpass filter design for graphic EQ.
Translation of bandpassFilter.m from fdnToolbox. Equation (29) in Välimäki and Reiss, “All About Audio Equalization: Solutions and Frontiers,” Applied Sciences, vol. 6, no. 5, p. 129, 2016.
pyFDN.graphicEQ.design_geq module#
10-band graphic EQ design via constrained least squares.
Translation of designGEQ.m from fdnToolbox.
- Reference:
Välimäki and Reiss, “All About Audio Equalization: Solutions and Frontiers,” Applied Sciences, vol. 6, no. 5, p. 129, 2016.
- pyFDN.graphicEQ.design_geq.design_geq(target_g, fs=48000.0)[source]#
Design a 10-band graphic EQ matching a target magnitude response.
The EQ has 8 peaking bandpass bands plus low and high shelving filters, plus a flat-gain section (11 sections total).
- Parameters:
- Return type:
- Returns:
(sos, target_f)wheresos— single SOS cascade of shape(n_sections, 6)(n_sections = 11).target_f— 10-point frequency grid used for the target.
pyFDN.graphicEQ.graphic_eq module#
Proportional parametric graphic equalizer.
Translation of graphicEQ.m from fdnToolbox.
References
Välimäki and Reiss, “All About Audio Equalization: Solutions and Frontiers,” Applied Sciences, vol. 6, no. 5, p. 129, 2016.
Jot, “Proportional Parametric Equalizers - Application to Digital Reverberation and Environmental Audio Processing,” AES Conv. 2015.
- pyFDN.graphicEQ.graphic_eq.graphic_eq(center_omega, shelving_omega, R, gain_db)[source]#
Build a graphic EQ as a bank of independent biquad sections.
Band layout (total
len(center_omega) + len(shelving_omega) + 1sections):Band 0: flat gain section.
Band 1: low shelving filter.
Bands 2 … N-2: peaking bandpass filters.
Band N-1: high shelving filter.
- Parameters:
center_omega (
ndarray) – Center frequencies of bandpass bands in radians, shape(num_center,).shelving_omega (
ndarray) – Cut-off frequencies of shelving bands in radians, shape(2,)—[low_crossover, high_crossover].R (
float) – Bandwidth parameter; quality factor issqrt(R) / (R - 1).gain_db (
ndarray) – Command gains in dB for each section, shape(num_center + 3,)(flat + low shelf + bandpass + high shelf).
- Return type:
- Returns:
SOS matrix of shape
(num_bands, 6)with columns[b0, b1, b2, a0, a1, a2].
pyFDN.graphicEQ.probe_sos module#
Frequency response probing of a cascade of biquad sections.
Translation of probeSOS.m from fdnToolbox.
- pyFDN.graphicEQ.probe_sos.probe_sos(sos, control_frequencies=None, fft_len=4096, fs=48000.0)[source]#
Evaluate the magnitude response of each biquad at control frequencies.
- Parameters:
sos (
ndarray) – Filter matrix of shape(num_bands, 6)with columns[b0, b1, b2, a0, a1, a2](rows are independent sections).control_frequencies (
ndarray|None) – Frequencies in Hz at which to evaluate.fft_len (
int) – FFT length for the frequency response computation.fs (
float) – Sampling frequency in Hz.
- Return type:
- Returns:
(G, H, W)whereG— magnitude in dB, shape(len(control_frequencies), num_bands).H— complex frequency response, shape(fft_len, num_bands).W— frequency axis in Hz, shape(fft_len, num_bands).
pyFDN.graphicEQ.shelving_filter module#
Shelving filter design for graphic EQ.
Translation of shelvingFilter.m from fdnToolbox. Equations (18) and (20) in Välimäki and Reiss, “All About Audio Equalization: Solutions and Frontiers,” Applied Sciences, vol. 6, no. 5, p. 129, 2016.
Module contents#
Graphic equalizer design for FDN absorption filters.
- pyFDN.graphicEQ.absorption_geq(rt, delays, fs)[source]#
Design per-delay GEQ absorption filters matching target reverberation times.
Each delay line gets its own cascade of biquad sections whose combined attenuation per round trip matches the desired RT at each frequency band.
- Parameters:
- Return type:
- Returns:
Per-channel SOS bank of shape
(num_bands, 6, num_delays)(the canonical SOS bank layout) wherenum_bands = 11(flat + low-shelf + 8 bandpass + high-shelf). All sections are normalised soa[0] = 1.
- pyFDN.graphicEQ.design_geq(target_g, fs=48000.0)[source]#
Design a 10-band graphic EQ matching a target magnitude response.
The EQ has 8 peaking bandpass bands plus low and high shelving filters, plus a flat-gain section (11 sections total).
- Parameters:
- Return type:
- Returns:
(sos, target_f)wheresos— single SOS cascade of shape(n_sections, 6)(n_sections = 11).target_f— 10-point frequency grid used for the target.
- pyFDN.graphicEQ.graphic_eq(center_omega, shelving_omega, R, gain_db)[source]#
Build a graphic EQ as a bank of independent biquad sections.
Band layout (total
len(center_omega) + len(shelving_omega) + 1sections):Band 0: flat gain section.
Band 1: low shelving filter.
Bands 2 … N-2: peaking bandpass filters.
Band N-1: high shelving filter.
- Parameters:
center_omega (
ndarray) – Center frequencies of bandpass bands in radians, shape(num_center,).shelving_omega (
ndarray) – Cut-off frequencies of shelving bands in radians, shape(2,)—[low_crossover, high_crossover].R (
float) – Bandwidth parameter; quality factor issqrt(R) / (R - 1).gain_db (
ndarray) – Command gains in dB for each section, shape(num_center + 3,)(flat + low shelf + bandpass + high shelf).
- Return type:
- Returns:
SOS matrix of shape
(num_bands, 6)with columns[b0, b1, b2, a0, a1, a2].
- pyFDN.graphicEQ.probe_sos(sos, control_frequencies=None, fft_len=4096, fs=48000.0)[source]#
Evaluate the magnitude response of each biquad at control frequencies.
- Parameters:
sos (
ndarray) – Filter matrix of shape(num_bands, 6)with columns[b0, b1, b2, a0, a1, a2](rows are independent sections).control_frequencies (
ndarray|None) – Frequencies in Hz at which to evaluate.fft_len (
int) – FFT length for the frequency response computation.fs (
float) – Sampling frequency in Hz.
- Return type:
- Returns:
(G, H, W)whereG— magnitude in dB, shape(len(control_frequencies), num_bands).H— complex frequency response, shape(fft_len, num_bands).W— frequency axis in Hz, shape(fft_len, num_bands).