Table of Contents

Audio

Add Add Component > Puddlecraft > Puddlecraft Audio (PuddlecraftAudio) to any object in the scene. One per scene is all you need.

It plays three things: the rain itself, drips landing, and spouts pouring. All of it follows the controller's rain intensity, so you'll need a Puddlecraft Controller in the scene too.

The rain

The rain isn't one looping clip. It's built from ten frequency bands, from a deep rumble (band 0) up to a bright hiss (band 9). Each band is a pair of looping stems that crossfade into an endless sound, so you never hear the loop repeat.

How loud each band plays comes from four preset curves on the component:

Curve When it's used
Light Light rain. Used alone below an intensity of 0.2.
Medium Medium rain. Blends in between 0.2 and 0.5 and out between 0.55 and 0.9.
Heavy A downpour. Used alone above an intensity of 0.9.
Covered Heard from under cover in a downpour: mostly low drumming, with the bright hiss gone.

Each curve runs across the bands (deepest on the left) and up to that band's level, from 0 to 1. A band's volume is its level cubed, so the curves behave like faders on a mixing desk.

The rain fades in over the first 0.15 of intensity and is silent when it isn't raining. Silent bands are paused, so dry weather plays nothing at all.

Setting What it does
Rain Volume Volume of the rain, 0 to 1.
Level Fade Seconds for the bands to follow a change in intensity or cover (0.05 to 5).
Output Mixer group for every Puddlecraft sound: rain, drips and spouts.

Sheltered sound: Cover Volumes

Until you say otherwise, the rain sounds open everywhere. Cover Volumes are the audio zones. When the audio listener is inside one, the rain blends from the open curves towards Covered, and drips and spouts are turned down, to as low as 40%.

The usual setup is one volume per building with its Rain Sound all the way down, plus a nested volume in the doorway that a door script opens with Openness. Volumes blend in over their Falloff, so walking indoors is a gradual change rather than a switch.

Volumes only change the sound, though. Whether rain reaches the ground comes from the rain cover, unless the volume has Blocks Rain on.

Turn on Show Cover Probes in the Puddlecraft overlay to see how loud the rain will be around the selected volumes.

The listener is the first enabled Audio Listener in the scene. Without one, the component's own position is used.

Drips

Each drop that falls off a drip edge and lands near the listener plays one of the Drip Clips, picked at random. Its pitch lands somewhere between 0.9 and 1.12 and its volume between 60% and 100% of Drip Volume, so a run of drips never sounds like a metronome. The same clips play on every surface.

Setting What it does
Drip Clips The one-shots to pick from. The package includes six recorded drips.
Drip Volume Volume of the drips, 0 to 1.
Drip Distance Drips farther than this from the listener aren't played, in metres.
Max Drips Per Second However many drops land, at most this many play each second (1 to 60).

Spouts

Each rain spout that has a stream plays the Spout Stream loop where its water lands, louder as more water flows. A wider spout (its Width) plays the loop lower and louder: twice the default 6 cm width is about 16% lower and 40% louder.

Each spout also starts the loop at a random point and is detuned by up to 3%, so several spouts never sound in step. Spouts can be heard up to one and a half times the Drip Distance.

Setting What it does
Spout Stream The loop. The package includes a recorded downspout.
Spout Volume Volume of the spouts, 0 to 1.

The included drip and spout clips are CC0 recordings, credited in the package's Third Party Notices. Swap them for your own on the component whenever you like.

From scripts

  • exposure: how exposed the listener is right now, from 0 (fully under cover) to 1 (out in the open). Use it to drive your own effects, such as a low-pass filter on other sounds.
  • rain gives you the bands and curves (RainSoundscape); Level returns a band's level for any intensity and exposure.
  • Every setting above has a property: rainVolume, dripClips, spoutStream, output and so on.
  • dripLanded fires for every drop from a drip edge that lands, with its position and whether it fell in water, in case you'd rather play your own drip sounds. In Play mode, when the controller's Simulate Within is above 0, only drops within that distance of the camera count.