Repository navigation
Add saved-performance replay, replay links, and repeat WAV export - #1
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.