MrAl, Good idea.
Your can here some thing very well and other things not at all.
When I tried it, you hear a "zipper" sound in the background.
Used separate PCB for micro to keep the micro noise out.
Used opto isolators on the data lines so noise stays out.
Tried "digital pots" and "digital gain amps" and "multiplying DAC". All had problems.
Found a bad effect of any DC was in the audio. Had to trim out any input offset in the opamps.
The "zipper" sound was still there.
Can't remember how big a step I had in the POTs. I know some had only 64 steps and some had 256 steps. The zipper sound is related to step size.
Tried multiplying DAC. Pretty good but only tried 8 bit and should have started with 12 bit or more.
Most POTs are linear. There are some that are audio taper. There is a good one that is 1/2 db steps. Can't remember 7 or 8 bit.
My conclusion: In a mixer where the gain is adjusted by "hand", the zipper noise is not bad. (If designed well) So I do like digital pots.
In a limiter where the gain is adjusted 1000 time a second the noise to too much.
When the gain jumps from 8db to 8.5db to 9db to 9.5db the steps get into the sound.
My last try was to use an analog voltage controller gain amplifier. The "THAT corp." part.
Use a 16 bit DAC. Update it very fast. Put a RC on its output to smooth out the steps.
I did not get finished.
What I did get finished is the peak detector/ RMS circuit with variable attack and release, and multi attack/release speeds/squelch detector, etc.
I used a little 8 bit micro with a built in ADC. It is amassing how much analog functions can be put into software. It took two instruction to get the absolute value of the audio (same as full wave rectifying). An RC is only a small subroutine away. The time constant is a variable so it can be changed on the fly. The software for the VU meter is very similar to the audio processing software.
I did not finish the project. When I saw it was working and cold be done in a very small micro, and no one was going to pay for the project I moved on to a paying project. Would love to finish but must stay on paying projects.