Skip to content

idsinge/latency-test-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

latency-test-examples

Host applications for the <latency-test> Web Component (@adasp/latency-test) — a tool that measures browser round-trip audio latency using an MLS signal and cross-correlation.

Everything in this repository consumes the published npm package (or CDN build) — never the component's local source. Two tiers:

Status: seed-only. The examples/ and demos/ folders do not exist yet — Tier 1 work starts with vanilla-js. This note is removed when the first example lands.

Framework integration examples (examples/)

One small app per framework, mirroring the corresponding docs example page and verifying it end-to-end against the installed published package.

Verification matrix

Framework Folder Tooling Package Docs commit Environment (browser / OS / audio) Dev Prod build Checks Result Date Notes
Vanilla JS (npm + CDN) examples/vanilla-js/ pending
React examples/react/ pending
Vue examples/vue/ pending
Svelte examples/svelte/ pending
Angular examples/angular/ pending
Next.js examples/nextjs/ pending

Checks legend (each recorded individually per row, e.g. ev✓ neg✓ reg✓ con✓):

  • ev — five success-path events fire in order (latency-start, latency-recording, latency-processing, latency-result, latency-complete) with no latency-error
  • neg — deliberate negative-path test proves latency-error wiring
  • reg — registry consumption proven (fresh npm ci, lockfile resolves to registry.npmjs.org, npm ls @adasp/latency-test = 1.2.0, no file:/link:)
  • con — clean browser console in dev and production build
  • cdn — CDN variant verified (vanilla-js only)

Pass = all checks ✓, the custom element upgrades (the component is headless — nothing visible renders), and a run yields a reliable result (ratio > 18 dB). See CLAUDE.md for full criteria.

Latency-compensation demos (demos/)

Quarantined until Tier 1 is complete: no work happens in demos/ — not even scaffolding — until the verification matrix above is fully passed and Phase 6 is signed off in the component repo.

Small multitrack editors demonstrating that the measured round-trip latency can align a recording: a default metronome track is recorded through the microphone while wearing headphones — uncompensated, the recording lands late by the round-trip latency (audible flam, visible waveform offset); after running the latency test, the measured value shifts the recording into alignment.

Reference implementation: the Hi-Audio fork of waveform-playlist, which already applies a measured latency value to recorded tracks (MediaRecorder-based).

Roadmap

Demo Target library Status
waveform-playlist (React) naomiaro/waveform-playlist planned
dawcore (Web Components) @dawcore/* migration spec planned
openDAW andremichelle/openDAW stretch goal
WAM Online Studio Brotherta/wam-studio stretch goal

Running locally

Each app is self-contained: cd into its folder and follow its own README. Bootstrap a fresh scaffold with npm install; verification runs use npm ci once the lockfile exists (this is what the registry-consumption check requires). All apps require a microphone and run on localhost or HTTPS.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Contributors