# Original M2 audio

All WAV files in `assets/audio/` were synthesized specifically for SixLetterWorkshop by `tools/generate_audio.py`. The Python generator uses only its standard library, a documented deterministic noise seed, mathematical oscillators, and an original note/timing arrangement. No external recording, stock sample, existing song, voice, or audio service was used. There are no third-party sample attribution requirements.

**Current MW1 web version: sound effects only.** The mobile/browser export excludes the music asset, never loads it and creates no music player. Native desktop keeps the unchanged original PCM stereo loop. Original source WAVs and the frozen M2 Windows package remain intact.

The set contains eighteen short cues and one optional 24-second stereo ambient loop. The nine original cue names remain available (`select`, `undo`, `shuffle`, `valid`, `bonus`, `duplicate`, `invalid`, `six`, `complete`). M2 adds length-specific target rewards `valid3` through `valid6`, length-specific bonus rewards `bonus3` through `bonus6`, and a quiet optional `stamp` for the word's board landing. The effects use soft mallet-like decaying tones and quiet filtered transients. The loop is the unchanged original slow four-chord pad progression in D major.

Word rewards grow from a quick two-note gesture to a six-voice D-major flourish as word length increases. Their peaks rise only gently from 0.25 to 0.31, so bigger words feel richer without creating a large volume jump. Bonus variants are voiced differently and 12% quieter. Entry taps follow a D-major pentatonic rise across six slots. Invalid input gets a quiet low wooden flutter; duplicates get an unobtrusive double tap. No buzzer, harsh alarm, sampled instrument or borrowed melody is used.

Reproduce with Python 3:

```powershell
python tools/generate_audio.py
```

`assets/audio/manifest.json` records every source WAV's SHA-256 hash, duration, channel/sample format, peak and RMS levels, and endpoint samples. The generator reopens each WAV and validates its format, frame count, byte count and absence of clipped samples. Current imports preserve 16-bit PCM, which keeps their measured peaks intact. The manifest describes original source WAV bytes, including desktop-only music. This is signal and file validation, not listening evidence.

`WorkshopAudio` statically references every cue so Godot exports the assets. It bounds effects to six voices, varies repeated tile pitches slightly, suppresses rapid repeated negative feedback, keeps volume controls local, and enables music looping only when requested. Word rewards have priority over typing when the pool fills; round completion has highest priority. Default settings are effects 55% and music 18%; effects also have a fixed headroom factor of 0.42. Even a conservative aligned sum of six maximum-peak effects plus the music at both sliders' 100% setting remains below 1.0 (0.9864). Mute and zero-volume settings apply before or after the node enters the scene tree. Music remains off until the game calls `start_music()`.

Godot 4.7.2 imported all nineteen WAV files and passed 95 focused runtime checks in `tests/test_audio.gd` using its Dummy audio driver. These exercise all eight length-dependent reward routes, rising entry pitches, active-reward protection from rapid typing, round-completion priority, negative-feedback throttling, pre-ready settings/music requests, every cue resource, lossless effect imports, the six-voice limit, the exact 1,058,400-frame music loop, shared-resource preservation, mute, clamped sliders, unknown-cue handling and music stop. This verifies resource import and node behavior without speaker output. The measured manifest records 34.95 seconds of generated audio with a highest quantized sample peak of 0.319977 and zero clipped samples.

Runtime API:

```gdscript
audio.play_tile(slot_index) # zero based, 0 through 5
audio.play_word(word.length(), is_bonus)
audio.play_cue("stamp") # optional, synchronize once to the board landing
```

Silent test command:

```powershell
& tools/godot/editor/Godot_v4.7.2-stable_win64_console.exe --headless --audio-driver Dummy --path . --script res://tests/test_audio.gd
```

No speaker playback or subjective listening pass was performed while preparing these files: the user requested background work while using the computer. Packaged sound behavior and subjective comfort still require a listening pass during the user's playtest.

## Historical MW1 music compression experiment (superseded)

On September 6, 2026, `workshop_loop.wav.import` was briefly tested with Godot's Quite OK Audio compression (`compress/mode=2`). After the user selected no music for mobile, that setting and the generator's compression policy were restored to original PCM. The following measurements describe only the superseded experiment, not the current native imports or sound-effects-only web build. Its test is archived as text under `docs/mobile/archive`.

The imported music resource is 855,391 bytes (618,109 gzip), versus the original source WAV's 4,233,644 bytes (3,257,127 gzip). Whole-game transfer size is measured separately after export. No new external audio source, encoder service or attribution dependency was introduced.

The archived test compared 2,116,800 stereo output frames: two full start-at-zero forward-loop cycles, decoded offline by Godot 4.7.2 with Dummy audio. The measured decoded peak was 0.179968; signal-to-error ratio was 59.67 dB; maximum sample error was 0.0004273. The natural loop seam's maximum adjacent-sample jump was 0.0000916. The conservative six-effects-plus-music peak at maximum sliders was below 1.0 (0.986310). All 18 effect resources remained PCM16. Exact historical measurements and source identity are in `docs/mobile/music-compression.json`.

A synthetic QOA direct-decoder start near 23.99 seconds produced an inconsistent initial excursion and was not a validated seeking path. That compressed music format is no longer used. The historical offline measurements do not establish browser output or physical-device listening quality.
