Author Topic: Increasing volume of multiple FLAC files?  (Read 30211 times)

Retronic

  • Administrator
  • *****
  • Posts: 2324
Increasing volume of multiple FLAC files?
« on: January 31, 2018, 09:16:06 AM »
Sometimes after I've edited in Audacity the volume is still low.  Amplifying each track is easy but hard to get consistent volume across the whole LP>  For mp3's I used mp3Gain.  Is there something I can use to drag a file of FLACS in that increases them all to the same volume?

stackjackson

  • Administrator
  • *****
  • Posts: 2226
Re: Increasing volume of multiple FLAC files?
« Reply #1 on: January 31, 2018, 02:05:41 PM »
I use XLD for all conversions. Works great and you can even batch multiple folders.
| Stack |

Retronic

  • Administrator
  • *****
  • Posts: 2324
Re: Increasing volume of multiple FLAC files?
« Reply #2 on: January 31, 2018, 02:14:47 PM »
Sounds perfect.  Cheers. Ripped a few DeWolfe LPs lately I need to straighten out.

Greta

  • Administrator
  • *****
  • Posts: 4726
Re: Increasing volume of multiple FLAC files?
« Reply #3 on: January 31, 2018, 02:35:09 PM »
Setting audio files to the same volume is a practice often called "normalize", but...read this (much faster for me to paste this instead trying to explain with my english):


The "technical" (correct) meaning of "Normalize" is somewhat different. It means setting the "peak level" to a specified level. This is what the Audacity "Normalize" effect does: (http://manual.audacityteam.org/o/man/normalize.html)
Unfortunately, the term is also used quite commonly to mean "Make music files sound about the same loudness".
These two meanings are not the same thing.
Although two tracks may have exactly the same "peak level" (the level of the highest or lowest peak), one may sound very much louder than the other.

As a general guide, waveforms that have a "dense" appearance tend to sound louder than those with a "sparse" appearance.
MP3 Gain uses an algorithm called "ReplayGain" (http://wiki.hydrogenaud.io/index.php?title=ReplayGain).
A similar algorithm is used in iTunes and on iPads called "Sound Check".
"ReplayGain" can be applied either destructively or non-destructively. When applied non-destructively, the audio data is completely unchanged. The only thing that is changed is some metadata that tells the audio player how loud to play the track.

Audacity does not support this kind of non-destructive gain control.
Many software players include ReplayGain (example: Foobar2000 includes reading and writing ReplayGain metadata).
Some hardware players (such as iPads) have this type of technology (though as mentioned, iTunes use their own proprietary version called "Sound Check").
If your player supports it, then that is the method that I would recommend.
If your player does not support ReplayGain or Sound Check, then you would need to modify the actual audio. Although for uncompressed formats such as WAV, changing the gain is "virtually lossless", it is not "absolutely lossless".

My suggestion is to rip in wav 24bit 48kHz (to negate any bit depth loss from potential reduction in volume), and then encode to FLAC using a software that supports ReplayGain algorithm, but you should use it in a non-distructive way (ReplayGain tags only), like XLD (free) if you're on Mac (http://tmkk.undo.jp/xld/index_e.html), or Wav Pack (free) if you're on Win (http://www.wavpack.com - here you can download the command line and the user interface separately).
These are the softwares that came to my mind right now, but there are more for sure.
Hope you can get some help from this.
« Last Edit: January 31, 2018, 03:22:18 PM by Greta »
G.

Greta

  • Administrator
  • *****
  • Posts: 4726
Re: Increasing volume of multiple FLAC files?
« Reply #4 on: January 31, 2018, 02:38:14 PM »
You posted while I was writing guys..
Good, I deduce you're on Mac Retro?
« Last Edit: January 31, 2018, 03:24:12 PM by Greta »
G.

Pumi

  • Member
  • **
  • Posts: 87
Re: Increasing volume of multiple FLAC files?
« Reply #5 on: January 31, 2018, 04:46:04 PM »
My way to rip:
- recording the entire LP (at 75% of the maximum level on the VU meter)
- removing some clicks/pops
- normalize the project to -0.7
- splitting tracks and exporting

Retronic

  • Administrator
  • *****
  • Posts: 2324
Re: Increasing volume of multiple FLAC files?
« Reply #6 on: January 31, 2018, 06:27:21 PM »
I'm on Windows.
« Last Edit: February 01, 2018, 08:09:26 AM by Retronic »

Greta

  • Administrator
  • *****
  • Posts: 4726
Re: Increasing volume of multiple FLAC files?
« Reply #7 on: February 02, 2018, 08:45:15 AM »
I thought you possibly were on Mac cause XLD don't run on Win, it's only for Mac and it's a great peace of software.
Alternatives for Win, I don't know very well cause I'm a Mac user since a long time.
However, I heard that good alternatives are bdPoweramp (pay) and Wav Pack (free).
G.

Dick Turpin

  • Member
  • **
  • Posts: 61
Re: Increasing volume of multiple FLAC files?
« Reply #8 on: February 02, 2018, 01:57:07 PM »
Sometimes after I've edited in Audacity the volume is still low.  Amplifying each track is easy but hard to get consistent volume across the whole LP>  For mp3's I used mp3Gain.  Is there something I can use to drag a file of FLACS in that increases them all to the same volume?

You can use chains and batch automation in audacity to achieve this using the Amplify effect (do not use normalise) and as we are dealing with FLAC here saving is not an issue as there is no resample. I've not time to go into this now but I can do a tutorial if you like ?
Hands up, give me all your hammond !

Retronic

  • Administrator
  • *****
  • Posts: 2324
Re: Increasing volume of multiple FLAC files?
« Reply #9 on: February 02, 2018, 02:10:28 PM »
:-)
Cheers.  Everyone needs a bit of Dick in life (as Grandma used to say).
Great to see you here.

Pumi

  • Member
  • **
  • Posts: 87
Re: Increasing volume of multiple FLAC files?
« Reply #10 on: February 02, 2018, 05:27:08 PM »
Yes DT it would be great if you can do a tuto.

I have a question: why amplify is better than normalize ?

keir

  • Member
  • ***
  • Posts: 187
Re: Increasing volume of multiple FLAC files?
« Reply #11 on: February 03, 2018, 06:10:28 PM »
Finally after all these years I recently started doing something to address the annoying volume variations I had when listening to music on random, which is almost exclusively how I listen to music. My main player is MusicBee but I still use my previous main player Foobar2000 for tagging, maybe it's better in some ways, maybe not, but it's certainly what I've been used to using for tagging for a long time, and I now also use that for applying non-destructive per-track replaygain.

When actually ripping something, for which I would use Goldwave, again because it's what I'm used to (from before Audacity was even a thing iirc), and use the 'maximise volume' function to increase the volume uniformly as much as possible without clipping, i.e. everything proportionally increased by the amount it took to increase the peak to max. I did this per-side, just because that's how my rip files were, but it would have been better for accuracy if I'd joined them and maximised the volume once on the whole album. I expect that Audacity has a similar facility.

Declicking was mentioned before, I would pay particular attention to them where the peaks are clicks, which is often the case, as they interfere with the stuff in the previous paragraph. I always did this by bringing the click down manually, as I didn't trust any automated declicking solution not to take away anything I didn't want it to. This was just gut instinct, my mistrust may have been unjustified.

Dick Turpin

  • Member
  • **
  • Posts: 61
Re: Increasing volume of multiple FLAC files?
« Reply #12 on: February 06, 2018, 08:29:32 AM »
How to to batch covert FLAC volume using Audacity:

1) Go File> Edit Chains > Add > Enter name

2) Insert > Amplify > Edit Parameters > Adjust the slider to the required dB

3) Insert > Export FLAC - Make sure this entry is after Amplify in the table, use the move up and down buttons if it isn't and you should have something that looks like the the picture below, click to enlarge.



4 ) Now there is a short coming in Audacity that you can't set the export parameters for the file, eg bit depth ETC for MP3 or FLAC from chains so we have to set it by loading a file into audacity for editing. So click open a FLAC or MP3 file then file> export > export audio > click the drop down menu for file type, select FLAC and choose either 16 or 24bit depth then the quality setting of 1-8. Click cancel but Audacity will remember that you have changed the file format options ready for our batch conversion. These save parameters will also remain the next time you open audacity until you change them

5) Now to Apply our chains to our files. Go File > Apply Chains > select your chain > Chose your files> then run.

6 ) Your files should now be in a sub folder where your originals are called cleaned. It doesn't change your original files so if you make a mistake they remain unaltered.

Note, I've just tested this using Audacity on Linux and I may have run into a bug where Audacity (v2.2.1) doesn't wait long enough for the FLAC file to load before it applies amplify so falls over with an error, works fine if exporting MP3's. I'm going to test on windows as this may be a Linux specific bug. I'll report my findings back.

Update, it's a Linux specific (or Opensuse) bug so if you're using Windows or Mac then it's fine. With Linux it's probably an issue with the FLAC libraries Audacity was built against, that's an issue for me and something to sort out with the package maintainer or compile it myself, another thing on my todo list.

Any problems, let me know.

Chains are extremely handy for many things once you get the hang of them.
« Last Edit: February 06, 2018, 09:15:03 AM by Dick Turpin »
Hands up, give me all your hammond !

Dick Turpin

  • Member
  • **
  • Posts: 61
Re: Increasing volume of multiple FLAC files?
« Reply #13 on: February 06, 2018, 08:57:09 AM »
Yes DT it would be great if you can do a tuto.

I have a question: why amplify is better than normalize ?

Because you want to apply the same level of gain across the album as this keeps the levels between tracks and the intention of the original studio engineers. If using normalise this will increase the maximum volume level to say 1 even for tracks that were intentionally meant to be quiet, i.e. it will substantially increase deliberately quiet tracks disproportionately more than it would a deliberately loud track, if you follow. More here:

https://manual.audacityteam.org/man/amplify_and_normalize.html

Think classical music, you don't want to make something fortissimo that was meant to be calando.

It says this:

When not to use Amplify

If your audio has DC offset present, you should use Normalize to correct that offset.

If you are applying a Chain and want to bring a track or files to a specific level, use Normalize instead. Amplify in a Chain will not make the track or file as loud as possible if "New Peak Amplitude (dB)" is set to 0 dB and will not set the amplitude to any other chosen amount in that box. Because Amplify is being applied automatically it can only apply the "Amplification (dB)" amount as saved in the "Ratio" parameter.


But we don't want a specific level for each track, we want to apply a fixed dB gain across the whole album so we use amplify instead of normalize.

« Last Edit: February 06, 2018, 09:04:31 AM by Dick Turpin »
Hands up, give me all your hammond !

Retronic

  • Administrator
  • *****
  • Posts: 2324
Re: Increasing volume of multiple FLAC files?
« Reply #14 on: February 06, 2018, 05:43:02 PM »
Thank you.   

I just dragged the 16 ripped files into audacity and as you say, once loaded I did 'Amplify' in the usual way and it increased each track in turn.
From heron in I will just increase the volume more before I start editing.