ac voltage regulator
You have a very good idea there.  A way to to what you want is to build an amplifier that has the maximum gain you want.  Then feed it with this jfet attenuator;


The maximum volume is then limited by the maximum gain of the amplifier.

You can find more about this antennuator here; App Note for JFET as a Resistor