Freesound curate
Download a Freesound sound by ID, trim silence at the boundaries, LUFS-normalise to -20, equal-power-loop, encode WebM + m4a, append attribution. The Freesound API search is a separate step (run the search interactively or via the Notion search MCP tool — there’s no UI page for it yet).
Curate vs generate
From CLAUDE.md:
Curate from Freesound when:
- The sound is organic / irreplicable with synthesis: animal vocalisations (purrs, bird calls, owl hoots), human sounds (breath, heartbeat that needs to feel human), field recordings (rain-on-this-specific-surface, a particular waterfall, crackling campfire), instruments with complex resonance (singing bowls, gongs, wind chimes, bells).
- A listener would say “that’s a real X” vs “that’s a synth trying to be X.” If the answer is obviously the latter with DSP, curate.
Generate with DSP when:
- The sound IS synthetic by nature: binaural beats, isochronic pulses, noise colours, solfeggio tones, synth pads, drones.
Recommended search filters
license:"Creative Commons 0"
duration:[30.0 TO 600.0]
rating: ≥ 4.5
CC0 first; CC-BY second (but harder to clear if we expand). Look for clean descriptions and recent uploads (less metadata-decay).
Parameters
- sound_id — numeric Freesound ID from the URL
- track_id — the catalog id this will install as
- category —
calming | frequencies | neurodivergent | noises | nature - offset_sec — trim from start (useful for intro silence)
- target_sec — truncate to this length (0 = use full source duration)
- target_lufs (-20) — loudness target
What happens on disk
- Downloads the HD preview (128 kbps MP3) via the Freesound API
- Decodes to WAV
- Trims silence at both boundaries (threshold -45 dB)
- LUFS-normalises to target
- Equal-power-loop crossfade
- Encodes
apps/web/public/audio/<category>/<track_id>.{webm,m4a} - Appends entry to
content/metadata/attributions.json - Saves source FLAC under
tools/curate/sources/<track_id>.flac
After this, you still need to:
- Add the catalog entry to
tools/generate/catalog.py - Add the track_id to
CURATED_OVERRIDESin the relevanttools/generate/<category>/build.py - Regenerate
python3 tools/generate/catalog.pyetc.
Runtime + cost
~20s per track. Free (Freesound API is free for read).
The API key lives at tools/curate/.freesound-api-key (gitignored).