audioeffects.parametriceq

ParametricEQ - the Pultec EQP-1A’s two low networks and its resonant top, with three API 550A proportional-Q bells in the middle.

The player’s text is the class docstring; the CLAIMS table in the class’s test file ties its claim sentences to tests.

audioeffects.parametriceq.FLAT_DB = 0.2

mix = 0 makes the kernel write to_s16(x0), which is the input sample unchanged (audiodsp/src/shared/audiodsp_filter_f32.c:239). Two reasons for the number. A quarter of a decibel is inaudible and a section still costs a pass. And a knob passes through the codes either side of a BIPOLAR macro’s centre detent: 65 puts a +/-16 dB bell at 0.127 dB. (The detent itself is exact since audiocomponents#87; before it, 64 was 0.126 dB and a “flat” patch was not a wire at all.)

Type:

A section whose gain is under this is built as a wire

audioeffects.parametriceq.SKIRT_DB = 1.0

The proportional-Q law of the dossier’s appendix A. Holding a bell’s response at a fixed absolute level L (the skirt) across boost settings means holding the dimensionless detuning u constant, which gives

Q(G) = sqrt( (A^2 - L^2/A^2) / (u0^2 (L^2 - 1)) ), A = 10^(G/40)

with u0 fixed by one anchor. The skirt is 1 dB and the anchor is Q(12 dB) = 2 - dossier section 8, question 2, settled by measurement: at a 0.1 dB skirt the +1 dB crossing moves 18.0 % across +2/+6/+12 dB and T4’s own 5 % bar is missed, at 0.5 dB it moves 11.6 %, and at 1 dB it does not move at all (0.000 %) while the mid-gain bandwidth still falls 3.38x, against T4’s floor of 3x.

audioeffects.parametriceq.CONSTANT_Q = 1.4142135623730951

Constant Q, the other half of macro 14. One octave, by the octave-to-Q closed form the dossier’s appendix A checks against Bohn (S3 section 4.1): Q = sqrt(2^N)/(2^N - 1), which is 1.4142 at N = 1.

audioeffects.parametriceq.MIN_Q = 0.05

audiobiquad’s own clamp (AUDIODSP_FILTER_F32_MIN_Q/MAX_Q), mirrored because the module does not export it.

audioeffects.parametriceq.SHELF_Q = 0.707

Both low sections are 0.707 shelves; what separates them is the corner. The cut sits a fixed ratio above the boost, which is the mechanism T1 rests on - S9’s drawing shows it as two capacitor banks (C12-C17 for cut, C18-C23 for boost) on one ganged selector. 5.0 is the seed’s own working point, measured in the dossier’s appendix G(i).

audioeffects.parametriceq.OUTPUT_CORNER_HZ = 5.0

The make-up amplifier. No node on the palette gives gain above unity - MixerVoice.level clamps to 0..1 silently and audiomath.Multiply can only attenuate - so the output trim is a high shelf at a subsonic corner. Measured on this node: +12.00 dB from 100 Hz to 10 kHz at 48, 44.1 and 22.05 kHz, and +11.89 dB at 20 Hz.

audioeffects.parametriceq.ATTEN_STEPS = (5000.0, 10000.0, 20000.0)

three positions. S8’s drawing carries exactly these three and no others.

Type:

The EQP-1A’s HF attenuator selector, from the panel

audioeffects.parametriceq.LOW_BOOST_MAX_DB = 16.0

Full-scale spans behind the panel dials.

audioeffects.parametriceq.BW_Q_BROAD = 0.5

Broad and sharp, the two ends of the Bandwidth pot.

audioeffects.parametriceq.proportional_q(gain_db)[source]

The bell Q the proportional law gives for gain_db.

Reads the magnitude of the gain, never its sign. A law that read the signed gain would give a cut a different width from the matching boost and break T5’s reciprocal at the skirts while the peak still looked right - the dossier names that as T5’s way of failing.

class audioeffects.parametriceq.ParametricEQ(source, *options, **keywords)[source]

Bases: Component

A Pultec at the ends and an API in the middle: the EQP-1A’s two low networks and its resonant top, with three proportional-Q bells between.

Controls. Low Freq is the corner for both low networks. Low Boost and Low Atten work at once: turn both up and you get the record trick, a lift at the bottom with a scoop just above it. Each bell has a Freq and a Gain; turn one up and its skirt stays where it is while the curve narrows, and its cut is the exact mirror of its boost. High Boost is a resonant bell at High Freq, and Bandwidth sets how sharp it is. High Atten is a separate shelf at Atten Freq. Q Law switches the bells from proportional to constant Q. Output is a gain after everything. The Effect controls page lists what the knobs span.

Response. With every gain at 0 the class is a wire. A boost is delivered whole only while the signal has room for it; a cut always is.

Timing. Latency is zero at every setting. Silence in settles to exact silence out.

Levels. Keep the input under -12 dBFS and the defaults and patches stay off the rails. A boost or Output at its top can still push the output onto the rails.

On a board. The class needs audiodsp’s audiobiquad, and on a board without it construction raises ImportError.

NAME = 'ParametricEQ'

The stable provider name audioeffects.create() discovers.

TIER = 'audiodsp'

STOCK or AUDIODSP, with REQUIRES naming the audiodsp-own modules an AUDIODSP class needs.

Type:

roadmap §3

CAPABILITIES = ()

The contract’s static reads. CAPABILITIES names "tempo_sync" if and only if the class reads self._transport().

TAIL_SAMPLES = 37696

the longest burst-to-exact-zero this class reaches anywhere in its own span - a 20 Hz bell at +16 dB, whose Q the proportional law puts at 2.58 - at 48 kHz, 785 ms. Lower rates are shorter in frames (32832 at 44.1 kHz, 18240 at 22.05 kHz), so this is a ceiling at every rate. Patch 0 is a wire and its tail is zero.

Type:

Measured, not assumed

INPUT_CEILING_DBFS = -12

The defaults and every patch play the ceiling kit’s materials clean at this level; at -9 dBFS, patch 3 rails on a DC step.

CLIPS_AT_TOP = (1, 4, 6, 8, 11, 15)

the rail check skips them.

Type:

Settings that clip by design

MACRO_LABELS = ('Low Freq', 'Low Boost', 'Low Atten', 'Bell 1 Freq', 'Bell 1 Gain', 'Bell 2 Freq', 'Bell 2 Gain', 'Bell 3 Freq', 'Bell 3 Gain', 'Bandwidth', 'High Freq', 'High Boost', 'Atten Freq', 'High Atten', 'Q Law', 'Output')

Knob names, one per macro index; one mode per label; the private engineering spans behind them; and the patches on the 0-127 grid.

reset()[source]

Clear every section and restore patch 0, from the settings a fresh instance’s sections hold: built, then the constructor’s values, then patch 0. A section patch 0 leaves flat is only taken out (mix 0), so it kept the outgoing patch’s corner, Q and gain, and a later move that brought it in moved from those instead of from a fresh section’s.