pyFDN.eq package#
Submodules#
pyFDN.eq.biquads module#
Biquad coefficient primitives used by the EQ designs.
The functions in this module describe filter sections, not why a filter is being designed. Their gains are linear amplitudes and their frequencies are in radians.
- pyFDN.eq.biquads.first_order_shelf_biquad(gain_dc, gain_nyquist, omega_c)[source]#
Return a normalized one-section SOS from two linear amplitudes.
- Return type:
- pyFDN.eq.biquads.highshelf_biquad(omega_c, gain)[source]#
Return
(b, a)for a second-order high-shelf section.
- pyFDN.eq.biquads.lowshelf_biquad(omega_c, gain)[source]#
Return
(b, a)for a second-order low-shelf section.
pyFDN.eq.design module#
Map decay targets or gain targets to EQ coefficients.
The public functions are grouped by the quantity a caller knows first:
reverberation time for an attenuation filter, or gain in dB for an output EQ.
The lower-level filter-section formulas live in pyFDN.eq.biquads, while
the graphic-EQ implementation lives in pyFDN.eq.graphic_eq.
- pyFDN.eq.design.decay_to_first_order_shelf(rt, rt_nyquist, rt_crossover, delays, fs, *, return_design=False)[source]#
Design first-order attenuation shelves from endpoint RTs in seconds.
- Return type:
- pyFDN.eq.design.decay_to_geq(rt, delays, fs, *, return_design=False)[source]#
Design attenuation GEQs from ten reverberation times in seconds.
- Return type:
- pyFDN.eq.design.decay_to_one_pole(rt, rt_nyquist, delays, fs, *, return_design=False)[source]#
Design one-pole attenuation filters from endpoint RTs in seconds.
- Return type:
pyFDN.eq.graphic_eq module#
Ten-band graphic equalizer design.
This module owns the graphic-EQ band layout, least-squares control problem,
and biquad assembly. Public function names use the established geq
abbreviation; graphic_eq is used when naming the design itself.
- pyFDN.eq.graphic_eq.gain_to_bounded_geq(gain_db, fs, *, max_command_gain_db=20.0)[source]#
Design a graphic EQ with bounded internal section gains.
This is the constrained, NumPy-only counterpart of
gain_to_geq(). The flat-gain section remains unbounded; each of the ten frequency-shaped sections is limited tomax_command_gain_dbin either direction.gain_dbhas shape(10,)or(10, n_channels)and is ordered as DC, 63 Hz through 8 kHz, and Nyquist.- Return type:
pyFDN.eq.probe_sos module#
Frequency response probing of a cascade of biquad sections.
Translation of probeSOS.m from fdnToolbox.
- pyFDN.eq.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).
Module contents#
Filter sections and target-to-EQ design functions.