WakeSlow

A Contextual Slow-Wake Alarm Clock Hack

WakeSlow gently wakes you to the sounds of sizzling eggs and bacon, birds, and your local weather by slowly fading in over time.

Nearly 10 years ago, Matt Wolfe and I made Warmly, one of the first popular slow-wake alarm clock apps. Warmly has since been retired, but that same functionality can now be streamed directly to any smart speaker for free without needing a dedicated app. And with proper speakers playing the sounds, the morning birdsong or rain shower can actually sound good -- like you accidentally fell asleep with the window open until you wake up enough to realize it's the speaker on your nightstand.

To use WakeSlow, just set your alarm a few minutes early to give yourself time to wake up. And if the gentle sounds aren't quite enough, the music changes to old-timey jazz to get you going after the 5 minute ramp-up.

All code and audio content is open source and CC0/PublicDomain, respectively -- have fun!


How's it Work?

On the surface, WakeSlow works just like a music playlist or internet radio stream. And that's exactly what your speaker thinks it is. So far, so good.

But unlike a standard M3U playlist or stream, the specific content that is chosen is dependent on the weather at your location, your desired activity, and has a pre-baked 5 minute volume fade specifically designed not to startle you awake.

For example, here's what WakeSlow sounds like on a sunny day with breakfast sounds near a park. Naturally, the first 15-30 seconds are very quiet as the sound slowly fades in.

Then after that contextual slow-fade audio track, a randomized playlist of public domain jazz is played to ensure you won't sleep through it, like this one.

By mimicking a realtime contextual event (like the weather outside your window), the experience of waking up remains grounded in reality and can actually inform what to do next, like which shirt or shoes to wear depending on if it's sunny or raining.

Use the stream customizer to jump right in. Below that you'll find more detailed instructions and technical details about how it works.


- - - - - - - - - - - - - - - - - - - -

WakeSlow Stream Customizer

Weather Location:

Activity:

Copy and paste this URL into your smart speaker's app when ready. See "Adding WakeSlow to Your Speaker" for more detailed instructions.


- - - - - - - - - - - - - - - - - - - -

Adding WakeSlow to Your Speaker

  1. Customize WakeSlow above by setting your location (for realtime weather) and activity.
  2. Copy the resulting URL (highlighted in green). This is a dynamic M3U playlist that many smart speakers can read as a custom "radio" or "playlist" source.
  3. Open your smart speaker app and add the URL. I used the Sonos app since I have a Roam in my bedroom; to add it I tapped the music icon at the bottom, selected TuneIn, My Radio Stations, and then Add New Radio Station (via the 3 dots at the top right). Paste the URL and give it a name, like "WakeSlow Weather" so you can find it later.
  4. Before you set the alarm, it's a good idea to try it out and make sure everything is working. Again, in the Sonos app I went to TuneIn > My Radio Stations > WakeSlow Weather and it started playing (reminder: the first 30 seconds or so is intentionally very quiet).
  5. Add an alarm for your smart speaker that uses WakeSlow. In the Sonos app, I tapped the gear icon at the bottom, then System, Alarms, and Add Alarm. From there I could set which speaker(s) to use, the time for the alarm, the volume (~50% on a Roam is plenty), and most importantly, the Music as "TuneIn > My Radio Stations > WakeSlow Weather."


Under the Hood

WakeSlow is a small, open source PHP script (only ~65 lines) and a range of public domain audio files (via FreeSound.org, OpenMusicArchive.org, Jazz-On-Line.com, Free 20s Jazz Collection) that have been mixed, blended, and faded to produce various soundscapes.

The PHP script takes parameters for latitude, longitude, and activity, then makes a quick call to the OpenWeatherMap API, reads the weather data, and responds with M3U text commonly used by streaming radio stations and playlists.


What's Next

WakeSlow is fully functional, but so far it's just scratching the surface of what's possible.

The most natural way to extend WakeSlow would be to add more specific weather, activity, and geographical combinations to produce an even more nuanced and varied output. Parameters such as ramp-in time or alarm content could also be added to allow for more control over the experience.

But after building WakeSlow, it's clear that there's something bigger going on here. I typically spend my days hacking on low-level hardware and software, but hacking the content itself is a brave new world. Additionally, using CC0 media as the content foundation allows for experimenting much more broadly than being stuck inside DRM sandboxed music services.

Feel free to extend, modify, copy, etc. anything you see here. It's all open source and CC0 for your amusement, use, and continued experimentation.


Sleep well, and happy hacking!



Nov 2, 2022
Questions? Adam Kumpf