There are many ways to control the volume of an amplifier, the most common being using a potentiometer directly in the signal path. But a potentiometer may me of good or bad quality and if it is a stereo, the two channels maybe not even track.
I've seen a few different ways to control the volume and also avoiding running the musical signal through the potentiometer. With the arrival of many fancy ICs, there are special digital or analog potentiometers in an IC, controlled either by a potentiometer that just controls the gain or pushbuttons for increasing or decreasing the signal.
I did see a a suggestion, that propably came from the world of guitar amps, that a small signal pentode could be used as a VCA - voltage controlled amplifier - varying the gain by changing the voltage applied to one of the grids.
But the most popular arrangement is to use a LDR - Light Dependant Resistor - hooked up to a LED. Controlling the
current through the LED will also affect the resistance. A complete arrangement using an optical coupler - NSL32 -
is commersially available. However the NSL32 suffer from the same problem as some potentiometers - no good tracking
due to variations between various units.
To get the best result, a number of NSL32 has to be purchased and matched for best tracking.
I also wanted to try out the discrete variation - a led and ldrs.
Lightspeed, passive attenuator