Resample design

The stage that carries the entry rate up to the internal rate and back down again. It is where the band limit lives, and the only place you can write one.

The design

Every field may be omitted. Omitting all of them gives the shipped design: a linear phase Kaiser low pass.

FIELDWHAT IT DECIDESRANGEDEFAULT
pass_hzTop of the passband: flat up to here. Absolute [Hz] or a ratio of the entry Nyquist.Hz / of_nyquist20000
phasePhase type. linear is symmetric: its group delay is constant across the band, so it is pure latency. minimum has no bulk delay but is not symmetric. The graph's own fir node sits after the interpolation, so the pre-ringing of the resample kernel can only be avoided here.linear / minimumlinear
shape?Extra shaping below the top edge. Omitted (null) is a plain low pass. The band limit itself cannot be removed — it is pass_hz, and it is always there. Frequencies are absolute, so this too is entry stage only.high_pass / band_stop—
stop_hz?Bottom of the stopband. Omitted (null) derives it from the rate (entry rate minus passband), which is where the first image starts. Moving it down only improves image rejection; moving it above the derived value is refused (resample.stopband_too_high). Entry stage only.Hz / of_nyquist—
stopband_dbStopband attenuation asked of the window [dB]. For Kaiser and Gaussian it also decides the window parameter and, with the transition width, the tap count. It is a request, not a result: the attenuation actually reached is measured, and a design that does not clear the minimum image rejection is refused (resample.image_leak).—120
tapsHow the tap count is decided.auto / fixedauto
windowWindow function. Only kaiser and gaussian take their parameter from stopband_db; the fixed windows have a fixed attenuation, and the weakest of them cannot clear the minimum image rejection at all. kaiser and gaussian trade depth against ringing at the same tap count.kaiser / hann / hamming / blackman / blackman_harris / gaussiankaiser

? = the field may be omitted

Windows

WINDOWATTENUATIONNOTES
kaiserfrom stopband_dbSolves all the way from the requested attenuation to the tap count. Deepest and sharpest at a given tap count. The default
gaussianfrom stopband_dbRoughly twice the taps for the same design. At the same tap count, about 3.5 dB shallower in the stopband but about 7 dB lower far from the centre
blackman_harrisabout -92 dBFixed. The tap count has to be given
blackmanabout -74 dBFixed. Does not meet the image rejection the validation asks for
hammingabout -53 dBFixed. Does not meet it
hannabout -44 dBFixed. Does not meet it

Only kaiser and gaussian take their parameter from stopband_db. The fixed windows have a fixed attenuation, and the weakest of them cannot clear the minimum image rejection at all, so a design using them is refused however many taps you give it.

Phase

LINEARMINIMUM
PhaseNo phase shift anywhere in the bandPhase shifts in the audible band
DelayConstant group delay, which is pure latencyNo bulk delay
ImpulseSymmetric: ringing before and afterNo pre-ringing
Tap countMust be odd, so the group delay is a whole number of samplesUnconstrained

This is the only place the pre-ringing of the conversion kernel can be avoided. A graph node is applied after the interpolation, so choosing minimum phase there does nothing to this stage.

How the top edge is written

FORMWHAT IT MEANSWHEN TO USE IT
Absolute (Hz)The frequency sits at the same place whatever the rate. The ceiling is the Nyquist of the lowest target rate, so including 44.1 kHz caps it at 22,050 HzWhen you want a fixed top edge, for example 20 kHz everywhere
Ratio of the entry Nyquist1.0 is the top of the source: 22,050 Hz at 44.1 kHz, about 44 kHz at 96 kHzWhen you want the edge to follow the material, as one design for every rate

A ratio of 1.0 or below always satisfies the condition, whatever the rate.

METHODWHAT YOU FIXWHAT MOVES
AutomaticThe passband only. The cutoff lands at the Nyquist of each familyEverything else follows the rate. Recommended
By transition widthThe cutoff and the transition widthThe tap count. Both families end up with the same filter shape
By tap countThe computational costThe transition width, which moves by about 8.8% between the families

The saved filter is the same whichever way you write it; these are input methods, not different designs. A tap count applies to the entry stage only: the exit stage solves its own from its own transition width.

Around the design

  • kind marks the file as a resample design, so it cannot be mistaken for a graph.
  • name is the display name. The identifier is the file name, as it is for graphs.
  • targets declares the entry rates you mean to use it at. An empty list means every rate, and then the design is solved for both families at save time.
  • min_partition declares the smallest block length you mean to run it at. It changes no coefficient; it decides which row of the CPU forecast represents the design.
  • spec_version is required, and it rises independently of the graph specification.
  • The design holds no rate and no coefficients.

    It is solved again per stage and per entry rate, which is why one design loads on material of any rate. It is also why a frequency written in Hz means something different from one written as a ratio.

  • A design that does not cover the current rate is not applied.

    The shipped design runs instead and the playback screen says so. Add the rate to targets, or declare every rate.