How the Virtual Pan Flute Works
The virtual pan flute uses a sine-wave oscillator with subtle white-noise breath simulation (5% mix) and a slow 80ms attack envelope. Real pan flutes are end-blown pipes tuned by length — the longer the pipe, the lower the pitch. Our tubes progressively lengthen across the octave to mimic this physical reality visually.
Cultural Heritage
Pan flutes — also called nai, antara, or zampoña — are central to traditional Andean music from Peru, Bolivia, and Romania. The Romanian nai tradition inspired composers like Georges Enesco and Béla Bartók, while Andean ensembles feature the zampoña in festivals across the high Andes. Many cultures have independently invented graded-length wind instruments, with versions found in ancient Greece (syrinx) and among Pacific islanders.
Synthesis Notes
For each note, we instantiate a short white-noise buffer at 5% gain mixed into a sine oscillator. This subtle noise simulates the turbulent air stream inside a real tube — without it, the tone would sound too clean and electronic. Combined with the slow attack, this produces a believable breathy sustain ideal for folk melodies.