
A pan flute is a row of pipes closed at the bottom. Blow across the open end and the air column inside resonates; its length decides the note. A pipe closed at one end sounds a quarter of a wavelength, which is why a pan flute needs only half the length of an open flute for the same note.
The LyraMaker Pan Flute Generator calculates every pipe from the speed of sound, the note frequency and the bore, joins the pipes in a gently curved row that follows your lips and engraves the note name on each closed end.
The LyraMaker Pan Flute Generator makes a playable pan flute in one piece. Choose the lowest note, a major, minor or pentatonic scale, the number of pipes and the bore; the generator works out every pipe length and shows the table on the left, so you can check it against a tuner when the print is done.
A pipe closed at one end resonates when its length is a quarter of the wavelength, so the ideal length is L = c / (4 f), with c the speed of sound and f the frequency. The air at the open end vibrates a little beyond the rim, so the pipe sounds as if it were longer; this end correction is taken as 0.61 × r, the textbook value for an open, unflanged pipe end of radius r, and it is subtracted from L. The speed of sound is c = 331.3 × √(1 + T / 273.15) m/s, which is 343.2 m/s at the default 20 °C.
As an example, an A4 of 440 Hz with a 12 mm bore needs 343.2 / (4 × 440) = 195.0 mm minus 3.7 mm, so 191.3 mm of air. The closed end inside each pipe is a cone at 45° so it prints without supports; a cone holds a third of the air of a cylinder of the same height, so the straight part of the bore is made shorter by one third of the radius to keep the same air volume. Note frequencies use equal temperament with A4 = 440 Hz.
The formula gets each pipe close, but not to the cent. How much of the mouth your lower lip covers, the angle you blow at, your warm breath and small printing errors all move the pitch, typically by a few cents and sometimes by a quarter of a semitone or more. Check every pipe with a tuner app and correct it:
A pipe that sounds too low is too long: drip a little melted beeswax or push a small ball of modelling clay down to the closed end, which shortens the air column and raises the note. A pipe that sounds too high is too short: it can only be fixed by reprinting it longer. That is why the extra length slider exists: with 2–3 mm extra, every pipe starts slightly low and you tune each one up with wax.
The lowest note sets the size of the whole flute: G4 needs a pipe of about 220 mm, C5 about 167 mm including the closed end, and every octave higher halves the length. Eight pipes in a major scale give one full octave; a pentatonic scale has no semitones, so any combination of pipes sounds good together, which makes it the friendliest choice for beginners and children. A bore of 10–14 mm suits most players. Narrower high pipes, the default, are easier to play because a short, wide pipe takes a lot of air. The row curve lets the mouths follow your lips as you turn your head from pipe to pipe; set 0 for a straight row.
Print the flute as it comes, mouths down on a clean, smooth bed. To play, rest the open ends against your lower lip, keep your lips relaxed and blow a thin stream of air across the opening, not into it, as if blowing across a bottle. Small pipes need less air than large ones.
A wind instrument goes into your mouth. Wash the flute with lukewarm soapy water and let it dry, do not share it between people, and keep in mind that layer lines can trap moisture. Printed plastic is not certified food-safe, even when the filament itself is.
The generator makes pipes in one row for one scale; it does not make chromatic two-row flutes. Notes above about 2700 Hz are left out. Flutes wider or taller than 250 mm are reported in the size line, so check that your printer can take them, or choose fewer pipes, a higher lowest note or a narrower bore. The sound of a printed flute is softer and breathier than one made from cane or wood, but it is a real, playable instrument.
Pan flutes are built with OpenSCAD WebAssembly in your browser — nothing is uploaded. For another instrument to blow, try the whistle generator; for a toy that surprises, the spinning top; or explore every LyraMaker generator.
It will be close. Each pipe is calculated from the speed of sound and the note frequency with an end correction, but the way you blow and small printing errors shift the pitch a little. Check each pipe with a tuner and raise the low ones with a drop of beeswax at the closed end.
A pipe closed at one end sounds an octave lower than an open pipe of the same length, so a pan flute can be short and still reach low notes. The closed end also makes the pipe easy to play by blowing across the top.
Pentatonic is the easiest, because every note goes with every other one. Major gives a complete octave for melodies and folk songs. Minor gives a darker, more melancholic sound.
Use 20 °C for a flute played indoors. Warm breath raises the air temperature in the pipe while you play, so the pitch creeps up by a few cents; if your flute sounds consistently sharp, set a slightly higher temperature and print again.
Yes for school-age children with adult supervision, as long as it is kept clean and not shared. The pipes are open tubes with no small loose parts. Very young children should not chew on printed plastic.