# Alto sax model 03

An additional instrument study using the coupled-physics approach of the Charlie Haden bass in `music3/spanish-theme-01/bass_model.py`. That bass integrates string, bridge, body, and fingerboard coordinates. This horn integrates air-cell pressure, volume flow, reed displacement, and reed velocity. Recorded audio and independent pitched oscillators are absent.

## Physical system

The fixed conical bore is discretized as an acoustic mass/compliance network. Cell compliance is `V / (rho c²)`; edge inertance integrates `rho / area` along the tube. A compensated mouthpiece cavity and a throat inertance sit at the entrance. The cavity includes the missing-cone volume, less the static equivalent compliance of the reed. Fifteen chromatic tone-hole branches and an octave vent load the bore. This is an acoustic abstraction of the keys, not an exact saxophone key linkage.

A reed mass and spring are driven by the actual difference between mouth pressure and mouthpiece pressure. Reed displacement changes the aperture. Airflow follows a signed Bernoulli valve law with a smooth viscous transition around zero pressure; the transition scale is 5 Pa. Reed motion also displaces air into the bore. A compliant nonlinear contact force stops the reed against the mouthpiece. Pressure, aperture, flow, and reed motion are solved together each time step.

The linear acoustic network uses trapezoidal companion models and a tridiagonal pressure solve. Radiation loads have positive resistance and inertance. Closed pads terminate in air-pocket compliance. Main-bore and chimney losses use a viscothermal resistance approximation evaluated at a 1 kHz reference frequency, rather than a complete frequency-dependent boundary-layer model. All dimensions and control settings are provisional.

Radiated pressure is obtained from the derivative of the outgoing volume flow, summed over open holes and the bell at a nominal one-metre distance. A simple microphone bandwidth filter follows it. This does not reproduce three-dimensional radiation, propagation between holes, or a particular microphone. Dry clips use one common playback gain. The tour adds four quiet early-reflection taps. A/B copies are matched in sustain RMS; the original model-02 files remain unchanged.

## Tuning and playing

`calibrate.py` designs generic tone-hole positions against passive input-impedance peaks. These positions change the physical network; there is no pitch correction of rendered audio. The mouthpiece throat reduces the register stretch of the earlier cavity-only approximation. The small shared tuning offset compensates typical reed/air-column coupling for the chosen controls.

The default player uses a 0.75 mm effective opening and 5.0 kPa in the first register. The octave uses a firmer embouchure: 0.45 mm and 6.5 kPa, except written D5/Eb5, which use 0.60 mm and 5.5 kPa. These are fitted starting controls, not measured human limits. Increasing breath requires relaxing the lip to preserve the register. Tonguing changes the effective reed opening; it does not multiply the final audio by a gate. Gentle jaw motion changes that opening too; its control value does not guarantee an exact vibrato depth in cents.

The current lowest written Bb3 fingering overblows, and written C#6 is sharp. The published nine long tones have been tested separately. Continuous changes between different fingerings and upstream vocal-tract loading are still to be implemented. Listening judgment remains necessary: passing pitch and stability checks does not establish saxophone realism.

## Checks

`render_tests.py` checks zero-pressure silence, positive real input impedance on a frequency grid, the nonlinear coupling residual, voiced sustained tones, pitch error, natural energy loss after breath stops, and preservation of pitch across the pressure studies. Fundamental frequency is estimated with YIN without restricting its search to the requested pitch, so wrong registers are detected. The report includes measured pitch spread, harmonic levels, and stored-energy traces.

```sh
python3 calibrate.py
python3 render_tests.py
```

Requires NumPy, Numba, SciPy, SoundFile, and `ffmpeg`.

## References

- [UNSW: Saxophone acoustics](https://phys.unsw.edu.au/jw/saxacoustics.html): reed/air-column feedback, missing-cone compensation, articulation, and player controls.
- [McGill: Saxophone Input Impedance Online](https://caml.music.mcgill.ca/doku.php?id=projects%3Asiio): conical/cylindrical air-column and tone-hole impedance modelling.
- [Maestre, Scavone, and Smith, DAFx 2018](https://dafx.de/paper-archive/2018/papers/DAFx2018_paper_29.pdf): impedance and radiation as a shared resonant system. This implementation uses a physical network, not their fitted measurement data.
