← sleepdrift.app

Why a looping sleep sound wakes you up

And why hiding the join is the easy half of the problem.

The click at the seam is not what wakes you. The regularity is. Hearing is extremely good at finding anything that recurs on a fixed period — it is most of what the system is for. You will not count the seconds, but once your hearing has locked onto the interval, the sound stops being weather and starts being a machine. That is the moment a track you have slept through for a week becomes impossible.

What a loop actually is

A sleep track is a recording of finite length — commonly thirty seconds to a few minutes — played end to end, over and over. Everything in it returns on that period: the same gust, the same distant car, the same spatter against the same window.

Most of those events are below the level you would consciously notice on their own. It does not matter. What gets noticed is not the event, it is the interval. Regularity is a cue, and the whole reason you are listening to noise in the first place is to give your hearing nothing to attend to.

Why crossfading it does not work

The usual fix is to fade the end of the track into its own beginning so there is no click. It works, for what it is: the join stops being a defect you can point at.

But a crossfade smooths the seam. It does nothing to the period. The same rain still lands at the same moment in every cycle. You have made the repetition prettier and left it exactly as regular, which is the thing you needed to change.

This is why reviewers of sound machines so often end up recommending a mechanical fan to people who are sensitive to loops. A real fan has no period at all. Every digital machine has one, and the argument is only ever about how long it is and how well it is hidden.

So make the period long

If the repeat cannot be removed, it can be pushed past the length of the problem. Nobody minds a pattern that recurs every eleven hours; the trouble is one that recurs every eleven seconds. Three things stretch it, and they multiply rather than add.

1. More than one take, rotated irregularly

Generate several versions of the same sound rather than one, and rotate between them at intervals that are not themselves regular. Now the thing that would have to repeat is not a clip, it is a sequence of clips.

2. Enter each take at a random point

If a take is blended into a circle — its tail mixed into its own head with a wide equal-power crossfade — playback can start anywhere inside it without crossing an end. So the same take used twice is not the same passage twice. It also means the loudness has to be matched between takes, or the transition reads as a swell and you have replaced one audible event with another.

3. Run a second layer at a length that will not line up

This is the one that does the real work, and it is arithmetic rather than audio. Put a quieter bed underneath the main one at a deliberately different period. Two cycles only return to the same relative position after their least common multiple.

Two beds, one at 8.4 seconds and one at 7.1:

8.4 s × 71 = 596.4 s
7.1 s × 84 = 596.4 s
→ they realign after 9 minutes 56 seconds

Shift the second bed to 7.13 seconds and the same sum runs to hours. The closer the two lengths are to sharing no common factor, the longer before the composite comes round — and the composite is what you actually hear.

What this means for a sound machine

It means the honest claim is not “it never loops”. Finite audio played all night loops by definition, and any app telling you otherwise is describing a marketing position rather than a mechanism.

The claim worth making is that the composite does not come round while you are there to hear it. That is a real engineering property, it can be described, and you can check it: put the sound on and see whether anything ever arrives twice at a spacing you can feel.

What Sleep Drift does

Sleep Drift generates the sound on the phone from what you type, which gives it the one thing a library of recordings cannot have: more takes of the same sound on demand. It then uses all three defences above at once — several takes rotated at random intervals, each pre-blended into a circle and entered at a random offset with matched loudness, and a second bed underneath at a deliberately different length.

So: yes, it loops. What it does is make the composite effectively not recur in one night. That is the claim the mechanism supports, and it is the one worth making — a fan you can describe in words, rather than a recording with a prettier seam.

Written by the author of Sleep Drift, an iPhone app that synthesises sleep sounds on the device from a description you type. Nothing you type and nothing it makes leaves the phone.