mix_sounds
Layer multiple sounds into a single scene such as a storm or busy street by combining recipes, audio files, and custom generators with precise timing and volume control.
Instructions
Layer several sounds into one scene, such as a storm, a busy street or a haunted room.
layers is a list of dictionaries. Each has exactly ONE source:
{"recipe": "wind", "intensity": 1.0, "style": "howling"} a NoiseSmith recipe
{"file": "sounds/thunder.wav"} an audio file (wav, flac, ogg, mp3)
{"generator": {"type": "noise", "color": "brown", "duration_s": 3, ...}} a custom sound
A recipe layer also takes that recipe's intensity, size, style, duration_s and seed.
Every layer can set: gain_db (volume in decibels, 0 default, -6 half as loud), start_s,
length_s, fade_in_s, fade_out_s, speed (below 1 lower and slower), and repeat_every_s with
repeat_jitter (0 to 1, uneven spacing), repeat_count and speed_jitter to repeat the sound
through the scene. Example, a storm:
[{"recipe": "wind", "intensity": 0.9, "style": "gusty", "duration_s": 20, "gain_db": -3},
{"recipe": "rain", "intensity": 0.8, "duration_s": 20, "gain_db": -6},
{"recipe": "impact", "style": "stone", "size": 1.0, "intensity": 0.6, "gain_db": -12,
"start_s": 4, "repeat_every_s": 9, "repeat_jitter": 0.6}]
A custom generator is {"type": "noise" or "tone", "duration_s", "color" (white/pink/brown),
"wave" (sine/triangle/square/saw), "freq_hz" (a number or {"from": hz, "to": hz}),
"filters" (a list of lowpass/highpass/bandpass with freq_hz and q) and "envelope"
(attack_s, hold_s, decay_s, release_s)}. Generators are for machinery, sci-fi and similar
sounds, not animals or voices.
duration_s is the length of the whole scene (up to 120 s). loop, loop_crossfade_s,
format and loudness work as in create_sound. If the layers add up too loud, the mix is
turned down to stay clear of clipping. Scenes made only from recipes and generators are
CC0; a file layer carries whatever license that file has.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| loop | No | ||
| name | No | ||
| seed | No | ||
| format | No | wav | |
| layers | Yes | ||
| loudness | No | ||
| duration_s | Yes | ||
| output_dir | No | ||
| description | No | ||
| loop_crossfade_s | No |