Skip to content

Add saved-performance replay, replay links, and repeat WAV export - #1

Merged
Stereo-Images merged 4 commits into
mainfrom
feature/performance-replay
Oct 19, 2026
Merged

Stereo-Images merged 4 commits into
mainfrom
feature/performance-replay

Conversation

@Stereo-Images

@Stereo-Images Stereo-Images commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Open can preserve a discovered performance while keeping Play as a fresh encounter. Previously, exported filenames omitted the root tone, length, and engine version, so a seed alone could not reliably restore a run.

This adds an optional Revisit section with seed/filename/link input, Copy replay link, and Export WAV. Complete links and new filenames retain the seed, tone, duration mode, engine version, and WAV sample rate. Opening a link waits for an explicit Replay; Play still draws a fresh seed. Older filenames use the selected settings with a clear limitation message. Unsupported engine versions are rejected without interrupting playback.

The musical generator, synthesis, and PCM encoder are unchanged. The README explains unpredictability on first encounter, replay behavior, export metadata, and browser/mastering limits.

Validation: all 54 Node regressions pass, including original musical-baseline comparison and frozen complete score hashes for Short Study (d5f9fea7, 110 Hz, Short) and Long Study (d1a0b62b, 121 Hz, Long). Focused lifecycle/clipboard checks also pass after final feedback changes. Added browser tests for link loading, manual clipboard fallback, narrow layout, and WAV regeneration from a downloaded filename. Audio comparisons require matching headers and lengths, at most two 16-bit PCM steps of difference, and RMS error below 0.01% of the signal—the same tolerance as the existing repeat-export tests. EP score fingerprints normalize only the final floating-point digits for portability across JavaScript engines. All 45 native browser tests pass across Chromium, Firefox, and WebKit in GitHub Actions run 39200084889. Recreated WAVs were sample-identical in Firefox and differed by at most one 16-bit PCM step in Chromium/WebKit. The replay tests wait for confirmed playback before testing Stop, copying, or export.

Keep Play as fresh discovery and add optional Revisit controls for saved seeds,
filenames, and links. Preserve the engine, tone, duration mode, and export rate
in new WAV filenames and links. Document first-encounter unpredictability and
replay limits without changing the musical generator or synthesis.

Verify both EP score fixtures and replay round trips; add native-browser WAV
regeneration coverage.
Normalize score numbers to eight decimal places before hashing so insignificant
last-bit differences between V8 versions do not fail musical replay checks.
Use the existing header/length and sample-error checks for both repeated
exports and reload-from-filename replay. Native floating-point DSP may differ
at the last PCM step, so byte equality overstates the rendering guarantee.
@Stereo-Images
Stereo-Images merged commit 922c917 into main Oct 19, 2026
2 checks passed
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.

1 participant