0
mirror of https://github.com/torvalds/GuitarPedal.git synced 2026-09-04 16:12:52 +00:00
Files
Linus Torvalds 36be291845 Validation: null the pedal against the bench per block, not per passage
--verify played a passage into the board and nulled the whole capture in
one piece against what the host bench computed.  Five consecutive runs of
that gave -60.2, -54.6, -26.9, -58.8 and -26.2 dB, which reads as an
unreliable pedal and is nothing of the kind.

The USB audio endpoints are asynchronous - /proc/asound says so in both
directions - so the host sends at its clock and the board consumes at its
own, and when they have drifted a whole sample apart one gets dropped or
repeated.  Everything before that lines up exactly and everything after
is off by one.  Per 250 ms it is unmistakable: a run with a slip in it
holds -45 dB for five seconds and then sits at -21 for the rest.

So each half-second block is aligned on its own and the answer is the
median block plus a count of how many times the alignment stepped.  That
is repeatable to a couple of tenths of a dB whether a take slipped or
not, and the slip count says how eventful it was instead of poisoning the
result.

Three other things the same measurement turned up.  Routing an effect in
crossfades it over EFF_ENABLE_STEPS, so about a second at each end is
thrown away rather than measured.  The chain is put back to its declared
defaults pot by pot before anything runs, because setting only the
interesting pots measured this machine's defaults against whatever Trim
the last session left on the board - and Trim lands ahead of the
nonlinearity, so that is a different signal and not a level to divide out.
And the noise floor is taken from the tail of the same capture rather than
a separate one, because an instrument left plugged in is not a stationary
noise source and measuring it seconds earlier moved the answer by 5.6 dB.

The sub-sample fit reads exactly 0.000 on every block without a slip in
it, which is worth having measured: nothing resamples this path.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-09-03 12:22:44 -07:00
..
2026-06-12 13:46:23 -07:00