T-012 — Spike: soundboard radiation responses from Salamander’s two mics, and what they are for

Status: in progress — D1–D6 accepted (maintainer, 2026-12-06); the alignment check on four keys done: D3 does not work as accepted, D3′ proposed (below), awaiting the maintainer · Area: julia, piano · Depends on: T-006 (done)

Read for that: Piano 06 (, , the three ways to model it), Piano 11 (one response per mic, the room), Piano 12 (step 1 item 5, the residual; step 3 T-007: excitation per partial, response per component and mic), T-007 (H1, H10), T-035 (Outcome: strike position β), T-042 (the onset the reference now plays), Problem log (P-005, P-007), training/src/ReferencePiano.jl (render_events), training/results/salamander/README.md.

Why: P-005 calls the soundboard response the biggest risk to the instrument’s quality: there is no measured radiation response, and Piano 06 and 13 plan stage 1 around convolving the bridge force with one. Since then the instrument went another way. The measured modal model (T-007, format v4) has no bridge force: each partial’s complex gain per mic ( in T-007’s factorisation ) already contains the hammer’s mode shape, bridge admittance, soundboard and radiation at that partial’s frequency. So a radiation response convolved on top of today’s model would count the soundboard twice. What the recordings still have that the model lacks is what is not at a partial frequency: the board’s own ring after the strike, the hammer knock, and the room. T-036 measured that gap: 2 dB per partial envelope after the attack, 3–5 dB in the first 0.3 s. P-007 (C2–F#3’s fundamental falling faster than any component) is probably a board or bridge resonance too. T-012 finds out what a soundboard response is and what it would add, before T-017 (convolution) and T-058 (physical strings) build on one.

What

  1. The residual (D2): for a set of samples, render the fitted reference piano note (T-007’s model plus T-042’s contact onset) per mic, align it with the recording and subtract. Report the residual’s level against the note over time (0–50 ms, 50–300 ms, 0.3–2 s) and frequency (third-octave bands), per key and velocity.
  2. What is in it (D3): split the residual into the board’s ring (after the strike: decaying resonances that do not depend on which key was struck, apart from level and colour), the knock (short, broadband, around the onset) and the room (long, diffuse, also in the released tails). Coherence between L and R, and across keys, tells them apart.
  3. Two estimates of per mic (D4): (a) from the residual, deconvolved by the hammer’s force (T-042’s contact pulse as the input estimate), averaged over keys and velocities; (b) from the fitted gains : divided by T-035’s strike-position comb and a smooth hammer spectrum, the gains of all partials of all keys sample and its phase at thousands of frequencies; the L/R ratio needs no excitation estimate at all. Where (a) and (b) agree, the response is real.
  4. A designed modal response (D4 c, the comparison P-005 asks for): a few hundred resonators, low modes placed at the resonances (3) finds, a statistical modal density and damping above (Piano 06), level-matched to the estimates.
  5. P-007 (D5): is there a resonance near 65–185 Hz in (3) that explains C2–F#3’s fast fundamental? If not, P-007’s fallback stands (a fourth, fast component for partials 1–2).
  6. What to build (D6): render the reference with each candidate added (the residual-based board ring as a per-strike response; the modal design) and compare with the recordings in the first 0.3 s (T-036’s measure) and by listening. The result is a recommendation for T-017 and the format, not a shipped change.

Out of scope: any change to the model file, the engine or the plugin; the convolution itself (T-017); hammer knock, key-bottom and pedal noises as sounds in the plugin (T-057: this task only measures how much of the residual they are); removing the room from the fits (Piano 11 says the user adds reverb; this task only measures the room’s share); a modal soundboard that feeds back into the strings (stage 3, T-058 onward).

Decisions (accepted by the maintainer, 2026-12-06)

QuestionOptionsProposal
D1What the spike must answer(a) two questions: what the measured model misses that a soundboard response would add (the attack, P-007), and what T-058’s physical strings will need; a recommendation for both; (b) only the first (today’s model); (c) only the second (P-005 as written)(a): the data and the code are the same for both, and the answer to each decides whether T-017 is needed before T-058 or only with it
D2Which samples(a) the 30 sampled keys × the four modelled layers (v4, v8, v12, v16) × both mics, as T-037/T-038 used, first 2 s after the onset; the residual of the release samples for the room; (b) every key and all 16 layers; (c) a handful of keys (C1, C3, C4, C6)(a): the model is fitted on exactly these, so their residual is the model’s error and not an interpolation’s; (c) as the first pass and the place to check the alignment
D3Alignment before subtracting(a) the onset and level as T-007’s check found them, then a fine time shift per sample and mic (sub-sample, by cross-correlation of the first 50 ms); the partials’ phases from the fit as they are; (b) refit each sample’s partial amplitudes and phases first (the best-case residual)(a), with (b) on the four keys of D2 (c): if (b) removes much more than (a), the residual is fit error, not soundboard, and the task says so
D4Which estimates of (a) residual deconvolution and the fitted gains (What 3), plus the designed modal response (What 4); (b) only residual deconvolution, as P-005 proposes; (c) only the gains(a): the residual sees the board between the partials, the gains see it at the partials; neither alone tells board from fit error. The modal design is the comparison P-005 asks for
D5P-007(a) in scope: look for a resonance near 65–185 Hz in both estimates; if one explains C2–F#3, say what would model it (a resonator in the board response, or a fast component tied to it); (b) leave P-007 to a task of its own(a): H10 of T-007 put it here, and the data are the same
D6What counts as the result(a) a table per register: residual level by time span and band, its share of ring / knock / room; the two estimates (plots, and training/results/salamander/t012_*, CC BY 4.0 like the other results); the 0–0.3 s error with and without each candidate; renders in data/t012/ for listening; and a recommendation: (i) add a board-ring response to the measured model (then T-017 next, and a format version for one response per mic), (ii) leave the measured model as it is and give to T-058, or (iii) both; (b) only the recommendation(a): the numbers are what later tasks start from

Step 1 — the alignment check (D2 (c), D3), 2026-12-06

training/scripts/t012_soundboard.jl align (code InstrumentsTraining.Soundboard): C1, C3, C4, C6 × v4, v8, v12, v16, both mics, 2 s from the fitted onset; tables training/results/salamander/t012_align.csv (spans) and t012_align_bands.csv (third-octave bands), residuals in data/t012/. Residual energy relative to the recording, reference (D3 a) / refit with the reference’s frequencies and rates (D3 b), mic L | R:

sample0–50 ms50–300 ms0.3–2 s
C1v8+1.8 / −0.3 | +1.8 / +0.6+2.1 / −6.0 | +0.7 / −5.9+2.8 / −0.8 | +2.8 / −1.1
C3v8−1.1 / −6.1 | +0.5 / −4.1−2.8 / −11.3 | −0.2 / −8.3+0.1 / −8.5 | +2.8 / +0.1
C4v8−4.1 / −9.6 | −3.4 / −7.1−4.8 / −14.7 | −5.9 / −19.0−2.5 / −13.3 | −8.5 / −16.2
C6v8−3.2 / −4.0 | −2.6 / −3.0−5.1 / −9.9 | −1.1 / −3.8+4.4 / +1.6 | +2.4 / +0.3

(the other layers alike, in the CSV). Subtracting the reference does not work: the residual is as loud as the recording or louder, and the fine shift lands beyond 20 samples (0.4 ms) in 23 of 32 cases and at its ±2 ms bound in 7 (the correlation of two signals at different frequencies has no clear peak). The cause is frequency. The reference’s partials come from the tuning and curves, 0.2–2.4 cents off each sample’s own (C1: +2.2 cents, 0.04–0.36 Hz), and over 2 s a waveform subtraction needs each frequency to about 0.01 Hz. Even T-038’s per-sample frequencies (fitted in the envelope domain, where phase does not matter) cancel little: refit at C1v8 mic L −1.3 / −7.8 / −3.0 dB per span, against −0.3 / −6.0 / −0.8 dB with the curves’.

What does cancel (a check on C1v8, C4v8, C6v8, mic L; scratch code, not committed): per partial, the recording’s band of ±f0/2 around it, shifted to baseband and decimated, fitted with the three components of the model (prompt, slow, partner) with free frequency, beat rate and both decay rates (variable projection: amplitudes by least squares, the four parameters by Nelder–Mead from T-038’s values; 1–9 s per sample):

sample0–50 ms50–300 ms0.3–2 s
C1v8−15.1−22.4−23.8
C4v8−8.5−16.4−17.7
C6v8−6.3−12.4−7.8

(C6v8: the sample’s fit has 4 partials, the model 8; the partials above stay in its residual.)

D3′ (proposed, replaces D3): the residual is the recording minus this per-sample, per-partial free refit (it is D3 (b) with free frequencies and rates, for every sample, not only four keys); the reference’s residual is not computed, since its frequency error, not the soundboard, would dominate it. What D3 (b) was for stays: if what remains is mostly at the partials’ frequencies (leftovers of a decay that three exponentials do not follow), it is fit error, and the band table shows it. Partials the fit does not have (above the sample’s highest) are added to the refit up to 0.45 fs, started from the reference’s frequency. The fit moves into Soundboard with tests (a synthetic note with known frequencies, beats and rates).

Done when: the residual table, the estimates and the attack comparison are on this page with the renders listed, P-005 and P-007 in the Problem log have their next step rewritten from the result, and the maintainer has decided the recommendation (follow-up tasks then get rows on Piano). Julia gates green; any code goes in training/src/ with tests, the script in training/scripts/t012_soundboard.jl.