# CityRail interaction and train sound bank

`cityrail-effects.wav` and `cityrail-trains.flac` contains edited real recordings. The KodyTron brake recording is CC BY 4.0.
The Keikyu 2100 recording permits unrestricted use, modification and redistribution
(see its source declaration below). Other source recordings are CC0 1.0:
https://creativecommons.org/publicdomain/zero/1.0/

- **Mechanical Keyboard Cherry MX Brown — majod** (2017-08-21).
  https://freesound.org/people/majod/sounds/400167/
  The author's recording of typing on a mechanical keyboard with Cherry MX Brown switches.
  Public HQ preview: https://cdn.freesound.org/previews/400/400167_7690632-hq.mp3
- **Mechanical switch (latch) 02 — xkeril** (2025-07-08).
  https://freesound.org/people/xkeril/sounds/815493/
  The author's recording of a physical wooden door latch, recorded with an iPhone and cleaned offline.
  Source is the author's publicly served HQ MP3 preview.
- **in the train — rucisko** (2012-09-02).
  https://freesound.org/people/rucisko/sounds/164766/
  Public HQ preview: https://cdn.freesound.org/previews/164/164766_2978883-hq.mp3
  Train in motion, recorded inside, with percussive track detail.

Interface processing: individual recorded impacts, mono 24 kHz,
90 Hz high-pass / 4.5 kHz low-pass, individual peak levels, 2 ms attack / 12 ms release fades.
Selection, value adjustment, rejection, deletion and undo use distinct edits and rhythms.
Notifications use short sequences of these physical impacts, rendered offline into one cue.
Selection and adjustment cues are raised by 1 semitone; opening is raised by
0.75 semitones. These edits are rendered offline; other UI cues retain their
recorded pitch. No oscillator, generated melody or generative AI is used.
The previous Kenney interface clips have been replaced throughout the bank and builder.

- **Keikyu2100.ogg — 劇団多賀谷** (2008-03-16).
  Source and permission: https://commons.wikimedia.org/wiki/File:Keikyu2100.ogg
  Original: https://upload.wikimedia.org/wikipedia/commons/a/ac/Keikyu2100.ogg
  The file page identifies 劇団多賀谷 as author and declares that the copyright
  holder allows use for any purpose, unrestricted redistribution, commercial use
  and modification (Copyrighted free use). This is not labeled CC0.
  Recorded Keikyu 2100 departure, used as a Siemens traction texture.
  Modifications: excerpt 1–5.5 s, mono 24 kHz, 110 Hz high-pass, 4.5 kHz low-pass,
  +3 dB at 750 Hz (Q 0.8), normalized motor peak 0.30; quiet rail/clack mix,
  combined peak 0.34. The first 2.2 s play once; only the tail loops,
  with a 150 ms seam crossfade. No endorsement implied.

- **R16-20-Train Wheels Clacking.wav — craigsmith** (2019-08-18).
  https://freesound.org/people/craigsmith/sounds/480813/
  License: CC0 1.0. Archival train-wheel clacking sound recording digitized
  by craigsmith; the author describes USC Cinema full-track tape transfers.
  Public HQ preview: https://cdn.freesound.org/previews/480/480813_2524442-hq.mp3
  Edited excerpt: 8–14 s, mono 24 kHz, 55 Hz high-pass / 3.6 kHz low-pass.
- **Train Brakes — KodyTron** (2022-07-08).
  https://freesound.org/people/KodyTron/sounds/640998/
  License: Creative Commons Attribution 4.0 International (CC BY 4.0),
  https://creativecommons.org/licenses/by/4.0/
  Public HQ preview: https://cdn.freesound.org/previews/640/640998_14125872-hq.mp3
  Credit: @KodyTron. No endorsement implied.
  Edited excerpt: 2–8 s, mono 24 kHz, 55 Hz high-pass / 5.2 kHz low-pass.
  Author identifies a train stopping, not a verified specific brake design.

Train processing: restored traction combines the 1–5.5 s Keikyu excerpt with
rucisko and craigsmith 8–14 s layers. Its introduction plays once and the final
2.3 s sustain loops. Restored braking combines KodyTron's 2–8 s excerpt with
the same wheel/contact layers, producing the original 4.5 s seam-matched loop.
Both are 24 kHz PCM with fixed playback pitch, independent of simulation speed.
The rolling resource retains rucisko 8–54 s (gain 0.22) and craigsmith 4–50 s
(gain 1), a 44.5 s loop encoded losslessly at 14 kHz. It is loaded on demand;
only its playback rate follows actual train speed. All mixing is offline.
The gain ceiling is 0.34. Entry fades over 500 ms, state transitions use
complementary 400 ms ramps, and stopping releases over 220 ms.
One stable train voice and at most two during transition/release are retained.
These are general operating textures, not vehicle-specific acoustic models.

Build: `scripts/audio/build-bank.py <mechanical-sources> <train-mp3> <brakes-mp3> <motor-ogg> <clacks-mp3>`.
The mechanical source directory contains `keyboard.mp3` and `latch.mp3`.
Exact edits, source hashes and output SHA-256: `sound-sources.json`.
Existing piano tracks have a separate license in `PIANO-LICENSE.txt`.
