Echo acoustic ranging #5

Open
jheaps wants to merge 5 commits from echo-acoustic-ranging into master
5 Commits
Author SHA1 Message Date
Josh-Heaps 7f664e1b38 add deploy yml for gitea
.NET / build (pull_request) Successful in 53s
Playwright Tests / playwright-tests (pull_request) Canceled after 16s
2026-08-26 15:13:45 -06:00
Josh-HeapsandClaude Opus 5 5501c84e9b Test the ranging pipeline against a simulated room
The DSP tests drive the same files the page loads, so there is no second
implementation to drift. The room tests put two real browsers through a
real room with a synthetic microphone, which covers everything except the
acoustics: slot rotation, leave and rejoin, and the stalled-device case
where a chirp must be withheld rather than sent late.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-30 14:42:16 -06:00
Josh-HeapsandClaude Opus 5 d78251c928 Add the /echo page, capture and playback
Worklet capture into a ring buffer indexed by AudioContext frame, with
the chirp scheduled on the audio clock. Timers are avoided throughout:
a hidden tab has its timers throttled to roughly once a second, which is
long enough to put its chirp in another device's slot and misattribute
every arrival in the round. A device that cannot reach its slot in time
sits the round out rather than chirping late.

Echo cancellation, noise suppression and auto gain are all requested off
and warned about if the device refuses, since echo cancellation exists to
delete exactly the sound being measured.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-30 14:42:05 -06:00
Josh-HeapsandClaude Opus 5 94054c0f1b Add echo rooms, round scheduling and peak relay
In-memory rooms with a background service that opens a round per room,
rotates which device chirps first, and broadcasts the raw peak table once
everyone has reported or the deadline passes. Rounds are announced ahead
of time with a server timestamp so devices schedule against a shared
reference rather than against message arrival.

The server only ever holds sample indices; the geometry is solved on the
clients and no audio is uploaded.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-30 14:41:52 -06:00
Josh-HeapsandClaude Opus 5 183a53234f Add acoustic ranging maths and a room simulator
Chirp generation, FFT matched filter, first-arrival detection with
sub-sample peak fitting, the BeepBeep pair solve, triangle-inequality
outlier rejection and classical MDS, plus a virtual room that
synthesizes what each device would have recorded so the pipeline can be
exercised without microphones.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-30 14:41:39 -06:00