pyFDN.first_order_shelving_eq#

pyFDN.first_order_shelving_eq(db_dc, db_nyquist, fs, crossover_frequency=None)[source]#

Design first-order shelving EQ filters from gains in dB at DC and Nyquist.

Unlike first_order_absorption() (whose gains are derived from a reverberation time and a delay length), the shelf endpoints are specified directly as decibel gains. Useful as a per-output tone correction (post EQ).

Parameters:
  • db_dc (array-like) – Gain in dB at DC, scalar or one value per channel.

  • db_nyquist (array-like) – Gain in dB at Nyquist, scalar or one value per channel. Broadcast against db_dc to a common number of channels.

  • fs (float) – Sampling rate in Hz.

  • crossover_frequency (float, optional) – Shelf crossover frequency in Hz. Defaults to fs/8; clamped to fs/5.

Returns:

One-section per-channel SOS bank of shape (1, 6, N) (canonical SOS bank layout); section rows are [b0, b1, b2, a0, a1, a2].

Return type:

np.ndarray