Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ the old spelling is removed, never aliased (D7), so it fails to compile, and
`scripts/retired_words.txt` lists it. This file starts at 0.8.0; the releases before it
are back-filled with the 1.0 release engineering (`docs/ROADMAP.md`, C3).

## Unreleased

### What breaks, and what to do

1. **DspTap 0.5.0 is the floor** (`TAP_SR_DSPTAP_MINIMUM`, A9): every umbrella header
`static_assert`s it. A consumer that pins DspTap itself moves its pin to `v0.5.0`.

### New in `rational`

- **A chain that holds a chain flushes.** Since DspTap 0.5.0 a `tap::dsp::chain` reports
`window_frames()`, so a caller's chain that holds one of `rational`'s named chains
(`down_by8` beside a guard band filter, say) flushes, as zero padding bit for bit: the
flush writes the frames the same stages written out flat would, and possibly a few more,
all silence. The stages no longer need writing out flat.

## 0.9.0

`rational`'s recursive stages and guard band filter (`docs/IIR_PLAN.md`: IIR-b, IIR-c #114,
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ made this tree (sections 5–6). Do not re-derive what it settles.
chains by 4, 8 and 16 named by intent, `docs/X4_X8_PLAN.md`, the old-to-new names in `CHANGELOG.md`;
0.9.0 with `rational`'s recursive stages and guard band filter, `docs/IIR_PLAN.md`, their C ABI,
notebooks and ratchet workloads).
- **The DspTap floor (A9).** Each umbrella header also defines `TAP_SR_DSPTAP_MINIMUM` (0.4.0)
- **The DspTap floor (A9).** Each umbrella header also defines `TAP_SR_DSPTAP_MINIMUM` (0.5.0)
token-identically and `static_assert`s it against DspTap's `TAP_DSP_VERSION`
(`tap/dsp/version.h`); `family.VersionMacrosAgree` checks the three agree. DspTap is tagged on its
own cadence (Q4): a commit that moves `submodules/dsptap` names the tag it pins, and raising the
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ equal). A commit that moves `submodules/dsptap` names the DspTap tag it pins.
| 0.7.0 | 0.2.0 | v0.2.0 |
| 0.8.0 | 0.2.0 | v0.2.0 |
| 0.9.0 | 0.4.0 | v0.4.0 |
| unreleased (`main` since a chain that holds a chain flushes) | 0.5.0 | v0.5.0 |

## Provenance and license

Expand Down
4 changes: 2 additions & 2 deletions async/include/tap/sr/async/async.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
// README's tested pairs), defined token-identically in each engine's
// umbrella header like the family version (D13) and checked against the
// pinned substrate's tap/dsp/version.h.
#define TAP_SR_DSPTAP_MINIMUM TAP_DSP_VERSION_ENCODE(0, 4, 0)
#define TAP_SR_DSPTAP_MINIMUM TAP_DSP_VERSION_ENCODE(0, 5, 0)
static_assert(TAP_DSP_VERSION >= TAP_SR_DSPTAP_MINIMUM,
"tap::sr::async needs DspTap 0.4.0 or newer (submodules/dsptap)");
"tap::sr::async needs DspTap 0.5.0 or newer (submodules/dsptap)");

#include "tap/sr/async/converter.h"
4 changes: 2 additions & 2 deletions bridge/include/tap/sr/bridge/ratio.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
// README's tested pairs), defined token-identically in each engine's
// umbrella header like the family version (D13) and checked against the
// pinned substrate's tap/dsp/version.h.
#define TAP_SR_DSPTAP_MINIMUM TAP_DSP_VERSION_ENCODE(0, 4, 0)
#define TAP_SR_DSPTAP_MINIMUM TAP_DSP_VERSION_ENCODE(0, 5, 0)
static_assert(TAP_DSP_VERSION >= TAP_SR_DSPTAP_MINIMUM,
"tap::sr::bridge needs DspTap 0.4.0 or newer (submodules/dsptap)");
"tap::sr::bridge needs DspTap 0.5.0 or newer (submodules/dsptap)");

namespace tap::sr::bridge {

Expand Down
3 changes: 2 additions & 1 deletion rational/PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ matrix, layout, test strategy, milestones, non-goals and risks.
| v0.23 | 2026-11-22 | IIR-c's follow-up (`docs/IIR_PLAN.md` v12, questions 20 and 21, decided after IIR-c landed): the guard band's named settings per half-band kind (R26): `half_band_kind` (`fir`, `nonlinear`, `near_linear`) beside `guard_phase`, taken by every named setting with no default, 5 / 7 / 7 / 7 behind the nonlinear half-band and 7 / 7 / 7 / 11 behind the FIR and near-linear ones, six designs per form from DspTap's committed rows (no DspTap change); the floating limit cycle at the new orders inside R28's bound; the Q15 linear form's limit pinned until DspTap's Q15 rows (question 21). No FIR pin, ratchet count or ceiling moved (section 6, the record of IIR-c's follow-up) |
| v0.24 | 2026-11-22 | The DspTap 0.4.0 pin move (`docs/IIR_PLAN.md` v13, question 21's limit lifted): `submodules/dsptap` at `v0.4.0` (tap/DspTap#69) and the family's floor 0.4.0; the guard band filter's linear table built by DspTap's `quantize_symmetric_row_preserving_sum`, and its linear form in Q15 at the four 70 dB named settings on DspTap's Q15 rows, which hold the tier (R26); `transparent`'s Q15 limit kept. Every ratchet binary of the three engines byte-identical across the move; no count or ceiling re-recorded (section 6, the record of the pin move) |
| v0.25 | 2026-11-23 | IIR-d (`docs/IIR_PLAN.md` v14, section 5 item 5, I11 as recommended): the C ABI's recursive and guard band entry points and latency getters (R29), the binding, `notebooks/iir_comparison.ipynb` and `notebooks/guard_band_demo.ipynb` executed through the C ABI with the book's Part VII figure from the same code; the ratchet's twenty-four recursive workloads, the recursive host workloads and three probe sets (baselines at the midpoint of the two builds, the new ceilings recorded, every existing count, checksum and ceiling unchanged: every ratchet binary of the three engines byte-identical to bcef447's); family version 0.9.0 (R11). Section 6, the IIR-d record |
| v0.26 | 2026-11-23 | The DspTap 0.5.0 pin move (tap/DspTap#70): `submodules/dsptap` at `v0.5.0`, the family's DspTap floor 0.5.0. A `tap::dsp::chain` reports `window_frames()`, a bound valid from any state, so a chain that holds one of the named chains flushes as zero padding bit for bit (R27); `tests/test_iir_composition.cpp` flushes `down_by8` beside the guard band filter as the caller writes it, where it wrote the stages out flat |
| v0.19 | 2026-11-21 | X-a4 (`docs/X4_X8_PLAN.md` X4): a chain per attenuation tier — the 70 dB tier's selected at `economy`, the 120 dB tier's at `transparent` (R3, 3.1); 25 rows split (17 within the families, 8 across), seven chains serve only the 120 dB tier, three of them new (`up2_ratio3over2`, `up2_up6_up4`, `down4_down6_down2`, C values 40 to 42, `CHAIN_END` 43, 33 live values); the generated row format holds both chains, the matrix test, the binding, `matrix.ipynb` and the coverage figure read it; the relaxation tables unchanged; the 6th- and 8th-band designs at divisor 2 at `transparent` bit-pinned; the ratchet's `down8_down2_float_tr` workload (the 1/16 chain at `transparent`), every existing count and ceiling unchanged (section 6, the X-a4 record) |
| v0.18 | 2026-11-21 | X-a3 (`docs/X4_X8_PLAN.md` X3): decision 6 amended, the 4th-band stage admitted (`up4` / `down4` in `ratio.h`, the C ABI's `create_stage` at 4/1 and 1/4); X-a2's frozen selection removed and R3's restored, 46 rows moved at `economy` (30 within, 16 across; S1), the named chains twelve added and fourteen gone (ten retired under D7, four kept for X-a4), the C ABI's values stable (`CHAIN_END` 40 for the retired `CHAIN_COUNT`, retired values refused), band 4's tables bit-pinned at every matrix divisor, the scipy vectors with a 4th-band stage, the ratchet's `down4_down2_q15_eco`, `callmax_down4_*` and host `down4_*` workloads and the 4th-band probes' ceilings (section 6, the X-a3 record) |
| v0.17 | 2026-11-20 | X17 (`docs/X4_X8_PLAN.md`, X-a2): the designer's Kaiser β for A + 4 dB, accepted at A + 1 dB as before (`k_design_beta_offset_db`, no DspTap change); x = 4 chosen over 3 on the measured Q15 / Q31 floors and ripple; every pin, relaxation table, Q15 / Q31 table and scipy vector re-pinned, the matrix re-costed with its chains frozen for one PR (R3 suspended until X-a3, 3.1), every ratchet row and the probes' ceilings re-recorded with the reason (section 6, "The designer's β, X17") |
Expand Down Expand Up @@ -147,7 +148,7 @@ The boundaries are identity, not policy, as `bridge`'s are
| R24 | **Flush ends in an exactly zero state, and flushing subnormals is the host's job** (I6, I9): `window_frames()` is the input count to an exactly zero state under the host's flush-to-zero (DspTap's `floating_flush_frames`; in fixed point the truncated decay from the full headroom), so `FlushEqualsZeroPaddingBitForBit` holds; no stage reads-and-writes the floating-point environment, and each checks `TAP_DSP_EXPECTS_SUBNORMALS_FLUSHED` as a debug-build precondition; a non-finite input poisons the state until `reset()` | The control bits belong to the thread and so to the host, which most audio hosts already set; a stage that set them would restore them on every call. Honest limits: without flush-to-zero the state sticks at a few multiples of the smallest subnormal (at most 7 measured, bound 16), and the floating near-linear stage at `transparent` and divisor 1 holds a zero-input limit cycle at about four times the smallest normal even with it (the IIR plan's question 19, decided as an honest limit in v11: R28) |
| R25 | **The recursive formats** (I8, I14): float states and products in the float profile, double the golden model; Q15 in Q2.29 states and Q31 in Q2.60 (two integer guard bits), floor truncation in the one-multiplier sections and magnitude truncation in the second-order ones, the difference nodes in the 64-bit accumulator, saturation at the output only; the Q15 and Q31 outputs bit-pinned, float and double held to the direct-form golden leg by tolerance | Float states hold 120 dB (−137 dB, IIR-0) at 28 times fewer instructions than double states on the soft-double cores; floor and magnitude truncation leave no zero-input limit cycle in fixed point (IIR-0's search); under full-scale drive the largest state is 1.99 of full scale (limit 4) and the Q15 floor −100.8 dB RMS |
| R26 | **The guard band filter is a 1:1 stage of its own beside the ratios** (`docs/IIR_PLAN.md` I7, questions 14, 20 and 21; IIR-c, its follow-up and the DspTap 0.4.0 pin move): `guard_band_filter<S, Ch, P>` over `guard_band_filter_base<S, P>` (K12), `P` a `guard_phase`: `nonlinear`, the odd-order Chebyshev II over DspTap's `biquad_cascade`, or `linear`, the even-length symmetric (type II) FIR over `dot_row`, each with its zero exactly at Nyquist; `guard_band_settings` the profiles' (A, p) at the lowest odd order whose worst guard-band alias behind the half-band the filter serves is at or below −A/2, which each named setting takes as a `half_band_kind` (`fir`, `nonlinear`, `near_linear`; no default): 5 / 7 / 7 / 7 behind the nonlinear half-band, 7 / 7 / 7 / 11 behind the FIR and near-linear ones, six designs in all (`guard_band_settings{}` is `economy`'s, one design behind every kind), the linear form at the same stop edges (DspTap's `k_guard_band_fir` rows, and in Q15 at the four 70 dB settings its `k_guard_band_fir_q15` rows, 32 / 40 / 50 / 60 taps for 30 / 38 / 50 / 58, so in Q15 its length, latency and window are its own there; quantized by `quantize_symmetric_row_preserving_sum`), plus a custom form designed at run time (the Chebyshev II through `design_cheby2_lowpass` and `cheby2_linf_gains`, the linear form through DspTap's Kaiser designer, refused where no length up to 512 taps meets it). The Chebyshev's latency is nominal (R23's members), the linear form's exact, (N − 1) / 2 frames; `ratio<L, M>` unchanged | The guard band is the region every half-band leaves (−3 dB recursive, −6 dB FIR at the crossover); a filter there serves FIR and IIR stages alike without touching either (an option on each stage was declined in I7). At `economy` the Chebyshev II costs 20 multiplies per output and 0.54 frames at DC (5.04 at the passband edge); the FIR 50 MACs and 49/2 frames, exact; over the six designs 15 to 30 multiplies and 30 to 102 taps, the most at `transparent` behind the FIR and near-linear half-bands (order 11: 30 multiplies, 0.64 frames at DC and 14.71 at the passband edge; 102 taps, 101/2 frames). The nonlinear half-band's orders behind the near-linear and FIR half-bands would leave −31.4 / −31.6 dB at `super_economy` and −48.8 / −45.6 dB at `transparent`, above −A/2; the maintainer: "The settings can be different for the fir and near linear chains than the nonlinear chains" (the IIR plan's question 20). In Q15 the double rows' Q1.14 taps missed the 70 dB tier (−64.6 to −68.9 dB); the Q15 rows hold it (−89.2 / −70.4 / −72.3 / −70.7 dB), and at `transparent`, where Q1.14 cannot carry 120 dB, the double rows stay, format-limited as the FIR stages are (question 21) |
| R27 | **Mixed chains are the caller's `tap::dsp::chain`** (I10, question 16's part; IIR-c): the recursive stages and both guard band forms satisfy `sync_stage`, so a caller composes them with FIR stages (an IIR ↑2 and an FIR ↑3, a guard band filter before an interpolator or after a decimator), each stage built at its divisor (`profile::relaxed`, or `iir_down_by` / `iir_up_by`). No named IIR chains, no coverage-matrix rows, no C ABI here (IIR-d); a small offering table states the choices: ↑2 / ↓2 × four profiles × two variants × no filter, the Chebyshev II or the linear form (`rational.iir_composition.TheOfferingTableIsMeasured`, README) | `basic_chain` takes ratios only and relaxes its FIR stages; a mixed chain's design is the caller's, and its latency is DspTap's composition (exact where every stage is, nominal otherwise). A chain holding a `tap::dsp::chain` (`down_by8`) composes and processes but cannot flush, since a chain reports no `window_frames()`; the caller flattens it (DspTap follow-up) |
| R27 | **Mixed chains are the caller's `tap::dsp::chain`** (I10, question 16's part; IIR-c): the recursive stages and both guard band forms satisfy `sync_stage`, so a caller composes them with FIR stages (an IIR ↑2 and an FIR ↑3, a guard band filter before an interpolator or after a decimator), each stage built at its divisor (`profile::relaxed`, or `iir_down_by` / `iir_up_by`). No named IIR chains, no coverage-matrix rows, no C ABI here (IIR-d); a small offering table states the choices: ↑2 / ↓2 × four profiles × two variants × no filter, the Chebyshev II or the linear form (`rational.iir_composition.TheOfferingTableIsMeasured`, README) | `basic_chain` takes ratios only and relaxes its FIR stages; a mixed chain's design is the caller's, and its latency is DspTap's composition (exact where every stage is, nominal otherwise). A chain holding a `tap::dsp::chain` (`down_by8`) composes, processes and, since DspTap 0.5.0 (tap/DspTap#70), flushes: a chain reports `window_frames()`, a bound valid from any state (v0.26) |
| R28 | **The floating zero-input limit cycle is an honest limit** (I6, question 19, the maintainer's decision; IIR-c): the floating Chebyshev II at orders 7 and above, and R24's near-linear `transparent` stage at divisor 1, may settle under flush-to-zero in a limit cycle a few times the smallest normal; the hot loops and DspTap stay as they are (no deadband, no dropped design). The stage's `flush()` still equals its zero padding bit for bit, and a chain whose later stages follow a cycling stage flushes within the residue of zero padding; everywhere else, and always in fixed point, flush is exact | Measured at the named settings: the Chebyshev's state settles at most 8.7 times the smallest normal in float and 10.4 in double at order 7, 8.4 and 7.7 at `transparent`'s order 11 (pinned below 16; `rational.guard_band_float_test.TheChebyshevLimitCycleIsBounded`), the near-linear stage's below 8 (R24); orders 3 and 5 drain. A deadband or a dropped design would cost every caller to remove a residue of 1e-37 (float) that only an exact-zero test can see |
| R29 | **The C ABI exposes the recursive stages and the guard band filter, named only** (`docs/IIR_PLAN.md` I11, decided v14 with its factor argument; IIR-d): `tap_sr_rational_create_iir_format(direction, factor, phase, profile, format, channels)` (factor 2 a `basic_iir_stage`, 4, 8 and 16 an `iir_up_by` / `iir_down_by` cascade) and `tap_sr_rational_create_guard_band_format(form, half_band_kind, profile, format, channels)` (the named settings, `guard_band_settings::economy(kind)` and its siblings), with the stable constants `TAP_SR_RATIONAL_DIRECTION_*`, `TAP_SR_RATIONAL_IIR_*`, `TAP_SR_RATIONAL_GUARD_*` and `TAP_SR_RATIONAL_HALF_BAND_*`, beside the existing entry points (the symbol set re-pinned with additions only, 23 to 27); two double getters for every handle, `tap_sr_rational_nominal_latency_output_frames` and `tap_sr_rational_group_delay_output_frames`; every generic entry point serves the new handles in every format and at any channel count (one and two native, any other a fan-out), and `tap_sr_rational_latency_output_frames` refuses a handle whose C++ type has no `latency_output_frames()` (a recursive stage or cascade, the near-linear one included, and the Chebyshev II: 0 / 0, NaN seconds) while the linear form reports its (N − 1) / 2 | D12 at the C boundary, as R16: a direction, a factor and a variant name what the caller composes; the near-linear variant's delay path is exact but its passband's delay strays from it, so the exact getter would claim more than the C++ type does, and the path is its nominal; a guard band design at the high rate is no named setting, so the demonstration's "filter before the decimator" runs a labelled scipy reference rather than a custom C entry |

Expand Down
7 changes: 4 additions & 3 deletions rational/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,10 @@ longer; they are the rows marked Q15:
The near-linear variant with the linear form keeps an exact delay (its delay path plus the FIR's),
so that chain enters DspTap's round-trip scaffold; the Chebyshev II makes any chain's phase
nonlinear. A mixed chain is the caller's `tap::dsp::chain` (R27): no named IIR chain and no row of
the coverage matrix. A chain that holds a `tap::dsp::chain` (`down_by8`, say) composes and
processes, but cannot `flush()`, since a chain reports no `window_frames()`: write its stages out
flat.
the coverage matrix. A chain that holds a `tap::dsp::chain` (`down_by8`, say) composes, processes
and, since DspTap 0.5.0, flushes, as zero padding bit for bit: a chain reports `window_frames()`, a
bound valid from any state, so the flush writes the frames the stages written out flat would and
possibly a few more, all silence.

- **The aliases** (`rational.guard_band.AliasesLandOnlyAboveThePassbandEdge`, decimating by 2):
in the passband −71.4 dB or below at the 70 dB settings and −123.9 dB at `transparent`, with
Expand Down
4 changes: 2 additions & 2 deletions rational/include/tap/sr/rational/rational.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
// README's tested pairs), defined token-identically in each engine's
// umbrella header like the family version (D13) and checked against the
// pinned substrate's tap/dsp/version.h.
#define TAP_SR_DSPTAP_MINIMUM TAP_DSP_VERSION_ENCODE(0, 4, 0)
#define TAP_SR_DSPTAP_MINIMUM TAP_DSP_VERSION_ENCODE(0, 5, 0)
static_assert(TAP_DSP_VERSION >= TAP_SR_DSPTAP_MINIMUM,
"tap::sr::rational needs DspTap 0.4.0 or newer (submodules/dsptap)");
"tap::sr::rational needs DspTap 0.5.0 or newer (submodules/dsptap)");
Loading
Loading