API & MCP
Everything a person can do on Ambience Generator (rain, wind, stream, fire, hum, drone), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://soundscapeambiencegenerator.usefulweb.site/api/v1/calculate– run Ambience Generator (rain, wind, stream, fire, hum, drone)GET https://soundscapeambiencegenerator.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Ambience Generator (rain, wind, stream, fire, hum, drone)
Creates procedural background sound — rain with individual drops, gusty wind, a bubbling stream, a crackling campfire, room tone with mechanical hum, or an evolving drone — as a seamless-loop WAV. Every layer is synthesized from seeded noise and oscillators (no samples), with intensity, brightness and character controls and an optional room reverb.
| Field | Type | Default | Description |
|---|---|---|---|
kind | select (rain, wind, stream, fire, hum, drone) | "rain" | Sound |
duration | number | 20 | Loop length. Up to 60 seconds (stereo up to 48 kHz). A seamless loop can be repeated as long as you like in any player that loops. The WAV file is kept on the server for about 2 hours so you can download it, then deleted. |
sampleRate | select (8000, 16000, 22050, 32000, 44100, 48000, 96000) | "44100" | Sample rate |
channels | select (stereo, mono) | "stereo" | Channels |
level | number | -20 | Level (RMS) |
loop | boolean | true | Seamless loop |
loopCrossfade | number | 1 | Loop crossfade. Longer crossfades hide the seam better; at most a quarter of the loop length is used. |
room | select (none, small-room, living-room, studio, hall, cathedral, cave, forest) | "none" | Room |
intensity | number | 0.5 | Intensity (rain, wind strength, water flow, fire size) |
density | number | 120 | Raindrops per second at full intensity (rain) |
brightness | number | 0.5 | Brightness (rain, fire, hum, drone) |
gustiness | number | 0.5 | Gustiness (wind) |
pitch | number | 0.5 | Pitch (wind) or water size (stream: 0 brook … 1 river) |
detail | number | 0.5 | Bubbles (stream) or crackles (fire) |
frequency | number | — | Frequency (hum fundamental or drone root). Empty = 100 Hz hum (transformer hum on 50 Hz mains; use 120 for 60 Hz mains) or a 55 Hz drone root. |
partials | integer | — | Harmonics (hum, 1–16) or voices (drone, 2–8). Empty = 8 harmonics or 4 voices. |
detuneCents | number | 8 | Detune spread (drone) |
motion | number | 0.5 | Slow movement (drone LFO depth, hum wobble) |
lfoRate | number | 0.08 | LFO rate (drone) |
roomToneDb | number | -24 | Room tone level relative to the hum (hum) |
encoding | select (pcm16, float32) | "pcm16" | File format |
seed | text | "1" | Seed. Same seed and settings = the same file. Change it for different drops, gusts and crackles. |
Example request
Steady rain, 6 s seamless loop
curl -X POST https://soundscapeambiencegenerator.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"kind":"rain","duration":6,"sampleRate":"44100","intensity":0.6,"density":150,"brightness":0.5,"seed":"1"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://soundscapeambiencegenerator.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
soundscape_ambience_generator - Local stdio connector:
node src/mcp-stdio.ts --tool=soundscape-ambience-generator
{
"mcpServers": {
"soundscape-ambience-generator": { "type": "http", "url": "https://soundscapeambiencegenerator.usefulweb.site/mcp" }
}
}