In the figure we have the application of a general purpose diode in the gain control of a transistor amplifier step. The potentiometer determines the bias and thus the gain as a function of the amplified signal. The circuit is from an 80's documentation.