There's a pattern in computer science called a sliding window. You process data by only looking at a small moving section of it at a time — a window that slides forward while everything outside it is ignored. You have an array. You have a pointer. The pointer moves across the array, and you track what's inside a fixed range. Everything outside the window might as well not exist. You're optimizing for what's in front of you. The bounds move, the pointer moves, and you solve the problem by only looking at what matters right now.
The piano is the pointer.
I should probably explain.
Sliding Window is an interactive film for mobile. There is no play button, no UI, no text, no menu. You open it. You see a ship on a river at night. Fog on the water, Spanish moss on the far bank, distant shore lights, a low moon. You tilt your phone and the world responds — the ship rocks, the water shifts, the light changes.
You tap the ship. The screen fades to black. You're inside now.
A ballroom. Wood-paneled walls, polished floor, three chandeliers hanging from the ceiling. Three tall windows on the far wall. Through the glass, you can see the same river you just left — dark, calm, a few amber lights on the far shore.
In the center of the room: a grand piano.
Here's the thing about a piano on a ship. If the ship rolls, and nothing is bolted down, the piano moves. You tilt your phone left and the piano slides left. Tilt right, it slides right. It has weight and momentum. It accelerates. It hits the wall and bounces. And as it slides, the keys play themselves — struck by inertia, not fingers. Slow drift, one note. Fast slide, a cascade. The chandeliers swing with the same tilt. Candle flames flicker harder the more the room moves.
You are the storm. The phone is in your hands. You're the one tilting the world.
This is where the sliding window happens. Not the computer science kind — or actually, exactly the computer science kind. You're inside the window. The piano is traversing the room like a pointer moving through an array. Your attention is bounded by the walls of the ballroom, the warmth of the candlelight, the satisfaction of making the piano move. Everything outside the window — the river, the sky, the weather — you're not looking at it.
But it's changing.
The fog outside the windows lifts. The waves get a little bigger. You don't notice because you're tilting the piano. The shore lights dim. Clouds form. The piano slides further with each tilt now — was it always this responsive? The chandeliers swing wider. Rain starts streaking down the window glass. You might see it. You might not. You're watching the piano.
By the time you go back outside, the world is different. The fog is gone. The fireflies are gone. The shore lights have vanished. The moon is behind clouds. The water is rough and dark and the rain is falling and you don't know when any of this happened. You were inside. You were absorbed. The storm arrived while you were playing.
This piece has three parents.
The first is The Legend of 1900 — Giuseppe Tornatore's film about a man born on an ocean liner who never steps onto land. There's a scene where the ship hits a storm and the piano breaks free from the floor. It slides across the ballroom. 1900 doesn't fight it. He sits at the bench and plays into the momentum, riding the piano across the room like it's the most natural thing in the world. His friend Max holds on for his life. The chandeliers swing. The whole room is moving.
I wanted to hold that scene in my hands.
The second is, genuinely, the sliding window pattern from LeetCode. I know how that sounds. But the structural parallel is exact: a pointer traversing a bounded range, the window shifting while you're focused on what's inside it, the world outside the window changing without your attention. The piano is i. The walls are the array bounds. Your tilt is the condition function. The storm building outside is like time complexity growing while you're not watching. I spent a lot of time with sliding window problems. Eventually one slid back.
The third one came from Moss Landing.
I was kayaking at Moss Landing. The water was calm and there were sea otters nearby, floating on their backs. Birds moved across the surface of the water, and the light kept shifting in ways I couldn't stop watching.
I kept following the scenery — the otters, the light on the water, the quiet movement of the ocean.
When I finally looked up, everything had changed. The sky was darker, the water rougher. I wasn't sure which direction to go. Everything looked the same. I called the kayak company and they told me to look for two towers and paddle toward them.
The day was getting dark. The water was getting less calm. On the way back I passed dead birds floating on the surface. And alongside me, very close, a large bird was swimming parallel with the kayak, keeping pace. Sitting in the kayak, it felt almost as tall as I was. I knew it was observing me, even though it never turned its head. Its eyes were set on the sides of its head, so it could watch me easily while still swimming forward.
For a moment I wanted to keep watching it. But I knew if I focused on the bird I might lose the direction and slow down. I had to keep paddling.
I made it back. But I've thought about it a lot since then. I went inside the beauty. I followed the otters and the light. And the window moved without me.
The piano uses real physics — gravity, friction, bounce coefficients that scale with the storm. The music is procedurally generated: a blues scale, slightly detuned to sound like an old upright in a room with the windows open, with notes triggered by the piano's velocity. The storm evolves on a continuous curve over approximately three minutes of time spent inside the ballroom. Every visual element responds to tilt — the chandeliers are driven by pendulum physics, the waves use layered sine functions, the rain streaks follow the angle of your phone.
No pre-recorded audio. No pre-rendered video. No script. The film is generated in real time from your movement. Every viewing is different because every tilt is different. You can't watch it the same way twice.
The piece requires a mobile device. You can experience it on desktop with mouse movement, but it's designed to be held. The tilt is the whole point. You're holding the ship. You're rocking the room. The phone is the ocean. And while you're playing the piano, the storm is already coming.
I called it Sliding Window because it's funny and because it's true and because the funniest things usually are.