audioeffects.highpass
HighPass - the low-cut: a two-pole analog high-pass whose transmission
zero at DC is exact, not nearly.
The player’s text is the class docstring; the CLAIMS table in the
class’s test file ties its claim sentences to tests.
- audioeffects.highpass.BUTTERWORTH_LOW = 0.5411961001461969
The fourth-order Butterworth Q pair, which is the same pair for a high-pass as for a low-pass: the LP-to-HP substitution
s <- 1/s(S4 section 2.10) mirrors the response and leaves the pole Qs alone. At 24 dB/oct the first section holds the lower one fixed and the resonance rides the second alone, so|H(f0)|is the product0.5412 * 1.3066 * Q/0.7071 = Q- the same reading of the Resonance knob at both slopes. Scaling both Qs would square it. Measured, both slopes, Q 0.5 to 16: within 0.002 dB of 20*log10(Q) (dossier A15).
- audioeffects.highpass.FLAT_Q = 0.7071067811865476
The Q at which the pair above is exactly Butterworth, and the resonance the panel’s own “flat” position stands for.
- audioeffects.highpass.MIN_Q = 0.05
audiobiquad’s own clamp (AUDIODSP_FILTER_F32_MIN_Q/MAX_Q), mirrored because the module does not export it. Resonance 16 at 24 dB/oct asks for 29.56, which is inside it.
- audioeffects.highpass.TRIM_CORNER_HZ = 5.0
The trim is one high shelf at a subsonic corner, which is a broadband gain everywhere above it: no node on the palette gives gain above unity (
MixerVoice.levelclamps to 0..1,audiomath.Multiplyonly attenuates), and there is no route from Python to a biquad’sbcoefficients, so the shelf is how a high-pass gets its make-up. Measured on this node at 48 000 / 44 100 / 22 050 Hz and -12/-6/+6/+12 dB: flat to 0.0152 dB from 50 Hz to 15 kHz (dossier A15).The corner is 5 Hz and not lower for the same reason it is not higher: it has to sit under the class’s own lowest corner (10 Hz) so that the shelf is flat across everything the filter passes, and a shelf’s skirt is not infinitely steep.
- audioeffects.highpass.FLAT_DB = 0.2
A trim under this is built as a wire rather than a pass of arithmetic that must come back byte-identical. MIDI 64 is the exact centre of a BIPOLAR span since audiocomponents#87, so the detent itself is 0.000 dB; what this floor still covers is the codes either side of it.
- class audioeffects.highpass.HighPass(source, *options, **keywords)[source]
Bases:
ComponentA low-cut: under the corner the signal goes.
Controls. Frequency is the corner. Resonance is how loud the corner itself stands: at 0.707 it is 3 dB down and the cut is as gentle as a cut gets, and turned up it stands above the passband and the filter whistles at its own corner. Slope is 12 or 24 dB an octave. Trim is a flat gain across the band. Mix at 0 is your dry signal. The Effect controls page lists what the knobs span.
Response. DC is removed exactly: a held offset settles to zero, not nearly zero. Below the corner the cut falls 12 or 24 dB an octave, and the top of the band passes at unity. From 40 Hz up at 48 kHz the corner stands as loud as Resonance says at either slope; below that the knob is a direction rather than a number.
Timing. Latency is zero at every setting. Silence in is silence out once the filter rings down, and the class reports a tail that covers its lowest corner and highest Resonance.
Levels. Keep the input under -9 dBFS and the defaults and patches stay off the rails. Trim 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 raisesImportError.- NAME = 'HighPass'
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.
CAPABILITIESnames"tempo_sync"if and only if the class readsself._transport().
- TAIL_SAMPLES = 632832
Measured, not assumed - and re-measured after the Phase 2 gate audit found the first measurement’s excitation too weak to be a ceiling. The tail of a high-pass is its resonant pole ringing down, so the longest one comes from the state that pole is driven to, not from the loudest strike: a full-scale tone at the corner, held until the ring has stopped climbing, then released. At the worst settings the surface reaches - 10 Hz, Resonance 16, 24 dB/oct (which puts Q 29.56 on the second section) and +12 dB of trim - that measures 627 267 samples at 48 kHz, against the 303 727 a 200 ms burst produced. Swept over Frequency x Resonance x Slope x Trim, 54 cells, worst cell at every span’s own stop. Lower rates are shorter in frames (a tail is a time, and 48 kHz has the most frames in it: 625 665 / 561 319 / 287 882 at 48 / 44.1 / 22.05 kHz), so this is a ceiling at every rate. Declared at the next multiple of 2048 above the measurement plus one period of the 10 Hz corner (4 800 samples), which is the allowance for where in the cycle the drive stops.
- INPUT_CEILING_DBFS = -9
The defaults and every patch play the ceiling kit’s materials clean at this level; at -6 dBFS, patch 1 rails on a 100 Hz square.
- CLIPS_AT_TOP = (4,)
the rail check skips them.
- Type:
Settings that clip by design
- MACRO_LABELS = ('Frequency', 'Resonance', 'Slope', 'Mix', 'Trim')
Knob names, one per macro index; one mode per label; the private engineering spans behind them; and the patches on the 0-127 grid.
- PATCHES = {0: ('Flat', (0, 13, 0, 127, 64)), 1: ('Rumble Cut', (18, 13, 127, 127, 64)), 2: ('Stage Low-Cut', (35, 13, 0, 127, 64)), 3: ('Thin It Out', (57, 13, 0, 127, 64)), 4: ('Radio', (71, 40, 127, 127, 48)), 5: ('Whistle', (89, 110, 0, 127, 16))}
Named for settings, never for products, and every value is
macro_of()of the setting in the comment beside it.