Echo removal - OBSOLETE

Most field recordings are afflicted with a degree of reverberation. Often, while the recording may sound very clear to our ears, spectrograms reveal rather heavy reverberation. Luscinia incorporates a very simple algorithm to reduce reverberation.

The algorithm treats each point in the spectrogram in turn. For each point, p with frequency f and time i, it searches for the maximum amplitude in the spectrogram at frequency f, in the preceding x ms to i. x is the parameter "Echo tail".

Where Amax is the maximum amplitude in the spectrogram S, at frequency f (S is a matrix with y frequency rows, and z time columns)

Next, the algorithm reduces the amplitude at point p according to the following equation:

where S'fi is the new spectrogram intensity of p, Sfi is the uncorrected spectrogram intensity of p, and r is the echo removal parameter.

An Important Note About Echo Removal:
Echo removal changes the spectrogram in a way that could destroy information in it (in a similar way to noise removal algorithms, for example). I have tested the algorithm quite intensively, and am fairly satisfied that it works well, especially for tonal signals. In this research, it appears that the benefits of the algorithm for distinguishing signal from noise significantly outweighs its costs in terms of signal degradation. However extreme values of the echo removal parameter (>200% for example) are likely to degrade the signal somewhat, and you should only use such high values of the algorithm with considerable caution.