topic: city-soundscape triggers: [ambience, city sound, splash sound, fountain sound, assets/sounds/water, background sound, footsteps, footstep surface, recorded sound, freesound, assets/sounds, systems::ambience, ambience.rs, soundscape.rs, PavingIndex, paving_at, drivable_near, step echo, --clip walk, walk video] updated: 2026-11-29
The city's sound: recordings, chosen by the map
Started 2026-10-20 after the user asked for a GTA / Red Dead feel on foot. The
earlier soundscape was all synthesis, and every complaint about it was a
synthesis artefact: walking "sounded like a wind tunnel" (a clipped low-pass
rush), the steps were "cheap" and then a metronome, and the road hum "did not
sound like traffic" and was removed for its per-frame cost
(avatar-game-feel.md, ambient-traffic.md). The user chose recordings
from free libraries over recording Groningen themselves.
What it is
- Footsteps by surface, from the BGT's own paving material where the survey says (brick, concrete pavers, tiles, asphalt, gravel, grass…), the lawns where it does not, and asphalt off the survey (an OSM carriageway). Indoors is a wooden floor; hard ground in the rain uses wet takes. Six takes a surface, never the same twice running, on top of the existing rate and level jitter.
- Nine background loops — traffic, shopping street, residential, park, canal, square, night, room, rain — mixed from what the map already holds: road speeds and distance, shops/cafés within 40 m, lawn and water on a 14 m ring of probes, walls on eight 30 m rays at head height, the interiors, the sun and the live rain. Sampled four times a second, eased over seconds.
- One echo off the facades for each step in a street narrower than ~20 m.
The loops are a texture over real data, like a stone pattern on a pavement;
they place nothing. A sound tied to one spot (a bell, a gull) is a placement,
and only for a source the data names (world-content-from-real-data-only).
Constraints found on the way
- No CC0 recording of footsteps on a brick street exists on Freesound
(searched in five languages, 2026-10-20); a stone patio stands in for
brick-*. Recording Dutch klinkers would be the one gap worth filling. Searched again 2026-11-29, CC0 and CC BY, by tag and text (brick, bricks, cobblestone, cobbles, pavers, klinkers, Pflaster, baksteen, voetstappen): the nearest are a CC0 "footsteps on a cobblestone street" (Jess_Weddle_6121/695945: natural stone, six peaks in 14 s at 12–22 dB over its floor) and a CC BY city walk in old 's-Hertogenbosch (klankbeeld/882815: steps 13–21 dB over street noise, voices and birds). The patio's steps stand 25–42 dB clear, and a one-shot must be clean because the beds already carry the street, so neither replaces it. The takes have to be recorded: a phone, close to the shoes, on klinkers in a quiet street, and the six cut as the others were; the code needs no change. - Freesound's originals need a login; the HQ previews (~192 kbps Ogg) do not
and are what was cut. Every file and its author is in
assets/sounds/LICENSE.md. - Bevy's mixer has no filters and no reverb. Indoors therefore makes the street quieter rather than duller, and the street's echo is one delayed copy of the step, not a reverb. Real reverb or a low-pass means another audio library (Kira or Firewheel); not checked against Bevy 0.20, Android or wasm.
- Decoding Ogg is
bevy/vorbis(lewton, pure Rust), which addslewtonandoggto the lockfile and cross-compiles like the rest. - The paving polygons were dropped after meshing;
PavingIndexkeeps them per cell insideWorldPlaces(16 m buckets). The road query rejects a line on its bounding box before reading its points — the removed road hum scanned every vertex every frame and was the biggest named main-thread cost on the web.
How the files were cut, and how it is checked without a speaker
This container has no audio device, so nothing here was tuned by ear by the agent. The steps were found by onset detection on the recordings (a take is rejected if anything in its tail reaches half its peak or it rises late) and checked as waveform pictures; the loops are the steadiest 33 s of each take, loudness-normalised to −20 LUFS and crossfaded end-into-start over 3 s.
To hear a change, render a walk: --clip walk --frames N with two or more
--at walks the avatar along the path (frames spaced by distance, the clip's
phase from distance over the pack's stride), and
RUST_LOG=cartopolis::ambience=debug logs what the game chose at each frame,
from which a soundtrack is built and muxed under the frames. Measured on the
Deck, 2026-10-20: 407 frames at 1280×720 in 17 min (~2.5 s a frame) for a
34 s walk at 12 fps. Pick the path from OSM's way geometry, not address
points (those sit on facades), and check the turns with a still first — the
first try walked into a building, which the sampler duly reported as indoors.
Water: splashes, strokes, lapping and fountains (2026-11-16)
Fourteen more CC0 recordings in assets/sounds/water/, chosen and cut the
same way (Freesound HQ previews, onset detection, waveform and spectrum checks,
credited in assets/sounds/LICENSE.md); played by systems::splashes
(water-splashes.md). A splash or stroke is a one-shot at its place, heard by
splashes::water_level — full within 3 m, a point source's 6 dB a doubling
past it, faded out by 45 m. Two loops start silent with the beds: tread
(close water round a swimmer, full while the own avatar swims, by distance for
others) and fountain (the nearest jet: full within 4 m, gone at 60 m). A
fountain is a sound tied to one spot, so only where the data names a fountain
in the water. Footsteps stop and the landing thud is skipped while swimming.
The weakest takes, by the analysis rather than by ear: tread is somebody
swimming with a stroke every ~0.35 s rather than treading, and needed 9 dB of
peak limiting to reach −20 LUFS; the strokes are a lake swimmer recorded from
the shore; fountain carries light city rumble under 150 Hz.