Every payantha video starts as a small program, not as an animation. We write down the rules of a tiny world (a ring, a ball, gravity, a mirror), let it run, and record what happens. The music isn't added afterwards: each note is triggered by a collision inside the simulation. This page explains how that works, and the demo below runs on the same rules.
How a payantha Short is made
Published 2 October 2026
The world moves 60 steps per second
The simulation moves everything forward in steps of one sixtieth of a second, the same rate as the finished video. At each step gravity pulls the ball down a little and the ball travels a little. When it reaches the wall it bounces like light off a mirror: the part of its speed that points into the wall flips around (losing a little energy), and the part that runs along the wall stays as it is.
That second half matters more than it sounds. In an early version we slowed down the whole speed on every bounce, instead of only the part going into the wall. The balls lost their sideways motion and piled up in a narrow column in the middle of the ring. Nothing looked wrong in the code; it showed up when we measured where the balls ended up and compared it with how real bouncing spreads them out.
One collision, one note
Each collision plays the next note of the melody, in order. The melody keeps its notes but not its rhythm: the ball decides when the next note comes. A slow first bounce and a fast flurry at the end can belong to the same tune, and that's what makes naming the song a real challenge.
There's a timing detail you can see in the demo. A collision almost never lands exactly on a frame. It happens in between, at frame 347.6 for example. If the note started at 347.6, you would hear it a moment before the bounce appears on screen, and the whole video feels slightly off even if you can't say why. So every note waits for the first frame that shows the bounce: frame 348. When we fixed this in one of our ray videos, the hits suddenly cut through the sound instead of blurring into it.
Checking it both ways
Before a video goes out, a script goes through every collision and every note and checks two things:
- every bounce you can see has a note;
- every note you hear has a bounce.
The first rule once caught a version with 82 silent bounces. The ball was sliding along the wall with no friction, touching it again and again without really bouncing, and a filter meant to stop notes from crowding together was swallowing real bounces. We fixed the physics, adding a touch of friction, instead of hiding the problem.
Rays: the same idea with light
In our ray videos there's no ball. A lamp sends rays of light into a mirror shaped like a bowl, an ellipse or a circle, and every reflection is a note. The rounds grow from 10 rays to 100 to 1000, so the melody gets denser as the picture fills with light.
The shapes do the drawing. In an ellipse, every ray that leaves one focus reaches the other focus after travelling exactly the same distance, so they all arrive at the same moment. In a circle with the lamp on its edge, the reflected rays bunch up along a heart-shaped curve called a cardioid, a close cousin of the bright curve you can see inside a cup of coffee in sunlight. Our mirror is slightly imperfect on purpose. Each reflection keeps 35% of the brightness, so the first reflection, the one that draws the heart, stays the brightest.
Loud enough, and every hit audible
YouTube turns down videos that are too loud but doesn't turn up quiet ones. One of our early videos went out at −21 LUFS (a standard measure of loudness), clearly quieter than the videos around it in the feed. Since then we master every video to around −14 LUFS, the level YouTube aims for, without clipping.
Loud enough isn't the same as clear. We also measure how much the sound jumps at each collision, comparing the moment just after the hit with the moment just before. In the bounce videos we measured, a typical hit jumps by close to 9 decibels. When notes ring for too long they pile on top of each other and the hits stop standing out, so we keep the notes short.
Where the music comes from
Every melody is in the public domain, and none of it is a recording: the notes are typed in and synthesized. How we decide that a melody is safe to use is explained in How we check that a melody is public domain. To hear the same idea as a game, try Name This Song.