Determining control voltage of variable gain amplifier to achieve fixed output amplitude
Here is an AGC circuit (from Electronics World, of decades ago)







simulate this circuit &ndash; Schematic created using CircuitLab

To get minimum gain (4.7X) for low input voltages, you may need to adjust R6 downward, to reduce the D1 idling (quiescent) current; you want the reac ( the dynamic-resistance, the derivative of the diode equation) to be well above R3 (1Kohm) for low input voltages; thus you need &lt; 10UA thru D1.

I make no promises about the distortion.