• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

flac audio leveler

Started by country101, May 23, 2017, 11:28:27 PM

country101

OK I have all my mp3 files leveled at 92 db but my flacs are not leveled. Is there a free program out there that does this like wxMP3Gain does or am I stuck with them at all over the place?

Filip83

I already told you what I think about "leveling" or altering the original recordings in any way. Don't do it. At least not in bulk.

It may be ok to alter some files, but most of the modern audio production is produced (mastered) in a way that it's already being compressed, limited and generally processed so that the end consumers can get the "most" volume possible. That is generally aimed, so that the product also sounds reasonably well on bad devices or speakers such as laptop speakers and phones,...

The result of this is what has been referred to "the loudness war". In reality we can gain volume at the expense of dynamics. The more the sound is compressed the less dynamics it has. The result of the loudness war is that the new songs are much louder than they were in the 80's and so on.

As a contrast Jazz and classical music may sound very low in volume, since those don't use electronic equipment to enhance the volume and so on.




The majority of nowadays music is already processed to the limits. Any additional processing only hurts the music.

If you lower the gain of the recording you essentially lower the dynamic range even further. In the end (when broadcasting) you still want to use the full dynamic range that a digital signal can support. So you need to amplify the volume in some other stage, but some dynamic range was already lost when you lower the volume with a 3rd party app and can't be gained back ever.

For example 16bit is used in most audio files. By lowering the volume you effectively make the file use less bits.




When we are talking mp3, there may be other things to consider as well. The audio file is already compressed. Mp3 files are much smaller than Wavs are. There may be losses in quality when you re encode files. Although I have no evidence of this and I'm only speculating.

https://en.wikipedia.org/wiki/Loudness_war
https://en.wikipedia.org/wiki/Audio_bit_depth
www.diskonektedmusic.com
www.soundcloud.com/diskonekted

PROducer

I'm assuming here, which is not always the best thing to do.  :o  But Replay Gain uses an ID3 tag to tell playout software to increase or decrease the volume of which to play a file by a certain amount to make everything sound like it's the same volume.  I'd guess that if you were to use Foobar2000 to add the replay gain tag to your files (provided it will work on flac files--again, haven't had to try this) it would help.  MP3Tag software will also convert replay gain tags to work with iTunes Soundcheck so your iPhone/iPOd files are all the same level... however iTunes is incompatible with flac, you'd need to use alac.

qtronix

#3
Wow, that's pretty high for a production level. Almost no headroom.

I use a great little command-line program called bs1770gain (http://bs1770gain.sf.net/) to level audio to the same loudness, in my case -23 lufs. It supports writing RG-tags to files without transcoding (though I prefer transcoding to .flac).

Then the audio is gained up and processed in the last links of the chain before it reaches the listener.
Marius - Broadcast student, music-freak, computer-geek and hobby-mechanic

Filip83

Quote from: qtronix on May 24, 2017, 10:14:49 PM
Wow, that's pretty high for a production level. No headroom where clipping is sure to happen right off the bat at some point.

I use a great little command-line program called bs1770gain (http://bs1770gain.sf.net/) to level audio to the same loudness, in my case -23 lufs. It supports writing RG-tags to files without transcoding (though I prefer transcoding to .flac).

Then the audio is gained up and processed in the last links of the chain before it reaches the listener.

I honestly don't understand what you are talking about. One thing is to use audio processing and another thing is to actually change the original files.

The OP uses mp3gain or whatever the software is called to reduce the gain of the mp3 files. That makes no sense at all. I described why in my original response. The broadcasting output is a different matter. Some headroom is always good to have, but in the digital domain having a headroom of 0.5 - 1 dB should be good enough to avoid most digital clipping.
www.diskonektedmusic.com
www.soundcloud.com/diskonekted

qtronix

Well, whenever you introduce more elements in your audio-chain, you risk clipping at some point in the system. You usually want some headroom to play with without cramming everything out the roof in the system. Music normalized at a certain loudness don't have the same high-peaks. And music peaked at a certain peak (peak-normalization) do sound different to the human ear.

Consider this situation: You have all your music normalized pretty high, but some of them sound a little lower. By increasing the gain on those files to match the rest will make them peak at 0 (clipping). What do you do? Well, you have to lower the rest of you music to make it match the lower ones.

And in the introduction of voice/voice-tracking, effects or other elements in the audio, you fast realize that you cannot get the voice/elements-audio high enough to match the music without either compressing/limiting the crap out of it first or ducking in the automation system itself.

In my opinion, it's better to have a lower, more normalized audio at the beginning of the chain to have some room to play with overall, and match vu- and loudness meters, and then gaining it up at the end to match what you want at the output to the listeners. Though not so low at the beginning that you end up turning up the noise-floor too much.

I also have a lower volume on my archives to be compatible with my primary automation-system. Everything above -16 lufs or so, and all you see is red.

If running just music and encoding straight in RadioDJ, a highly normalized archive would not be a big issue maybe. But if running through mixers and other hardware, my thought is it isn't a very good idea.

Anyway, that's just my thoughts. :) Is it the right way to do it? I don't know. But I find it makes everything much easier in the end. :)
Marius - Broadcast student, music-freak, computer-geek and hobby-mechanic

Filip83

Oh yeah I do agree. I didn't really take in account some real life aspects of radio production. However I still don't think that altering the original files is a good idea at all, for the very same reasons I already stated.

In the end I think it all depends on the specific things you want to achieve. If you only play music and jingles (simple stuff) then lowering the volume is not really needed.

If you (for example) use an external mixer and use a microphone/s and different sources of signal then you definitely need a decent amount of headroom between 6-12dB id say. For that you don't need to reduce the volume of the files but rather just adjust the gain on the mixer as needed.

It really depends on many things... Now I also just remembered when I was working on a big radio station, that we did use to send files (news stories etc) with -6dB volume approx. But honestly I find that ridiculous and outdated (when it comes to digital produced products such as top100 pop songs).

If the file uses 16bit reducing the volume means that less bits are actually in use (I feel that this is just a waste). That might become a problem with music files that are tightly mastered. If the dynamics were already "destroyed" in the mastering process this would only make things worse.
www.diskonektedmusic.com
www.soundcloud.com/diskonekted

qtronix

Yes, you are right: It does depend on what you are trying to achieve and what your needs are. In many (most?) cases, you don't need to go about it so drastically like I do. I think most hobbyist and smaller (net)-stations don't nessesarily need to do much with the audio in forehand. But in bigger stations I think you'll find that headroom is a big deal.

Now, with the great thing called RG in file-tags, files do not really need to get altered at all. :) Nothing in the audio actually gets "altered". And the gain can be restored to it's original without any loss.
Though even using RG, less bits are being used internally anyway. But, lowering volumes doesn't mean quality is less. You can see at it as raising the noisefloor, which I think technically decreases the dynamic range. But when setting the nominal level in your chain, you won't have it cranked that high anyway. I think that's where the consideration of signal to noise-ratio comes in. In 16-bit audio, the very bottom is -96 dBFS, which is pretty darn low. in 24-bit audio, it's down at -144 dBFS.

Well, when using a mixer which sends the audio back to the automation system at the same level as it goes out, you'll end up having the same problem as initially. And then you'll need to have to sit there and ride the gain all day long. Either that, or you'll have to be running at different levels going back in than you have going out. Suddenly your system levels are all over the place. Stations I think use a decent amount of headroom because of how their setups are and how the gear is calibrated to match what gets sent and received back in each link/stage of the chain.

As you said, it all come back to what your needs are. Is it to just play music and enjoy streaming then yeah, you don't need to fiddle around with the music too much. But in more complex setups, headroom is definetly something to consider. :)

Anyway, if you want to level the music, you'll have to do one of: gain up and risk clipping, or -gain down a little to prevent it. Todays overly mastered music makes no room for anything extra.
Marius - Broadcast student, music-freak, computer-geek and hobby-mechanic

Calypso

I use FLAC as my main audio format, and yes, I do normalize them. However, you have to be very aware of how you apply gain. Most programs look at the average audio level and gain upon that. Then, with a quiet song with loud parts, you'll get clipping in the loud parts. That's obvious not what you want. So you want to get the loudest sound and apply gain to that so you get to your desired level.

Replay gain doesn't work with RadioDJ as far as I've tested; Bass (the underlying audio library) can handle it, but it doesn't seem that RadioDJ takes advantage of it.

And why I add gain? Because not every recording/CD is done with the same level. And yes, I have audio processing, but you don't want to have the AGC to work when it's not necessary. If you set the AGC too heavy you'll loose dynamics. By adjusting the gain beforehand (in the source), you can loosen up the AGC.

FreerunMedia

#9
What i don't understand and call me stupid but why do everything the hard way when you can do it the easy way? Why do people allways search for problems if you don't want them?

RadioDJ has the option to use VST plugins. Different pluging for that matter. "Yeah so?" Well just install any audio processor plugin in the right folder, search for the right settings for your channel and off you go. Everything is level to the point you want without changing any volume of the Original files. Keeping the FLAC files untouched and no loss of any dynamic of the file.

Most of the "volume changing" software take the avarage volume. Some use a top volume, clipping the clips of the track. Some change information of don't even write the information back to the file, loosing ID's, tags and cue points. For CD's, most popular CD's are normalized to the max. Now i read about AGC, don;t switch it on and when you setup the processing the right way, you don't even need the ACG. For my station ( http://www.radio251.nl ) i don't use AGC but my levels are decent.
Running 3 editions V1.8.2 at www.salto.nl and v1.8.2 at radio251.nl. ( NOW with 2 live studio's! )

Filip83

www.diskonektedmusic.com
www.soundcloud.com/diskonekted

FreerunMedia

Quote from: Filip83 on May 25, 2017, 12:08:24 PM
AGC (automatic gain control)  :P

Damn ..... too many keys on this thing in front of me   :bash: :hihi: :D
Running 3 editions V1.8.2 at www.salto.nl and v1.8.2 at radio251.nl. ( NOW with 2 live studio's! )

Filip83

This turned out to be quite an interesting topic!

I think that "both" sides have presented valid points. And in the end it will depend on various, well variables...

The most important thing is that we play good music and enjoy ourselves / make money if that's the goal.  :cool:
www.diskonektedmusic.com
www.soundcloud.com/diskonekted

ghm72

QuoteThe most important thing is that we play good music and enjoy ourselves

That's all I've ever done in the 30 odd years I've been a DJ.

Calypso

Quote from: FreerunMedia on May 25, 2017, 12:04:25 PM
What i don't understand and call me stupid but why do everything the hard way when you can do it the easy way? Why do people allways search for problems if you don't want them?

Most of the "volume changing" software take the avarage volume. Some use a top volume, clipping the clips of the track. Some change information of don't even write the information back to the file, loosing ID's, tags and cue points. For CD's, most popular CD's are normalized to the max. Now i read about AGC, don;t switch it on and when you setup the processing the right way, you don't even need the ACG. For my station ( http://www.radio251.nl ) i don't use AGC but my levels are decent.

OK - funny you say to turn off AGC... normally you use AGC to control the overall level. Another option is to compress and limit, but that is devestating for your audio. Why I'm using AGC with care is because I don't want to loose too much dynamics in the music; so the quiet pieces of a song must not be as loud as the loud parts. AGC, if used quite harsh, will do just that: try to maintain a certain level. Now, if I want a certain baseline level of my station, and I don't want to use AGC too much and I definitely don't want to use compress and limit to control much of my level, I have to go to the source  :-\