Volume Boosting with Semplice

1.0 Introduction

For reasons that needn't detain us, loudness (measured in "decibels", abbreviated as "dB") in music recordings is usually worked on a negative scale, where 0 dB is the loudest and -1 dB is a little bit quieter and -11dB is considerably quieter than that and so on. In theory, a CD recording should have its loudest music recorded at 0dB. That would be the theoretical maximum volume an audio signal could get without introducing 'clipping' or other distortion.

Quite often, however, and usually for various technical reasons to do with the need to prevent complex digital recording and processing equipment introducing audible artefacts into a music signal, CD recordings are sometimes mastered at levels much lower than 0dB. Famously, for example, SACD recordings are generally recorded with an absolute reduction in volume of around -6dB. The result is that an SACD recording ripped to a hard drive will sound considerably fainter than it really ought to.

You will also sometimes find ordinary CDs which have two or more works supplied on the one disc -and the same volume constraint has been applied to all of them, disc-wide, instead of different volume levels being applied to each work individually. This is done by the record companies to ensure that a single CD has an 'overall, average loudness' which is comfortable for the entire duration of the CD. However, if you are ripping your CDs to digital tracks on a hard disk and storing each 'composition' separately from the others that shipped on the same CD, then having one loudness level applied to everything no longer makes sense. A loud symphony and a quieter cello concerto that ship on the same CD could reasonably be ripped and processed such that the cello concerto got a volume boost whilst the already-loud symphony did not.

For all these sorts of reasons, Semplice allows you to apply a volume boost to FLAC files, in such a way that no audio distortion is introduced (so, no clipping or over-boosting) and also in a way that ensures relative loudness of parts of a single composition are always preserved. If the quiet, slow movement of a symphony is at half the volume of the loud, first movement on the CD, Semplice will always ensure that even if an absolute volume boost is applied to all the tracks ripped from that CD, the slow movement will still be half the volume of the first movement.

Semplice achieves this by first analysing each of the FLAC files it finds in a folder and determining each file's peak volume level. If it finds that the loudest track has a peak volume of 0dB, it knows the music overall is already as loud as it can be, without becoming distorted. It therefore won't offer to do any volume boosting at all. On the other hand, if it finds the loudest track has a peak volume of -5.8dB, it will offer to apply a +5.3dB volume boost to all FLACs found in the same folder. Note that, out of an abundance of caution, Semplice aims for -0.5dB as a maximum volume, not 0dB: that's to guarantee no audio distortion is created. For similar reasons, if Semplice finds that the loudest FLAC has a peak volume of -23dB, it will only offer a maximum volume boost of +8dB: a recording with levels that low can certainly be boosted a lot more than 6dB, but it's likely to result in an audio horror-show: traffic rumbles and other extraneous sounds are likely to become audible, for example! Thus, Semplice operates within fairly narrow bounds, never applying more than a +8dB boost, and never bothering to apply anything smaller than a +0.5dB boost. The result is a modest, cautious, non-distorting volume boost that, given it's applied in the same way to all FLACs in a folder, will preserve the relative loudness changes between tracks.

2.0 Volume Boosting in Practice

To see if a volume boost could be usefully applied to a ripped set of FLACs, take Option 14 from the Semplice main menu. Note that you do not have to have used any other menu options before being able to apply a volume boost: the only requirement is that you are sitting in a folder containing FLACs before launching Semplice in the first place.

Here, for example, I start in a folder containing four individual FLACs:

By typing '14 -> Enter' at the Semplice item selection prompt, I trigger this sort of thing:

Each FLAC is inspected in turn (the process is usually quite quick, per-FLAC). You can see from the above screenshot that for one of the files, it's discovered its peak volume is -9.8dB: that's significantly quieter than it could be, when 0dB is the loudest a non-distorting piece of audio can be. However, that won't necessarily be what Semplice ends up offering to do:

Now we see that Semplice, having analysed all the FLACs contained in this one folder, has determined that the 'best volume boost' possible is only +5.5dB. There must have been a louder file than the one showing a -9.8dB peak volume, therefore. Boosting everything by +9.8dB would have sent that louder file into audio overload and the result would have been distortion -so Semplice instead finds the volume boost that can be applied that makes the loudest track as loud as it can reasonably be. By applying that same boost to all files within this folder, the four files' relative loudness, one to each other, will be preserved, though at an absolutely louder level than before.

You will note, however, that Semplice is only offering to apply this +5.5dB boost. It will not actually apply a volume boost without your explicit approval. If you just press Enter at the 'do you want to apply...' prompt, that will count as a 'yes' (hence the capital Y shown in brackets at the end of that prompt: it's telling you that 'y'es is the default option). Type anything other than y or Enter, however, and no volume boost will be applied and your audio files will be left completely untouched and unaltered.

Let us assume you type 'y -> Enter' at this point, though. This is what will now happen:

You get confirmation of the fact that the volume boost is being applied to each file in turn. If you were to look in your file manager as this process takes place, you'd see this sort of thing:

There were four FLACs before -but now there are eight of them! Look carefully and you will see that four of them have a '+5.5-dB' prefix in their file names: these are the new FLACs that are created by the volume boosting process. The four original FLACs are left untouched: volume boosting is, at this point, a completely non-destructive process, because it creates volume-boosted copies of your original FLACs, rather than altering the originals directly.

The specific 'prefix' used to identify the volume-boosted copies will vary, depending on what specific volume boost is being applied. It's +5.5dB in this case, because that's the maximum volume boost amount Semplice previously determined could be applied successfully. On other runs, using other files, you'll see completely different numbers used as the prefix, of course.

Something perhaps interesting to note at this point: volume boosts are not 'free'! Take a look:

If you compare the size of the prefix-05 FLAC (123MiB) to the non-prefixed-05 FLAC (112.8MiB), you can see at once that this 5.5dB boost makes the FLAC about 10MB bigger than before. The 06-FLAC similar goes up in size from 137.3MiB to 150MiB. Louder files are bigger files, basically -though the size increase is not usually prohibitive.

The idea at this point is that you should play the originals and their volume-boosted counterparts to satisfy your ears that the music is now louder, but not distorted. If you determine that the volume boost has somehow changed the quality of the music in an unacceptable way, you can simply quit Semplice (Ctrl+C will do it!) and then delete the prefixed-FLACs using your file manager: no harm done to the originals at all! Once you've done a few dozen volume boosts, however, you'll probably work out that the process does not really alter the audio characteristics of the FLACs in bad ways, and you'll want to do the opposite: delete the un-boosted original files and leave only the volume-boosted copies behind. Semplice has you covered in this respect:

Here, the program is offering to delete 'the source files' for you (i.e., the unboosted originals). Note the default option here is 'N': no, don't automatically delete anything, and let me do it manually with my file manager later, if I so choose! Again, Semplice bends over backwards to be non-destructive.

If you take the 'y' option, however, then your file manager will display this sort of thing in consequence:

You'll spot immediately that we're back to having just four FLACs in this folder: four of our files from before have thus been deleted. Checking the file sizes, you'll note file 05 is 123MiB, file 06 is 150MiB and so on. Those sizes tell you that we are now left looking at only the volume-boosted FLACs: the original files have disappeared. The volume-boosted files that previously had '+5.5-dB' file name prefixes have simultaneously been renamed to remove that prefix, so that the file names you're left with look 'normal' and not full of technical gibberish.

At this point, Semplice will have automatically returned to its main menu, from which you can quit or take further menu options as you desire: the business of volume boosting has concluded.

3.0 Absolute and Relative Volume Boosts

The final point to re-enforce about Semplice's volume boosting is that it adjusts absolute volume levels, not relative levels. I'll demonstrate this by running this little script before doing a volume boost:

for f in *.flac; do
ffmpeg -i "$f" -af "volumedetect" -vn -sn -dn -f null /dev/null > /tmp/soundlevels.txt 2>&1
echo "$f - $(cat /tmp/soundlevels.txt | grep -a max_volume | grep -oP '\-\K.+')"

...which yields this output:

For each of the four FLACs, a maximum volume has been determined and is displayed next to the file's name. Remembering that 0 is the loudest a file can be, we can sort these files into their relative loudness order, as follows:

07 - I will Lift up Mine Eyes6.0db -
08 - Praise Ye the Lord7.6dB1.6dB
05 - A Prayer of the Middle Ages9.8dB2.2dB
06 - How Excellent Thy Name11.9dB2.1dB

Here, I've displayed the difference in loudness between one file and the previous one in the third column (i.e., 7.6dB for the 2nd file, compared to 6.0dB for the 1st, yields a difference of 1.6dB).

Now let me perform a Semplice volume boost in the way described above and re-measure the peak loudness of all four files once more:

Our table of volumes, in descending order of loudness, now looks like this:

07 - I will Lift up Mine Eyes0.5db -
08 - Praise Ye the Lord2.1dB1.6dB
05 - A Prayer of the Middle Ages4.3dB2.2dB
06 - How Excellent Thy Name6.4dB2.1dB

You will immediately note that whilst the second column of this version of the table contains very different numbers for each track's absolute peak volume from before, the numbers in the third column remain completely unchanged: the second track is still 1.6dB quieter than the first; the fourth track is still 2.1dB quieter than the third, and so on.

Practically, this means that if you boost the volume of a performance of Beethoven's 5th Symphony, everything will get louder -but the relative volume difference between movements will still be preserved.

4.0 Conclusion

Volume boosting was invented in the first place to deal with a common technical issue affecting FLACs ripped from SACDs (where mastering is done by the record companies at deliberately reduced volumes so as to avoid introducing distortions from harmonics associated with the high frequencies that SACDs are capable of capturing). In practice, however, I've found plenty of perfectly ordinary, multi-composition CDs can benefit from a careful application of a volume boost, too.

An audiophile purist would, no doubt, hate the very idea of tinkering with the audio data ripped from any particular physical disk, but if your ears can stand it, by all means free feel to experiment with it. Always remember that right up until the moment you ask Semplice to delete the source files, applying a volume boost is a completely non-destructive process that you can back away from, without having altered your original files in the slightest. You can choose not to apply a computed volume boost at all; you can choose to preserve the original files even after a volume boost has been applied, and so on.

|[Back to Front Page]|[Semplice Tagging Model][All About SuperFLACs]|[Volume Boosting]|[Audio Codec Conversions]|