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, every half-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 place on the staff just as you hear it.

Nothing is streamed and nothing is recorded, so there is no loop to notice. (Very old browsers that cannot run the live rain engine fall back to short repeating loops of rain and noise; the music is still composed live.) The same seed, on the same page with the same settings, 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. With Shimmer on (the default), 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 glide into each other, each note placed close to where the last chord sat. The harmony leans on Lydian, with its floating colour, and Dorian, a gentler shade of minor.

The rain is built from up to 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 (on the station, the piece, its instrument, pace and note density are shared, so those stay fixed). 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, how much the music echoes around you, 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 settings are remembered only on your own device.

← Back to the rain

Ethereal piano & rain
— · piece