sleep·rain·music

About

Sleep Rain Music is a free website for falling asleep that layers three sounds you mix yourself: live rain, sleep music that the rain plays note by note, and white, pink or brown noise. All of it is generated in your browser.

What is happening when it plays

Three small programs run on your device. The composer decides, beat by beat, whether a drop falls and which note it carries, using the key, the scale and the chord of that moment. The sound engine synthesises the instrument and the rain with the Web Audio API built into your browser. The picture releases each drop early enough that it lands on its line of the staff at the exact moment you hear it.

Nothing is streamed and nothing is recorded, so there is no loop to notice. The same seed always produces the same piece, which is how shared links and the station work.

The instruments

The piano uses a hammer-shaped harmonic spectrum on two slightly detuned strings. The choir is three voices per note through the resonances of a slowly closing vowel. The glass bells are pairs of slightly mistuned FM tones. The harp is a plucked-string model, the strings a four-voice bowed ensemble, and the celesta a set of struck-bar overtones. Every note also sends a soft halo an octave above it into a long reverb, with drifting stereo echoes. Melodies are remembered as short motifs and return in new places, and chords move by the smallest steps between them. The harmony leans on Lydian and Dorian, two modes known for their floating, unresolved colour.

The rain is built from thousands of tiny bursts of noise every second, each one a drop landing: distant drops that merge into a soft wash, a warm low roar of water on the ground, and close drops that each have their own colour, from bright taps to dull splats, placed around you. The noise layer is white, pink or brown noise calculated sample by sample, so it never repeats.

Make it yours

Everything can be changed while it plays. Tap Rain, Music or Noise in the player for quick options, or open all settings for the full set: nine kinds of rain, six instruments, the pace and density of the music, the size of the space around it, three noise colours, three looks (violet night, black and blackout), four backgrounds, the clouds and colour of the rainbow fall, a sleep timer, a dim screen, and a mode that hides the controls until you need them. Your choices are kept on your own device.

← Back to the rain

Ethereal piano & rain
— · piece