audioeffects.bandpass

BandPass - the two-pole resonant band-pass, rebuilt on audiobiquad.

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

class audioeffects.bandpass.BandPass(source, *options, **keywords)[source]

Bases: Component

A resonant band-pass: the band around the centre comes through and the rest falls away.

Controls. Frequency is the centre. Width is how wide the band is, and narrowing it changes what gets through, never how loud the centre is. Slope on puts a second section behind the first, for steeper skirts at the same width. Mix at 0 is your dry signal. The Effect controls page lists what the knobs span.

Response. The centre stands at 0 dB at every width, except a tenth of a decibel low at 31.5 Hz with the band at its narrowest. DC and the top of the band are cut to exact zero.

Timing. Latency is zero at every setting. Silence in settles to exact silence out. A hard jump in Frequency or Width rings out as a click; move the knob in steps and it sweeps.

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

NAME = 'BandPass'

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 = 630328

Q 32 at 20 Hz with two sections at 48 kHz, _component.biquad_ring = 630 328 samples, 13.1 s. A class constant cannot be a ceiling for a resonator whose ring time scales with the sample rate, so tail_samples below reports the build instead; this is the design-rate figure a reader of the class gets, not a bound over every rate.

Type:

The surface’s worst case at the design rate

MACRO_LABELS = ('Frequency', 'Width', 'Slope', 'Mix')

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

property centre_hz

The centre frequency in force, after the rate’s own clamp.

property bandwidth_hz

Width as the -3 dB bandwidth it stands for, f0 / Q. The knob stores Q, because Q is what the node takes and what the dossier’s T2 is stated in; this is the number a panel shows.

property sections

1 or 2 - how many band-pass sections are in the path.

property tail_samples

The ring time of this build, not a class constant.

A band-pass is a resonator, so its tail is set by its poles: the sections’ working Q at the centre in force, one section or the two of the steep slope (_component.biquad_ring). The bound holds from any state the sections can hold, including what the settings before a move left in them. A host told the surface’s worst case at every setting would allocate 13 s for a filter nobody asked for.