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
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@ them they read four things off it: how many channels there are, how long it is,
what rate it was made at, and the samples. `test/audio-buffer.ts` is those four
things and nothing else.

The audio graph is here too, which for a while it was not. The export path is
an `OfflineAudioContext` rendering faster than real time, and that is a plain
function of its inputs in every sense that matters: the same project gives the
same samples, with no page, no device and no clock. It only ever needed an
implementation, and `node-web-audio-api` is one — `test/web-audio.ts` puts its
names on the global before the tests run. So `render.test.ts` asks the
questions that are actually about sound: does a cue start on the sample its
time works out to, does an end-anchored one begin a length earlier, does mute
silence it, does solo silence everything else, do the stems add back up to the
mix, and is the same placed sound the same file every time it is rendered.
What that does not check is that two Web Audio implementations sound alike —
it checks that we schedule and mix what we meant to. The browser suite is where
the real thing gets driven.

`test/fixtures/motion-shapes.json` holds real measurements taken by the scan
itself, off a clip built with one of each shape in it: a cut, a build, a move,
a flurry and a still passage. It is kept because it is decoder output rather
Expand Down Expand Up @@ -126,7 +140,10 @@ video's and the stage carries fourteen pixels of padding; and zooming back out
never quite reached Fit, since 2.56 divided by 1.6 twice is 1.0000000000000002
rather than 1.

What is not tested yet: the parts that reach the audio graph.
What is not tested yet: the live playback path — the clock, the buses and the
scheduling that happen while you are listening rather than exporting. The
browser suite covers the playhead crossing the end of the clip; what a sound
does under a moving playhead it does not.

## Deploying

Expand Down
130 changes: 130 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"devDependencies": {
"@playwright/test": "^1.62.1",
"@types/node": "^26.4.0",
"node-web-audio-api": "^2.2.0",
"typescript": "^5.9.3",
"vite": "^7.3.6",
"vitest": "^4.1.11"
Expand Down
Loading
Loading