1. A method of controlling the gain of an amplifier, in which method a signal is applied to the amplifier and the output signal therefrom is digitized in an analog-to-digital converter; characterized in that the method comprises the steps: (a) setting the amplifier gain to an initial value; (b) inputting a sample of said digitized output signal for a predetermined period of time; (c) deriving a histogram from said signal sample, said histogram representing the frequency with which the amplitude of said signal sample occurs in each of different consecutive amplitude ranges; (d) comparing the frequency of occurrences in the highest amplitude range with a predetermined first constant; (e) reducing the present value of the amplifier gain by a predetermined first factor, storing this reduced value and terminating the method if said frequency of occurrences exceeds said first constant; (f) comparing the frequency of occurrences in the second highest amplitude range with a predetermined second constant; (g) storing the present value of the amplifier gain and terminating said method if said frequency of occurrences exceeds said second constant; (h) raising the present value of the amplifier gain by a predetermined second factor if said frequency of occurrences does not exceed said second constant; (i) forming a sum of the frequencies of occurrences of said second and a third highest amplitude ranges; (j) comparing said sum of frequencies with said second constant; (k) storing the present value of the amplifier gain and terminating said method if said sum exceeds said second constant; (l) raising the present value of the amplifier gain by said predetermined second factor if said sum does not exceed said second constant; (m) adding the frequency of occurrences in a next highest amplitude range to said sum; and (n) repeating steps (j)-(m) until the sum exceeds said second constant.