Skip to content

Add block-size study notebook (32/64/240) with latency comparison - #8

Merged
tap merged 1 commit into
mainfrom
claude/block-size-study
Jun 11, 2026
Merged

tap merged 1 commit into
mainfrom
claude/block-size-study

Conversation

@tap

@tap tap commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Companion to asrc_demo.ipynb: a full study of processing block size (32 / 64 / 240 frames = 5 ms) against latency and quality, committed with executed outputs (5 figures), every claim assertion-pinned.

What it shows

  • Lock & breathing: all three sizes lock and run 30 s at +200 ppm with zero underruns; steady-state FIFO fill oscillates by almost exactly one block (0.60 / 1.28 / 4.99 ms peak-to-peak) — latency breathing, the Track stage's designed response to block quantization.
  • Quality, with a calibrated instrument: a phase-noise-style decomposition splits the residual at ~60 Hz into pitch modulation (cents) and a wideband floor. The instrument is self-tested in-notebook on synthetic FM and recovers 1.000 cents / 111 dB exactly. Measured: ~0.87 cents rms FM over a 60.9 dB floor at B=32 → 1.34 cents / 53.1 dB at B=240, with B=240's FM peaks (4.2 cents) below but within sight of the ~5–8 cent audibility region.
  • Latency, empirically: per-impulse transit times through the live converter show measured latency as a band — mean ≈ designed − B/2 (the pull-instant backlog runs half a block under the setpoint), width ≈ the breathing. A stacked decomposition makes the economics plain: 0.5 ms fixed filter delay vs block-driven setpoint (1.83 / 3.17 / 10.50 ms designed). Block size is the latency budget; the ASRC is a rounding error.

Honesty notes (the interesting part)

  • Getting the quality measurement right took four iterations, each caught by the in-notebook calibration cell: boxcar passband droop leaked 1.6% of the modulation into the noise figure (bounding it at 63.5 dB), and signal-domain reconstruct-and-subtract fails structurally because sub-split phase errors multiply the carrier. The shipped instrument works in the demodulated domain with a flat-passband FFT split. The failed approaches are documented in the cell's docstring so nobody retraces them.
  • The measurements showed the README's "sub-cent wow at sub-hertz rates" wording undersold coarse-block behavior — corrected to the measured figures, with a link to this notebook as the evidence.
  • The summary is blunt about regimes: coarse-block operation is serviceable (monitoring/comms; vastly better than naive-FIFO clicks at ~30 dB) but not the transparent ~126 dB regime of fine-grained transfer; the guidance is to push in sub-blocks when transparency matters.

https://claude.ai/code/session_01HuAFfoeD5a5Xe5aGNA16M9


Generated by Claude Code

notebooks/asrc_block_size_study.ipynb measures, with executed outputs:
- lock acquisition and steady-state FIFO fill per block size (latency
  breathing scales with the block: 0.6/1.3/5.0 ms peak-to-peak)
- a calibrated FM/wideband quality decomposition (phase-noise identity,
  flat-passband FFT split at ~60 Hz, instrument self-test on synthetic
  FM recovering 1.000 cents / 111 dB exactly): Track-stage block
  operation measures ~0.9 cents rms FM over a 61 dB floor at B=32,
  degrading to ~1.3 cents / 53 dB at 5 ms blocks, with B=240 FM peaks
  (4.2 cents) below but within sight of audibility
- per-impulse transit times showing measured latency as a band whose
  mean sits ~B/2 under the designed figure, and a stacked latency
  decomposition: fixed 0.5 ms filter delay vs block-driven setpoint

The README's "sub-cent wow at sub-hertz rates" wording is corrected to
the measured figures and both notebooks are cross-linked. Assertions
pin the measured behavior (FM peak < 5 cents, wideband > 45 dB,
zero underruns), so re-execution doubles as a regression check.
@tap
tap merged commit d668d02 into main Jun 11, 2026
22 checks passed
@tap
tap deleted the claude/block-size-study branch June 27, 2026 19:14
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