If you want an simple algorithm to model this, waveguide synthesis can give surprisingly convincing results, including the difference between open and closed pipes. In short, a waveguide model involves delaying the signal (to simulate the signal traveling down the pipe), inverting it (to simulate wave reflection as described in TFA), and adding back to the pre-delayed signal.
Open pipes have two reflections, therefore two inversions in the corresponding algorithm, which can be combined into a simple positive feedback loop. Closed pipes only have one reflection, which is simulated by a negative feedback loop.
Here's an explorable where you can test it. In particular, in the "controlling the pitch" and "note transitions" sections, you can try changing the feedback between positive and negative values, and hear the corresponding flute/clarinet change in timbre.
I pity the family of a beginning clarinet student, like mine when I was learning to play it. Gaining control of the amount of wind to put into the instrument along with understanding how the mouthpiece and reed interact with your mouth, lips, and teeth takes a lot of practice during which time, mostly squeaks are produced. But, it's like riding a bike. Once mastered, you rarely fall off. It just takes practice.
But clarinets, with their (literally) odd harmonics, work very nicely for the Bohlen-Pierce scale [1], which is a 13-note scale based on the tritave, not octave.
Open pipes have two reflections, therefore two inversions in the corresponding algorithm, which can be combined into a simple positive feedback loop. Closed pipes only have one reflection, which is simulated by a negative feedback loop.
Here's an explorable where you can test it. In particular, in the "controlling the pitch" and "note transitions" sections, you can try changing the feedback between positive and negative values, and hear the corresponding flute/clarinet change in timbre.
https://www.osar.fr/notes/waveguides/