You've already forked torvalds-GuitarPedal
mirror of
https://github.com/torvalds/GuitarPedal.git
synced 2026-08-14 12:44:08 +00:00
A compressor cannot be measured with a steady tone. It can, and the answer is exact and worthless: the knee lands where Level says and the slope above it is 4.81 against the 4.8 on the pot, which tells you the arithmetic is right and nothing about whether the effect is any use. What a compressor does is change its gain over time in response to a signal that changes over time, and a tone that never changes measures the one case that never happens. So analyse-compressor.py does both. The static half is a level sweep with tones. The dynamic half plays Inputs/BassForLinus.mp3 - a friend of Linus's playing scales on a bass, already public elsewhere and committed here unmodified - and asks what the gain actually did across seventy-seven seconds. The decode is a measurement choice rather than a detail, so it is in the script with its reasons. The mp3 reconstructs to +2.86 dBFS, because the master was near full scale and mp3 overshoots, so used raw it clips the pedal's input before the compressor sees any of it. It is scaled to -6 dBFS peak, which is where an instrument track is usually aimed. A quieter input crosses the threshold less often and every number moves, which is why the page says what was chosen. Only bins with at least two windows are plotted. An empty bin reported as zero is not a measurement and would draw a line down to it, and a bin holding one window is noise wearing a number; the counts are printed so the thin ends can be read sceptically. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>