Animal-sound physics, and a ball that squeaks because a dog bit it

A measured bioacoustics lane built from the first byte: an honest ruler, a self-oscillating vocal-fold model whose nonlinear regimes emerge rather than being scripted, and an inverse designer that turns a target squeak into a geometry you could mould.

2026-07-25 · 63 assertions across 5 gates · 0 red · 13 published numbers pinned against drift · integer fixed-point, no float, deterministic

Ruler
23/23
Vocal source
13/13
Vocal tract
9/9
Toy model
10/10
Inverse design
8/8
Regression
13/13

1. The ruler came first, and it had to refuse things

The only animal-sound organ that existed before this work says in its own header: "First-iteration timbre - tune by ear." Tuned by ear is not a measurement, so there was no way to say whether anything was good. nx_bioacoustic_bench is the instrument: eleven intrinsic axes, each one an acoustic failure mode that makes a dog ignore a sound coming from a television.

An instrument that scores everything highly is worthless, and that failure hides when nobody feeds it something that should fail. So the gate builds signals whose right answers are known in advance:

ControlMust showMeasured
pure 1 kHz toneno nonlinearity0correct
white noiseno nonlinearity0correct
white noiseno vocal tract0 resonancescorrect
one syllable looped x8non-repetition collapses0 / 1000correct
same tone at 48 kHzbandwidth axis drops400 vs 800correct
30 kHz tone at 96 kHzultrasonic axis fires1000correct
period-doubled tonesubharmonics detected86 framescorrect
two incommensurate tonesbiphonation detected60 framescorrect
prey-like rich signalbeats every negative567correct

Two defects the controls caught, in the instrument itself.

White noise originally scored a perfect 1000 for having a vocal tract - the resonance test asked only "is this band a local maximum", and band-to-band noise obliged seven times. It now requires a peak to rise above its adjacent valleys.

Worse: the composite ranked white noise (435) above a real signal (291), because noise is wideband, unrepeating and spectrally busy. There was no axis for is this a voice at all. Adding one fixed the ranking.

The bug that only physics could expose

Every control above is zero-mean by construction. A glottal flow pulse train is strictly positive, and it exposed two failures the whole control set had been blind to. The autocorrelation never removed the frame mean, so a DC-offset signal matched itself at every lag; and the pitch search took the largest correlation rather than a genuine local maximum, so the monotonic decay from lag zero won. Together they reported a confident 766 Hz plus or minus 1597 for a signal whose true rate was 413 Hz, with harmonicity still reading 0.97.

Both are fixed, and a positive-only pulse train is now a permanent control. Note what the fix did to the headline: the source's composite fell from 433 to 353, because the old 1000 on pitch-dynamics was a broken tracker inflating the score. Honest measurement lowers numbers.

2. The frequency is an output, not an input

Every other audio organ in the tree is source-filter: something makes a pulse train at a frequency you hand it, and a filter shapes it. nx_vox_source is a mass-spring-damper model of two vocal folds driven by nothing but a constant subglottal pressure. It oscillates because of the aerodynamics - the glottis is convergent while opening and divergent while closing, so energy enters on the way open and not on the way shut. That asymmetry is why a larynx works.

TestResult
zero subglottal pressuresilent - no self-excitation without energy
constant pressure appliedoscillates at 414 Hz from a 420 Hz tuning
model's own closure count vs ruler414 vs 405 Hz - agree within 10%
glottal open quotient682 per-mille - physiological
divergence clampnever touched
detune the folds to 1365 Hzsubharmonics in all 42 frames
weak damping + detuningbiphonation 5 frames, chaos 13, periodic 20
nonlinear vs plain phonation+149 on the ruler

Nothing in the source code names those regimes. They are read back off a ruler that was built and frozen before the model existed. The emergent 414 Hz differs from the 420 Hz tuning parameter, which is the point - a coupled two-mass system does not run at its isolated spring frequency, so a number equal to the input would have meant the value was copied through rather than computed.

3. The toy

A dog toy that makes its noise because a jaw compresses it. Jaw force to shell compression to displaced air to chamber pressure to a reed valve to radiated sound - every stage in newtons and millimetres, because the point of the next section is to invert it into something a moulder can build.

BehaviourMeasured
unbitten ballsilentthe bite IS the excitation
80 N / 200 N / 350 N bitepeak 42 / 99 / 170harder is louder
chamber 12000 -> 3000 mm3704 -> 1409 Hzsmaller is higher
neck 6 -> 24 mm704 -> 352 Hzlonger is lower
200 N compression704 -> 813 Hzgeometric glide
reed valve seals per bite3 closuresit beats against its seat
plain vs detuned reednonlin 1000 vs 0see retraction below

The reed is not a second oscillator. A squeaker tongue and a vocal fold are both elastic valves driven unstably by the flow past them, so the toy drives nx_vox_source with its chamber pressure and takes the flow back - which is why it inherits nonlinear behaviour from a model already gated.

4. The throat

A glottal flow sounds like a buzz until it passes through a throat, and the shape of the throat is most of what makes a rabbit sound like a rabbit. The tract is a chain of cylindrical sections; each junction between two cross-sections is one reflection coefficient, and a species is a length plus a shape.

Almost none of this needed writing. A tree-wide audit ran first and found that nx_lpc_levinson already emits reflection coefficients in exactly the representation a tube chain needs, and nx_lpc_synth already implements the all-pole filter - so the existing filter is imported and used. What did not exist anywhere in 16000 files was the step from geometry to those coefficients: the existing ones are fitted to a recording, these are derived from a shape you can state, which is what lets a species be described instead of sampled.

TestMeasured
uniform tubeevery reflection coefficient exactly 0no shape, no reflections
shaped tube26 non-zero, all |k| < 1stable by construction
first formant, c/4Ldog 571, rabbit 1559, rodent 5359 Hzcheckable by hand
sections for 55 / 150 mm30 / 83derived, not chosen
new ladder vs existing filteragree to 21 per 10k of peaksame filter, two realisations

That last row is the one that matters. A lattice and a direct-form filter compute the same transfer function, so a new lattice has to justify itself: it is the physical structure, with one coefficient per tube junction, separate forward and backward waves, and stability guaranteed by construction. To show it is a second realisation and not a second implementation, the gate runs both on identical geometry and requires them to agree. Before the sign convention was aligned they differed by 40768 on a 32767 scale - so the test discriminates; it does not wave things through.

5. Inverting it into a buildable spec

The Helmholtz law inverts in closed form. Pick the chamber and neck length from what is mouldable; the neck area and the shell compliance fall out of the target sound and the dog's jaw. A terrier and a mastiff biting identical geometry do not make the same pitch, so the shell is solved per jaw.

TargetBiteChamberNeckShellRealised
rabbit distress 1200 Hz200 N9000 mm326.8 mm2 x 6 mm16.20 mm3/N1199 Hz
rodent squeak 3800 Hz120 N2500 mm348.45 mm2 x 4 mm6.61 mm3/N3799 Hz
upland bird 2200 Hz320 N8000 mm377.95 mm2 x 6 mm8.40 mm3/N2199 Hz

A designer that answers every request is a formula with a print statement. This one refuses, with distinct reasons: a neck beyond the mould limit, a shell asked to give up more volume than an elastomer can, and a bitten pitch below the rest pitch (compression cannot lower a resonance). Three impossible asks, three different refusal codes - it discriminates rather than merely failing.

The 90 N jaw needs a shell of 36.00 mm3/N where the 380 N jaw needs 8.52 - a weaker bite needs a more compliant shell to reach the same pitch shift.

Retraction

An earlier version of this page claimed that detuning the reed pair reaches a nonlinear regime, inherited from the larynx model, measured at 1000. That claim was an artifact of a unit bug and is withdrawn.

The chamber pressure is carried at Q32 and the reed input expects Q16. The shift between them was missing, so the reed was handed a value 65536 times too large and sat pinned against its divergence clamp on every sample of every run. Three things followed. The chamber-to-reed coupling parameter was a silent no-op across a 64x sweep. The toy ran as a chamber-refill relaxation oscillation near 110 Hz whose frequency was independent of the reed's tuning - 900, 1800 and 3600 Hz reeds all produced about 100 Hz. And the nonlinearity the ruler reported was clamp chatter.

With the units corrected the result reverses: the plain toy measures 1000 and the detuned one measures 0. Detuning does not cause the nonlinear regime, it destroys it. The original assertion passed not because it was true but because a pinned reed made every configuration look nonlinear - which is worse than a failing test, because it was evidence pointing the wrong way.

What is not true yet

The reed oscillates and seals, but at the wrong frequency. It closes against its seat 3 times per bite, so it is a valve and not a whistle. But its rate is set by the chamber's charge and discharge loop, around 70-110 Hz, and does not track the reed's own tuning at any coupling from 1x to 128x. This is a relaxation oscillation, not reed flutter. Reaching flutter needs an inward-striking reed with a proper Bernoulli lift term rather than the vocal-fold geometry reused here.

The pitch glide is geometric, not yet audible. The chamber genuinely moves 704 to 813 Hz under a 200 N bite, but the rendered audio measures the same pitch at 80 N, 200 N and 350 N. The chamber is not pulling the reed. The gate asserts the geometric law and explicitly does not assert an audible glide.

Turbulence reaches 22 samples per 10000. Far too little cycle-to-cycle variation to support an anti-habituation claim. The gate reports this number rather than lowering a threshold to pass.

The source is too low-bandwidth for the short-tract species. A 16 mm rodent throat does favour 5.4 kHz over a 150 mm dog throat, but by 2 per-mille against 0 - both near zero, because the glottal source's harmonics roll off long before 5 kHz. The rodent species, which is the terrier target, cannot yet be properly voiced. Every tract measures an ultrasonic fraction of zero, so the canine-band claim currently rests on container bandwidth, not on content.

No licensed reference corpus. The prey targets are design targets from published ranges, not fitted to measured recordings. Nothing here means "matches a real rabbit"; it means "lands in the band published work puts rabbit distress in". Real state of the art needs the corpus.

Method

The ruler is a live service

The measurement organ is no longer a local binary. It was compiled on the host - source packed, uploaded over the sovereign TLS stack, unpacked into the buildroot and built there, with no external toolchain anywhere in the chain - then promoted, registered on the tool API, and capability-gated.

The proof is behavioural, not a status code. Asked to measure a real 22.05 kHz file already sitting on the host, it answers:

AxisValueReading
ax_band183a 22 kHz container carries almost none of the canine band
ax_ultra0and physically cannot carry anything above 20 kHz
ax_vocal692most sounding frames come from an oscillating source
ax_nonlin0no nonlinear regime present
score455f0 592 Hz, 27 periodic and 12 chaotic frames

One thing that deployment caught: the service first came up reporting cfg-overrides-loaded=0. The organ had shipped but its configuration plane had not, so the live service was running on code defaults while the gated lane ran on the file - the two could have drifted apart on what "state of the art" even means, silently. The plane is now shipped alongside, the service reports all 29 values loaded, and the same file measures identically either way.

Ownership

Registered on the sovereign planes rather than living only in a session: RACI row bioacoustics owned by engineer-bioacoustics on the common-task catalogue, an atlas card marked mcp-live, frontier row F1150, and every gap above filed as numbered debt with its measured evidence. Organs: nx_bioacoustic_bench, nx_vox_source, nx_vox_tract, nx_squeaker, nx_squeaker_design, nx_bioacoustic_regress.

The other five organs are built and gated but remain local: only the ruler is registered as a callable service so far.

nx_bioacoustic_bench · nx_vox_source · nx_squeaker · nx_squeaker_design · sovereign toolchain, no external dependencies