Trombone Simulator

Controls

How to play a trombone

At the most basic level, one plays the trombone by blowing into it while holding the lips against the mouthpiece. The lips vibrate open and closed, at a speed depending on how much tension they have. The lips vibrating causes the air in the trombone to vibrate, producing a sound emanating from the bell. The faster the lips vibrate (because of more tension), the higher the note produced. When the lips slow down (because of less tension), the note is lower.

However for a fixed length of tube, only certain notes will sound out loud. These notes are called resonances. These notes have large gaps between them, large enough that not every in-between note can be produced. (Just like a bugle, which has neither slide nor valves: only some notes can be played.) The purpose of the trombone's slide is to lengthen the tube, which lowers the resonances. By adjusting one's embouchure (lip tension) and the slide length at the same time, every note can be produced.

How to play this simulator

This simulator is a physical model of a trombone. Physical models of the lips, mouthpiece, slide, and bell are digitally simulated. The controls are listed at the top. The main controls are to move the cursor (or your finger on a touch device) left and right on the picture to adjust the embouchure, and up and down to extend and retract the slide. The diagonal colored lines are a guide to where the resonances are: playing over a resonance means that the embouchure and slide length are matched. Playing over white space means that one is between resonances and the note quality won't be as good. The big gray wedge on the upper right indicates that the resonances are very close together there. The vertical dashed lines indicate the rough locations of B-flat (thick lines) and F (thin lines). Other notes are unmarked, and likewise the slide positions. (Just like on a real trombone!) The off-key resonances (7th, 11th, 13th, and 14th) are marked in red. The g and f keys can be used to growl and flutter-tongue, respectively.

How it was made

I wrote the audio simulation in Faust, which conveniently compiles to WebAssembly and a Web Audio API wrapper. The overall approach I used was a digital waveguide model, as described in J. O. Smith III's Digital Waveguide Theory. The lips and bell are adapted from F. Scott's masters thesis (pdf).

The lips are modelled as a a blown-open valve, with the spring constant corresponding to embouchure. I couldn't get Scott's mouthpiece model to work, so instead I modeled it as a 3-port scattering junction along with the lips and the start of the trombone bore. The mouthpiece is the third port and is modelled as a 1-sample length tube with a resonator acting as the reflectance. I don't really know why that works, but it does more-or-less correctly adjust the resonances of the trombone to where I wanted them to be (when I just had the lips connecting directly to the bore, the resonances were shifted too high).

The bell reflection and transmission filters were hand-designed to have roughly the amplitude and phase profile described in Scott's thesis. The slide is modelled simply as a variable delay line in between the mouthpiece and bell.

About me

I'm a mathematician and software engineer. See my website for more information. My professional interests include robotics, digital signal processing, machine learning infrastructure, among other things. I am currently available for consulting engagements. I enjoy feedback, and would be glad to hear from you if you enjoyed this simulator!