PyBadge-Powered Daft Punk Word Clock
Ben Combee's clock plays an MP3 of Daft Punk's "Harder, Faster, Better, Stronger," while the lyrics are displayed in a word clock style.
Word clocks produce signals used to synchronize other devices, such as digital audio and CD players, and are so named as they clock each audio sample, which is translated into data words. Software engineer Ben Combee designed his word clock to pay homage to techno music duo Daft Punk and plays the hit song "Harder, Faster, Better, Stronger."
The clock was made using an Adafruit PyBadge, which packs an ATSAMD51J19 microcontroller, 2 Mb of SPI flash and a 1.8" 160 x 128 TFT display. It also has eight game/control buttons, five NeoPixel LEDs, triple-axis accelerometer, light sensor, mini speaker and a class D speaker driver. The clock draws power via a LiPoly battery port with built-in recharging capability. Additional features include a USB port, a pair of headers with Feather compatibility, JST ports, a reset button and an on/off switch, all packed into a 3D-printed case.
An audiomp3 module handles MP3 audio playback with audiomixer to handle the volume levels. Because the Daft Punk song was around 7Mb in size, and the PyBadge is only equipped with 2Mb of storage, Combee used Audacity to mix the file down to 1.2Mb of mono sound. Getting the actual word clock to function was a tedious process.
"I found lyrics, separated out all the words onto their own lines, converted to lower case, sorted them, ran a unique filter to remove the duplicates, then went through and looked for any weirdness," Combee notes on his project page. "In the end, the song has only 19 unique words, with two of those variations that can share space in the clock. I tried for an 8 x 8 layout, but there wasn't enough room, so with some reorganization, I got the 12 x 7 matrix."
While the Daft Punk Word Clock works, the limited storage restricts music fidelity, and the synchronization buffering is slightly off. Combee rectified the buffer issue using a CircuitPython patch and adjusted the scaling to make the VU meter show while playing.