Evening out volume variations?

I’m wondering about the following:

Suppose I have a recording of a single note (e.g. sung by a human).
Over the course of the single note there’s a (very irregular) change in
perceived volume (obvious from the signal when looked at from a suitable zoom factor).
I would like to even out the perceived volume (without “changing the spectrum”, i.e. keeping the same overall sound).

I expect something as follows should be possible, but I have no idea how to go about it:

  1. for a given selection of audio: detect
    1.a. an envelope describing the change in volume over time (using some low-pass filter?)
    1.b. an average perceived volume of the signal (average of absolute value?)
  2. use the information in 1.a. and 1.b. to amplify the audio so that the perceived amplitude variations are removed
    (at every moment in time the perceived volume should be the average perceived volume of the original signal).

Manually using the envelope editor is not really an option in this case. I think an automatic solution should be possible.
Thanks for any insights you may have!

Over the course of the single note there’s a (very irregular) change in
perceived volume

What do you think caused the volume variations? Many times we can do a lot better suggesting solutions if we know what the show is. What’s the show? You probably didn’t get up this morning with a desire to even out volume variations. It’s probably part of a much larger presentation.

Like how much damage can we do? There are ways to crowbar the volume variations to near zero, but they don’t sound very good.


Thanks for responding.

The variations are caused by bad singing technique
(singing very silently causing unstable volume).

I’ve been able to improve the sound a lot
by playing with the compressor effect.
Maybe that’s good enough for now.