# Reverb implementation notes

The app uses native HTML controls, CSS and Web Audio. It has no external libraries, services or downloaded reverb audio. AudioContext creation and the local sample request happen after Play is pressed.

## Sound choices

- The generated pluck is a 330 Hz note with a short amplitude envelope and two overtones.
- The local event is `../../assets/audio/City_Event_Cyclist-bell-warning_4s.mp3`, listed as a 4-second City event in the supplied manifest. Its label is Bicycle bell. The app decodes it locally and limits its peak before playback.
- A stereo ConvolverNode uses a generated noise response, with a fading envelope and a few early reflections. A fixed random seed keeps repeated events in the same space.
- Dry/wet uses an equal-power mix. Close and distant presets use 8% and 82% wet while preserving decay, so comparisons concern the same room response.
- Decay ranges from 0.3 to 6 seconds. Changing it replaces the convolver and clears the existing tail. The page says this beside the control.
- Master gain starts at 0.36, with a compressor after it. Device and headphone volume still affect listening level.

## Transport behavior

Play triggers one selected sound. With Repeat checked, subsequent events occur about 5 seconds apart. Each repeat reads the current sound and room controls. Long tails may overlap.

Stop source cancels repeats, invalidates a pending sample load and stops current sources with a short fade. The convolver continues to output the existing reflections.

Stop everything also zeros master gain, stops all source nodes immediately and replaces the convolver to discard stored reflections. A pending fetch may finish but cannot trigger a cancelled sound. Pressing Play again restores master gain.

## Checks and limits

- `node --check app.js` passes.
- The referenced MP3 exists and is readable.
- Browser, interaction and listening tests are owned by the parent task and were not run here. No server was started.
- Room rings and the tail bar are illustrative, based on scheduled durations. They are not a measured audio waveform or level meter. A sample may contain silence or reflections of its own.
- The room is a synthetic noise reverb, not a measured architectural simulation. It does not estimate distance in metres.
- The original first complete HTML, CSS and JavaScript are preserved unchanged in `attempts/001/`. The current app adds an immediate source stop in the global-stop handler after a static review, avoiding residual source input during its short source-stop fade.
- The snapshot retains the original app-relative sample URL and is an archival copy. Open the canonical `/apps/10-reverb/` page for the supplied asset paths.

All changes are local to this app directory. No Git operations or shared-file edits were made.
