Skip to content

book: the synchronous engines, and the framing for three - #68

Merged
tap merged 3 commits into
mainfrom
claude/sample-rate-expansion-strategies-ezqzu6
Oct 8, 2026
Merged

tap merged 3 commits into
mainfrom
claude/sample-rate-expansion-strategies-ezqzu6

Conversation

@tap

@tap tap commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Three commits.

1. Part VI — The bridge engine (book/src/part6/, four chapters, about 6,400 words):

  1. The degenerate case: 44.1 ↔ 48 as a type — the two asymmetric directions, the rate scale K and its bit-identity, the spec-relaxation argument (nothing folds below 20.1 kHz going down), the profile ladder with its pinned counts and the 38-not-40 quirk, the per-branch normalization that kills the f_out / L spurs.
  2. The phase table and the schedule — the compile-time schedule, the table without the ASRC's blend and extra row, the symmetry halving and why its quantization is canonical over the stored half, the storage budgets.
  3. The converter, and the campaign that made it fast — the contract and call shapes; the three measured codegen levers (superblock walk, committed trip counts, the halving's per-target inlining gate) with their numbers per target; the construction-share finding.
  4. Three legs, and the bridge to the ASRC — scipy, exhaustive phases, the pinned-eps cross-validation relocated from the brief (and why the result not moving between L = 512 and 1024 is the evidence), the Q15 pairing, bluetooth_bridge run on this tree (locked at +200.1 ppm, 997.000 Hz, 72.8 dB, 1.93 ms), the C ABI and the ten-workload ratchet.

2. Part VII — The rational engine (book/src/part7/, six chapters, about 12,000 words): the ratio as a type, the Nyquist design, the two machines of stage.h, chains and the 182-row matrix, the fixed-point ladder with the two lifted Q15 limits and the host-versus-target table traced to the designer, and the proof system, C ABI and levers.

3. The framing for three engines:

  • Title: SampleRateTap: The Story of a Sample Rate Converter Family; the description names the three converters.
  • Introduction: opens on three converters built on one substrate by one method; the honesty clause covers the two new figures; the epilogue's place is stated.
  • Epilogue moves after Part VII, so the book closes on the letter (its chapter count reads thirty-one).
  • Part 0 ends with The rule the family runs on: the three engines as the three clock topologies, and why none has an (in_hz, out_hz) lookup. Part VI opens by pointing back at it.
  • Appendix A gains section 19: the five C++ decisions the synchronous engines added, in the log's own format (the ratio as a type; if constexpr selecting the machine; exact rationals over doubles; quantize once and let symmetry carry the rest; the per-target noinline with its numbers).
  • Glossary: eight entries (commutator, coverage matrix, design divisor, L-th-band filter, mirrored phase, rate scale, structural zero, superblock). Bibliography: Mintzer 1982, Vaidyanathan 1993.
  • Two figures from scripts/book_figures.py, generated from the sources the text cites: alias-zone.svg (bridge's rate arithmetic drawn to scale: the 20.1–22.05 kHz landing zone) and coverage-matrix.svg (the 14 × 14 matrix at economy, read from the rational engine's own generator, the 38 dipping rows marked). The script now takes figure names so these can be re-rendered without the trace tool.
  • Two attributed epigraphs replaced with sourced ones (Dijkstra, EWD 498; Pike, Notes on Programming in C).

Also: anchors (comment-only) in rational's ratio.h, stage.h, chain.h; book-pages.yml rebuilds on rational/include/** and the submodule pointer; rational/README.md's workload count reads fourteen.

Why

The family plan listed the book's engine chapters as follow-up work since the migration. Once the two parts existed, the book's own framing — its title, its opening sentence, its appendices and its honesty clause about figures — described one engine; the third commit makes it describe three. The parts read in the order the machinery was inherited: bridge first, then rational.

Verification

  • mdbook 0.4.40 builds the book with zero warnings (the CI gate); every {{#include}} resolves; CI's image-reference check passes with the two new SVGs.
  • The two figures were rendered and inspected; the matrix's extremes and flag count in the caption (7.8, 551, 38) are read from the generator.
  • The rational battery passes 113/113 on the host (the anchors are comments); clang-format clean.

Notes for the reviewer

  • Not done, deliberately: per-part title pages (mdBook has no part-level page; each part's first chapter carries its problem statement) and chapters for the async-side figures of Parts VI–VII beyond the two above.
  • Part VII's fixed-point chapter describes the DspTap mirror fix that landed this morning, so that chapter and nyquist.h's contract agree.

🤖 Generated with Claude Code

https://claude.ai/code/session_015VR1VC4SDGxHZQQsQvPBaA

claude added 2 commits October 8, 2026 12:16
Six chapters in the book's form, header by header with the excerpts
included live by anchor: the ratio as a type and the charter
(ratio.h), the Nyquist design and the profiles (DspTap's nyquist.h,
design.h), the two machines of stage.h, chains and the coverage matrix
(DspTap's chain.h, chain.h), the fixed-point ladder per stage with the
two lifted Q15 limits and the host-versus-target table traced to the
designer's mirror branches, and the proof system, the C ABI and the
levers measured and declined. Each closes with the commands that back
it.

Anchors added to ratio.h, stage.h and chain.h (comment-only; the DspTap
ones came with tap/DspTap#56). SUMMARY and the introduction gain the
part; book-pages.yml rebuilds on rational/include and the submodule
pointer; the README's workload count reads fourteen, the table's.

mdbook 0.4.40 builds the book with no warnings.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VR1VC4SDGxHZQQsQvPBaA
Four chapters on bridge in the book's form, the excerpts included live
from its headers' anchors: the direction as a type and the rate scale K,
the spec-relaxation argument (nothing folds below 20.1 kHz going down)
and the profile ladder with its pinned counts (the 38-not-40 quirk), the
per-branch normalization that kills the f_out / L spurs; the compile-time
schedule and the phase table without the ASRC's blend and extra row, the
symmetry halving and why its quantization is canonical over the stored
half; the converter's contract and the three measured codegen levers
(the superblock walk, the committed trip counts, the halving's
per-target inlining gate) with the construction-share finding; the
three proof legs, the pinned-eps cross-validation relocated from the
brief, the Q15 pairing, bluetooth_bridge run and measured (1.93 ms,
+200.1 ppm, 72.8 dB), the C ABI and the ratchet.

The rational chapters move from part6/ to part7/ so the parts read in
the order the engines were built and the machinery was inherited;
Part V's bridge section now points at Part VI instead of saying the
code lives in another repository. The introduction describes both.

mdbook 0.4.40 builds the book with no warnings.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VR1VC4SDGxHZQQsQvPBaA
@tap tap changed the title book: Part VI, the rational engine book: the synchronous engines — Part VI bridge, Part VII rational Oct 8, 2026
…dices, two figures

The title is now the family's (The Story of a Sample Rate Converter
Family); the introduction opens on three converters built on one
substrate by one method, keeps the honesty clause true for the two new
figures, and says where the epilogue sits. The epilogue moves after
Part VII so the book closes on the letter (its chapter count reads
thirty-one). Part 0 ends with the rule the family runs on: the three
engines as the three clock topologies, the lookup that none of them
has. Part VI opens by pointing back at it.

Appendix A gains section 19, the five C++ decisions the synchronous
engines added in the log's own format (the ratio as a type, if
constexpr selecting the machine, exact rationals over doubles,
quantize once and let symmetry carry the rest, the per-target noinline
with its numbers); the glossary gains eight entries (commutator,
coverage matrix, design divisor, L-th-band filter, mirrored phase, rate
scale, structural zero, superblock); the bibliography gains Mintzer
1982 and Vaidyanathan 1993.

Two figures, generated by scripts/book_figures.py from the sources the
text cites: alias-zone.svg, bridge's rate arithmetic drawn to scale
(the 20.1–22.05 kHz landing zone, Part VI chapter 1), and
coverage-matrix.svg, the 14 x 14 matrix at economy read from the
rational engine's own generator with the 38 dipping rows marked
(Part VII chapter 4). The script takes figure names so the two can be
re-rendered without the trace tool. Two attributed epigraphs are
replaced with sourced ones (Dijkstra EWD 498; Pike, Notes on
Programming in C).

mdbook 0.4.40 builds the book with no warnings; CI's image check
passes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VR1VC4SDGxHZQQsQvPBaA
@tap tap changed the title book: the synchronous engines — Part VI bridge, Part VII rational book: the synchronous engines, and the framing for three Oct 8, 2026
@tap
tap merged commit cdf486d into main Oct 8, 2026
28 checks passed
@tap
tap deleted the claude/sample-rate-expansion-strategies-ezqzu6 branch October 8, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants