Free generator · Runs in your browser

Music box generator Your tune, on a crank.

Write a melody or pick a tune, hear it, and print a hand-cranked music box: a pinned drum that plays it once per turn, a comb with a tooth for every note, a frame and a crank.

  • Private by designNothing leaves this device
  • Any melodyType it or draw it
  • No supportsPins with 45° undersides
  • Ready to sliceEvery part its own object

Drag to rotate · Scroll or pinch to zoom · Arrow keys when focused

Size
—
Filament
—
Parts
—
Fits
—

Start from

Melody

Load a tune

Note names with an octave number: C5, F#4, Bb4. One beat each; add :2 for two beats or :1/2 for half a beat. Join a chord with + (C5+E5), rest with R, and use | for bar lines.

Click a cell to add or remove a note. With the keyboard: arrow keys move, Space or Enter adds or removes the note under the cursor, Page Up and Page Down jump an octave, Home and End jump to the start or end. The text box above and the roll always match.

120 beats/min
One turn of the crank plays
0 semitones

Moves every note up or down. Higher notes give shorter, livelier teeth.

Comb

What plays the notes
Comb material
1.5 mm

Thicker teeth are longer for the same note, and louder. Use a multiple of your layer height.

2.6 mm
0.8 mm

Each tooth starts a little long, so it sounds a little flat. Trim the tip to bring it up to pitch.

The example is only a placeholder. Use the list that came with your comb, or check each tooth with a tuner app. Repeat a note if two teeth play it.

Centre to centre. Measure across ten teeth and divide by ten.

Centre to centre of the comb’s two mounting holes.

The example is only a placeholder: use the note list printed on your movement or its sample strip.

Measure the sample strip: across all rows, divided by the rows minus one.

0.4 mm

Paper-strip movements expect card about this thick. A printed strip is stiffer than card; it also works as a template to mark card.

Drum

8 mm/s

How fast the drum’s surface passes the comb at the set tempo. With the tune’s length it sets the drum’s size: faster gives a bigger drum with more room between pins.

1.2 mm
0.6 mm

How far each pin lifts its tooth. The comb sits this far into the pins’ path; the rest of the pin height is clearance over the drum.

A strip movement has its own drum and comb: this mode makes only the punched strip.

Colours

Preview

Download

Building the preview…

Print it well

    Everything is built on this device. Nothing you type or upload is sent anywhere.

    Advertisement

    The method

    How to make a music box that plays your tune

    Type a melody or load a tune, and the generator gives the comb one tooth for every note the tune uses, works out each tooth’s length, and sets a pin on the drum for every note: around the drum by its beat, along the drum by its tooth. One turn of the crank plays the tune.

    1. Write the melody in the text box or on the piano roll, and press Play preview to hear it.
    2. Pick the comb: printed in PLA or PETG, a metal comb you have measured, or a strip for a paper-strip movement.
    3. Set the drum: tempo and surface speed give its size; pin height and overlap give the pluck.
    4. Print, assemble and tune: trim each tooth tip until it matches a tuner app.

    The comb

    How long is each tooth?

    Each tooth is a small cantilever: clamped at the heel, free at the tip. Its first ringing frequency is

    f = (1.875² ÷ 2π) × (t ÷ L²) × √(E ÷ 12ρ)

    where t is the tooth’s thickness, L its free length, E the plastic’s stiffness and ρ its density. Solving for L gives each tooth’s length. A note an octave higher needs a tooth about 0.71 times as long.

    MaterialStiffness E (flexural, printed flat)Density ρA5 (880 Hz), 1.5 mm thick
    PLA3.1 GPa1.24 g/cm³20.9 mm
    PETG1.7 GPa1.27 g/cm³17.8 mm

    Treat these lengths as a starting estimate. Printed teeth vary a lot: layer bonding, infill, the clamp at the heel, temperature and the brand of filament all change the pitch, often by a semitone or more. That is why each tooth starts 3% long. Plastic teeth also ring softly and briefly next to a steel comb: expect a gentle, wooden plink rather than a chime.

    Tuning

    Tuning the comb

    • Too flat (low): trim or sand the tooth tip a little at a time. Shorter is higher.
    • Too sharp (high): sand the underside of the tooth near the heel to thin it. Thinner is lower.
    • Check each tooth with a free tuner app: pluck it and read the note. Give it a few seconds; tooth tips warm and settle.
    • Dull or buzzing teeth: make sure the heel is screwed down firmly and the tooth is not rubbing its neighbour.

    Assembly

    Putting it together

    1. Screw the comb onto its block with two M3 screws 10 to 12 mm long; they cut their own thread in the pilot holes.
    2. Slide the axle through one cheek, the drum and the other cheek. The axle is octagonal, so the drum turns with it.
    3. Push the crank onto the axle on one side and the collar on the other.
    4. Turn the crank clockwise as you face it: the pins rise under the comb and lift each tooth until it slips off at the tip.
    SettingWhat it doesDefault
    TempoBeats per minute; with the tune’s length, sets how long one turn takes120
    Drum surface speedDrum circumference = beats × speed × 60 ÷ tempo8 mm/s
    Pin heightHow far pins stand off the drum1.2 mm
    Pluck overlapHow far the pins reach into the teeth0.6 mm
    Tooth thicknessThicker teeth are longer and louder1.5 mm

    Printing

    Printing tips

    • No supports: the drum prints standing with its pins pointing out sideways; each pin has a 45° underside. The frame’s axle holes are teardrops, and the axle lies on a flat face.
    • Comb: print flat, teeth down, at 100% infill or with enough walls that the teeth are solid. Use a layer height that divides the tooth thickness.
    • Drum pins: a 0.4 mm nozzle and 0.12 to 0.16 mm layers keep the pins crisp.
    • Metal combs: very small combs need pins finer than most printers can make. Combs with a tooth pitch of 2 mm or more work best.

    Questions, answered

    Is it free to use?

    Yes. No account, no watermark, no limits.

    Will it fit my printer?

    Pick your printer below the preview and choose “Laid out to print”: the parts spread over as many plates as needed. A long tune makes a bigger drum; lower the drum surface speed or raise the tempo to shrink it.

    How good does a printed comb sound?

    Softer and shorter than steel, and the tuning is approximate until you trim it. It is a lovely, gentle sound, but it will not ring like a store-bought music box. For a brighter sound, use a metal comb and print only the drum and frame.

    Can I sell music boxes I print?

    The designs you make are yours. The built-in tunes are in the public domain in the United States; check any other melody’s copyright before selling it. The box has small parts, so check toy-safety rules before selling for children.

    Sources

    Print advice is a starting point drawn from these references, checked on 2026-11-12. Community posts are one maker's experience, not a specification.

    1. Prusament PLA technical data sheet (flexural modulus, density) Prusa Polymers
    2. Prusament PETG technical data sheet (flexural modulus, density) Prusa Polymers
    3. Euler–Bernoulli beam theory: cantilever vibration Wikipedia
    4. US judge approves “Happy Birthday” settlement World Intellectual Property Review
    5. Web Audio API MDN Web Docs