Music Viz TV

A psychedelic music visualizer for Apple TV — Metal shaders meet MusicKit.

Swift Metal MusicKit SwiftUI Cloudflare Workers

The problem

Apple TV is connected to the best speakers in the house, but when playing music through Apple Music, the screen just sits there — album art on a static background. I wanted something that transforms the TV into a visual experience that responds to what’s playing.

The approach

Metal shaders generate GPU-accelerated visualizations on tvOS, while a companion Cloudflare Worker caches track analysis data and generates music facts via Claude AI. The visualizations react to pre-analyzed track characteristics since tvOS’s DRM prevents direct audio buffer access.

Music Viz TV concept showing psychedelic shader visualization on Apple TV

How it works

SwiftUI handles the app shell and MusicKit provides now-playing track data. Metal fragment shaders render the visualizations at 60fps, driven by track metadata (tempo, energy, valence) fetched from the Cloudflare Worker backend. An info overlay layer surfaces music trivia and connections — the “Pop-Up Video” element — pulling from a curated fact database.