What exactly happens in the background when I amplify a track or a selection in Audacity? It’s obvious that conventional amplification is not at hand here.

It’s obvious that conventional amplification is not at hand here.

Why do you think that? It’s “pure amplification”. i.e. If you amplify by +6dB that’s (approximately) an amplitude factor of two and if you amplify by +12dB that’s a factor of (approximately 4, etc. Just like an electronic amplifier amplifying the voltage.

The Amplify effect will attenuate if you enter an negative dB value. (Many electronic amplifiers have a volume control so they can do that too.)

There are a couple more features - Your file has been pre-scanned and Amplify will default to whatever gain or attenuation is needed for “normalized” 0dB peaks. The Normalize effect is similar to Amplify with the default but Normalize adds a couple other options.

And, as long as the Allow Clipping box is unchecked it prevents the Amplify effect from making any changes that would leave peaks over 0dB.

Why do you think that?

Well, the track or selection I see on my screen is data, not current or electrons (and I know how physical amplification works). So I’m curious what mechanism is used in the background to make the data louder: is more data added to increase the amplitude or what?

Digital audio is the representation of sound as a stream of numbers. These numbers are called “samples” and the represent the amplitude of the audio wave at a moment in time. More details here:

Amplification of PCM digital audio scales the sample values by a specified amount. For example, amplifying by +6 dB scales each sample value by a factor of 1.995262.

[u]Here is a little tutorial to how digital audio works[/u]. An ac voltage “wave” is sampled periodically (44,100 times per second in the case of CD audio).

You get a series of samples with each sample representing the positive or negative amplitude (wave height) at one instant in time. These are “just numbers”. The range of those numbers depends on the format or bit-depth, but everything is scaled so an 8-bit 0dB file is the same loudness as a 16-bit 0dB file.

When you play a digital file, a digital-to-analog converter “connects the dots” to re-create a continuous wave (voltage) from the individual samples.

Now, to your question!
To amplify, every sample is SIMPLY MULTIPLIED by the amplification factor.
If you are amplifying by 2 (+6dB) every sample is doubled, doubling the size (height) of the wave. This is exactly like an amplifier except an amplifier multiplies the voltage.

One more thing -
Regular WAV files, analog-to-digital converters, digital-to-analog converters are all integer based. That means there is a limit to how high they can “count” and that’s defined as 0dBFS (zero decibels full scale) for whatever format you’re using. If you try to go over the 0dB limit you’ll get [u]clipping[/u] (distorted flat-topped and flat-bottom waves). So, digital dB levels are usually negative.

Audacity uses 32-bit floating-point internally which a has a different 0dB reference and a super-wide numeric range so it’s virtually impossible to clip. However, Audacity can show you potential clipping, and your digital-to-analog converter can be clipped when you play back, or your regular (integer) WAV file will be clipped if your levels go over 0dB.

If you levels do go over 0dB (but are not actually clipped) you can run the Amplify or Normalize effects to bring the levels safely down before exporting.

Acoustic loudness that you hear is measured in dB SPL (Sound Pressure Level). The 0dB SPL reference is approximately the quietest sound you can hear so SPL levels are positive.

Nothing is calibrated but the digital levels are correlated with SPL levels so a -3dB change in the digital level will result in a -3dB change in SPL (as long as you don’t change any knobs or move farther from the speaker, etc.)

That’s a concise explanation, thank you!