My Keying (5)

Bug_quad

When you have a side-tone sound file instead of the key’s contact signal, you need to estimate the latter from the former. There are various ways, such as using a Hilbert filter or simply using an envelope detector. Here the audio signal is resampled at 4 times the tone frequency, i.e. at 2400Hz (=4*600Hz), and sqrt(x(i)^2+x(i-1)^2) is computed as signal power, where x(i) is the i-th sample value.

% gawk '{print sqrt($1*$1+b4*b4); b4=$1}' <test2.csv >test3.csv