Repository Public
1<!--2ORIX Sonata3File: Documentation/acoustics/winds.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# Wind instruments89All three engines use a **waveguide bore**: a delay line holding the pressure wave of the air10column, closed by a reflection filter at the open end (a one-pole low-pass: low frequencies are11reflected, high frequencies radiate). They differ in the excitation, and in whether the12oscillation emerges from the model or is prescribed.1314## `clarinet`: self-oscillating reed1516A cylindrical tube closed at the reed and open at the bell resonates at odd multiples of17`c / (4 L)`. One pass through the bore takes half a period; the bell reflects with inversion:1819 p_refl = -0.95 LP(bore_out)20 dp = p_refl - p_mouth21 reed = clip(0.7 + s dp, -1, 1) (opening falls as mouth pressure rises; s < 0)22 bore_in = p_mouth + dp * reed2324The delay is `P / 2` minus the phase delay of `LP` at `w0`. The loop gain exceeds 1, so the25tube speaks, only when `p_mouth` is above about `0.24 / |s|`; above `0.30 / |s|` the reed is26pressed shut and the note dies. `breath` and velocity move the mouth pressure **inside that27window** (found by scanning breath against stiffness at five pitch and velocity points; every28combination now speaks, guarded by `every_preset_sounds...` and `velocity_controls_level`);29the price is that `breath` changes loudness more than timbre.3031Measured: even harmonics 50 dB below the odd ones at middle C (as expected for a closed-open32cylinder); tuning within 1.7 cents from MIDI 38 to 94 at 44.1 to 192 kHz.3334*Not modelled:* tone holes and register key (every note is a full-length tube of the right35length), reed mass and resonance, the bell's own resonances, the player's vocal tract.3637## `flute`: forced jet3839On a flute the air jet crosses the embouchure hole, is deflected in and out of the tube by the40tube's own sound, and that switching feeds the tube. The classic jet-drive waveguide (bore41delay, jet delay, nonlinearity `x^3 - x`) was implemented and measured here: it hopped between42tube modes and was 7 to 38 cents sharp in the range where it did speak on the fundamental, with43octave errors elsewhere. It was replaced by a **forced** model:4445 jet(t) = sin(2 pi f0 t) prescribed, not fed back46 tone = [tanh(k (jet + o)) - tanh(k o)] * drive * env^247 breath = bandpass(noise) * noise_amount * drive * env * (0.5 + 0.5 |jet|)48 bore_in = tone + breath + 0.93 LP(bore_out) (one period per round trip)49 out = bore_out - 0.5 * 0.93 LP(bore_out)5051`k = 0.5 + 2.6 drive` (blowing harder saturates the edge: more harmonics), `o` is `jet.offset`52(a centred jet gives odd harmonics only). The tube is a passive comb resonator tuned exactly on53the note, so the pitch is that of the oscillator: 0.0 cent error at every pitch and rate. The54tone envelope is the square of the breath envelope: noise speaks first, the "chiff".5556*What is physical:* the tube resonances, the edge nonlinearity, turbulence filtered by the57tube. *What is not:* the oscillation does not arise from the jet-tube loop, so there is no58overblowing, no pitch drift with blowing pressure, no multiphonics.5960## `brass`: forced lip valve6162On a brass instrument the lips open and close once per period and admit puffs of air into the63tube. A self-oscillating lip model (two-pole lip resonator whose squared displacement opens64the valve) was implemented and measured: it saturated without oscillating below MIDI 66 and65played 16 to 60 cents sharp above. It was replaced by a **forced** valve:6667 lips(t) = sin(2 pi f0 t) - th, th = min(0.7, -0.9 + 2 drive)68 area = max(0, lips)^2 / (1 - th)^269 flow = area * drive * (1 - 0.25 p_bore)70 bore_in = flow + 0.8 LP(bore_out) (one period per round trip)71 out = bore_out - 0.8 * 0.8 LP(bore_out)7273The threshold `th` rises with blowing pressure: playing louder shortens the open phase of each74cycle, which is the main reason a real brass instrument brightens so strongly in crescendo75(measured: spectral tilt up 52 % from velocity 0.25 to 1). The bell cutoff of `LP` scales with76the register. `lip.tension` detunes the tube from the lips, which weakens the reinforcement.7778*What is physical:* the valve's pulse shape and its dependence on pressure, the tube79resonances, the bell's high-pass radiation. *What is not:* lip dynamics, the choice of a tube80harmonic by lip tension (no slotting, no lip slurs, no split tones), nonlinear wave steepening81in the bore at fortissimo.82