~/todd-fleeman/case-study — session log entry

~/Betwixt Radio

started 2026-08-01 · last touched 2026-08-08
Betwixt RadioVisit Betwixt Radio (opens in a new tab)
why this exists

This is the radio station for Betwixt, a children's character world. One theme song is remixed into twelve genres, and each mix has its own release date. The DJ for the current mix slides to the center of a window above an illustrated dashboard, which has knob-style play and mute buttons, a seek bar, and a color wash that glows while music plays. Every mix is a Sanity document linked to a resident, and its date decides when it can play. It's built in Next.js and TypeScript, with the artwork imported as React components so the butterflies can fly and change color. It's live on Betwixt, so the preview links there.

built on / learned
HTML5
Graphics
Web Audio API
Learned
  • Dates do the scheduling. A mix can be entered ahead of time. The server only plays mixes dated today or earlier.
  • Two lists from one query. Every mix with DJ art goes on the slider, but only mixes that are released and have audio go in the playlist. So upcoming DJs show up before their music does.
  • One transform centers the DJ. The active index, the number of visible columns and a few CSS variables work out how far to slide the strip so the playing DJ sits in the middle. A 1.5s ease handles the motion, with no carousel library.
  • SVGs as components. Turbopack import attributes run the dashboard, knob and butterfly SVGs through SVGR at the import line, so CSS can recolor and animate them. There's no webpack config.
  • The lock screen knows the song. The Media Session API sends the resident's name, the mix title and the artwork to phone lock screens and headphone controls.
  • The seek bar works from the keyboard. It's a slider role: the arrow keys jump 5 seconds, and Home and End jump to either end.
where this might go

A station that runs on a calendar works for any kind of release. A podcast season could unlock weekly, an album could roll out track by track, or a holiday countdown could reveal a new song each day. Swap the DJ for a host and the genre for a theme, and the same dashboard could run a museum audio tour that changes with each exhibit. Give listeners a vote, and next month's genre becomes their pick.