Home▸Toys & Play▸Music Box Pin Cylinder & Comb (2D)

🎵 Music Box Pin Cylinder & Comb (2D)

Program pins onto a rotating barrel and watch them pluck a metal comb as it turns — the real mechanism inside every wind-up music box, laid out as a scrolling piano-roll view.

Toys & Play2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-music-box-mechanism-gear-train ↗ Open standalone

This is the 2D companion to the 3D Music Box Mechanism: pins fixed to a rotating barrel are shown on a scrolling piano-roll grid, one row per comb tine. When a pin crosses the dashed playhead line it "plucks" that tine, glowing and decaying just like the physical comb. Click anywhere on the roll to program your own pin pattern.

⚙ Under the hood

Each pin carries a fixed angle on the barrel; a revolution counter fires a pluck exactly once per pass regardless of rotation speed, and each tine's glow decays exponentially after being struck.

music boxpin cylindercomb mechanismpiano roll

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)