Vercel CEO Guillermo Rauch just built an incredibly detailed vinyl record player simulation using WebGL2, Web Audio, and real-time physics. But here's the fascinating part: it doesn't simply play an audio file with a vintage filter. It converts music into the physical geometry of a vinyl groove, then simulates a stylus tracking that groove 384,000 times per second. The sound you hear is calculated from the electrical signal that this movement would induce in a real phono cartridge. And yes, you can scratch the record like a DJ. Here's how the simulation works: • Physical groove generation: audio is converted into a spiral stereo groove with millions of geometric samples. • 384,000 samples per second: a simulated stylus continuously follows the groove walls to reconstruct the audio signal. • Realistic cartridge physics: models stylus contact, cantilever movement, tracking force, friction, and tonearm mechanics. • Natural vinyl imperfections: crackle, pops, surface noise, and distortion emerge from simulated dust, scratches, and groove geometry. • Wow and flutter: speed variations, off-center records, and mechanical imperfections affect the resulting sound. • Inner-groove distortion: high frequencies become less accurate near the center of the record, just like on real vinyl. • Interactive turntable: drop the needle, change playback speed, scratch the record, or even knock the table to make the stylus skip. • Custom vinyl records: upload your own audio and let the simulation cut it into a virtual record. • WebGL2 visualization: the spinning vinyl, groove geometry, and stylus are rendered directly in the browser. • Open-source code: the entire project is available on GitHub under the MIT license, so you can modify it, experiment with the physics, or deploy your own version. The simulation even includes different stylus shapes, adjustable tracking force, anti-skating, dust, scratches, and record warping. The really impressive part is that vinyl imperfections aren't simply layered onto the audio as prerecorded effects. They arise from the interaction between the simulated needle and the record's geometry, although some physical parameters are manually calibrated. This is an unusually creative combination of computer graphics, digital signal processing, mechanical simulation, and browser technology. And it's a great example of how sophisticated physical systems can be modeled using JavaScript and modern web APIs. Try the interactive vinyl simulator: https://vinyl-gl.vercel.app/ Open-source GitHub repository: https://github.com/rauchg/vinyl Created by Guillermo Rauch, CEO of Vercel. Would you use this as a music player, or is the physics simulation itself the most interesting part? #VinylSimulator #WebGL2 #WebAudio