Turning the HomePod Mini into a Noise Machine

My wife insists on brown noise when she’s sleeping, and white noise for when our kids sleep. We only had one noise machine that we purchased years ago for the kids. It still works great. It’s hooked up to a smart outlet and automatically turns on when it’s time for the kids to go to sleep.

That leaves our bedroom. To get the particular noise she prefers, she has to fiddle with the MyNoise app on her phone (which sometimes loses her preset), move the phone in the right position, and adjust the volume. I wanted to automate this to make her bedtime routine just a tad easier.

Now the easy solution would just be to buy another old school noise machine and hook it up to a smart outlet.

But I had a HomePod Mini laying around.

So I spent a few hours geeking out trying to get the HomePod Mini to work with Apple Music / iTunes Match. Here’s what worked:

  1. Purchase wife’s favorite brown noise track. You’ll note this track, at 68hz, is only 1.5 minutes long. None of the hour+-long options available had the right pitch or tone – some were too deep and scary, some were too high pitched and staticky. The 68hz one turned out to be the Goldilocks track.
  2. Convert the track to WAV format in preparation for looping it into an hour. Why does it need to be looped? Because if you just stick it on repeat, you’re going to hear a pause every 1.5 minutes. Gets annoying fast if you’re trying to sleep.
  3. Make 40 copies of the track, and crossfade those copies into one file with FFmpeg. (Huge thanks to Gyan Doshi at SuperUser for figuring this out!) This is also documented at FFmpeg’s site.
  4. Convert the resulting almost-1-hour long WAV file back into M4A format and upload it to iTunes Match.
  5. On the iPhone, open the Home app. Add an automation to automatically play the above track and turn off the bedside light at a pre-set time. (or when we say Hey Siri, Good Night)
HomePod Mini Automation in Home app
HomePod Mini Automation in Home App

You may ask, why not just use the sounds built into the HomePod or the sounds built into the iPhone? Because my wife hated all those sounds. Now she has the perfect sound for her, looped, with no pauses*, helping her fall asleep faster without any fiddling around. If she sleeps soundly, I sleep soundly. It was fun to get this accomplished! Hope this helps someone else searching for the perfect dream machine.

* Technically, there’s a brief pause after a little under an hour while it loops. But by this time, we are almost always long asleep. Also note that iTunes Match’s maximum track length is 2 hours, so don’t go crazy with your loops.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s