configure-soundscape
Author and manage a scene's atmospheric sound sets: randomized interval one-shots or crossfaded ambient loops. Use library templates or custom pools, with strict validation and live status.
Instructions
Author a scene's atmospheric SOUND SETS — the house module fvtt-mod-soundscape (#6), which does what core Foundry cannot: a POOL of small audio files played at randomized intervals with silence between (a crow, quiet, a distant dog), or overlapped into a seamless crossfaded bed. AmbientSound placeables are positional single-file loops and Playlists have no silence-with-variation, so neither covers this. A scene carries any number of sets, stacked and independent. Actions: "list" (what the scene has, plus what would be playing right now and why a set is idle), "library" (browse the prebaked template catalog by section/category/name), "add" (copy a template by name, or author one from explicit files), "update" (patch one set — named fields only; files replaces the whole pool), "remove" (one set, or "all"). Defaults to the ACTIVE scene when no sceneIdentifier is given. Out-of-range numbers are CLAMPED to the module's limits and the clamp is reported, not applied silently. Audio paths are HEAD-checked: a 404 is kept and warned about (a track has no sensible substitute). Sets are inert data without the module, so this WARNS when it is missing or disabled instead of reporting a working soundscape. GM-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Set name. Required when adding from `files`; optional rename on update. | |
| files | No | Data-relative audio paths making up the pool (what upload-asset returns). On UPDATE this REPLACES the whole pool. A path that does not resolve is kept and warned about, never swapped. | |
| limit | No | action "library": maximum templates to return (default 40). | |
| query | No | action "library": match on template name, category, or section (e.g. "tavern"). | |
| action | Yes | list = the scene's sound sets (with what would be playing right now); library = browse the prebaked template catalog; add/update/remove = author them. | |
| active | No | Whether the set runs at all (default true). | |
| volume | No | Set volume 0–1 (default 0.8), under the Ambient channel. | |
| section | No | Restrict to one section. Interval Sounds = randomized one-shots; Ambient Loops = continuous beds. Filters action "library", and narrows which `template` action "add" resolves when one name exists in both sections. | |
| category | No | Restrict to a category (substring match, e.g. "Forest"). Filters action "library", and narrows `template` resolution on action "add". | |
| interval | No | Interval sets: seconds of silence between one-shots (1–3600, default 25). | |
| template | No | action "add": copy this LIBRARY template (its exact name, from action "library") — files, play style, and timing all come along. Any other field passed alongside overrides the template's value. A handful of names exist in BOTH sections, so pair this with `section` when the name is ambiguous. Omit to author a set from explicit `files` instead. | |
| crossfade | No | Loop sets: overlap between members in seconds (0.5–30, default 4). | |
| playStyle | No | interval = a random file, then `interval ± intervalVariation` seconds of silence. loop = a continuous bed, members overlapped under a crossfade. Default interval. | |
| whenToPlay | No | Darkness gate, re-evaluated live: day = scene darkness < 0.5, night = ≥ 0.5 (default always). | |
| verifyFiles | No | action "list": HEAD-check every pool file and report the missing ones. Off by default because it costs one request per file — turn it on when a set is silent and you want to know why. | |
| setIdentifier | No | Which set to update/remove — its id or exact name (ids come from action "list"; a name that matches two sets is an error, not a coin flip). On "remove", the literal "all" clears every set from the scene. | |
| pitchVariation | No | Per-play pitch jitter in OCTAVES, 0–1 (default 0). 0.1 is a subtle, natural wobble. | |
| sceneIdentifier | No | Scene id or exact name. STRICT — no fuzzy matching. Omit to target the ACTIVE scene. Ignored by action "library" (the catalog is world-wide). | |
| volumeVariation | No | Per-play volume jitter 0–1, attenuate-only — never louder than `volume` (default 0). | |
| intervalVariation | No | Interval sets: ± jitter on the silence, in seconds (default 5). Clamped to never exceed `interval`. |