Is it possible to get the volume of a currently playing sound?

Is there a way to get the volume of a sound as it is playing, analogous to the Pitch UGen?
I was interested in using it with a LPF on a sound. If I change the frequency of the LPF over time, the sound will get louder or quieter, and I was hoping to use some sort of live monitoring process to make amplitude adjustments to avoid this.

Yes, you can use Amplitude to track the level of a signal.

But you might be more interested by the Compander, which will amplify or reduce a signal below or above a threshold (or both).

You might also have a look at Normalizer and Limiter Ugens, which have similar effects.

Note that the human ear do not perceive a constant sound pressure at every frequency as loud : Equal-loudness contour - Wikipedia . So this might not be related to the Amp parameter directly, but just a ‘problem’ of perception.

1 Like

There is also a Balance UGen in sc3-plugins that compensates a signal against a test signal.

1 Like