IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Contant Peak, Constant RMS, How to get a fixed value for peak and RMS
terataz
post Dec 12 2012, 21:32
Post #1





Group: Members
Posts: 24
Joined: 10-June 09
Member No.: 70548



Hi, we are trying to set a default standard for the volume of the audio files we are working on.
We are looking for a tool that, given a bunch of mp3 files, will be able to normalize them at a given db.

For example : 0db for Peak levels and -9db for RMS.

Ideally, we'd love to use sox as we can chain it with other effects we're using without the need to convert multiple time the file from mp3 to wav and back.

We tried sox gain -n , sox gain -ne, sox gain -nb, sox loudness but none of them keep a constant RMS without varying the Peak level as well.
Any help appreciated.
Thanks
Go to the top of the page
+Quote Post
splice
post Dec 13 2012, 01:32
Post #2





Group: Members
Posts: 119
Joined: 23-July 03
Member No.: 7935



Assuming that you want the files to be reproduced at what a listener would perceive to be a "standard volume", I suggest you implement "ReplayGain". This adds a tag to the MP3 file which causes any ReplayGain-aware MP3 decoder to adjust the perceived volume on playback to a set level. For non-aware decoders, there is a tool (MP3Gain) which goes through an MP3 file and adjusts the gain on each frame to match the ReplayGain value.


--------------------
Regards,
Don Hills
Go to the top of the page
+Quote Post
mjb2006
post Dec 13 2012, 03:38
Post #3





Group: Members
Posts: 786
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



As above. Why do you need exactly peak 0 and RMS -9 dBFS? If you are going for consistent perceived loudness, this problem was solved a while ago with ReplayGain.

I note you've asked about this at least twice before:
http://www.hydrogenaudio.org/forums/index....showtopic=72664
http://www.hydrogenaudio.org/forums/index....showtopic=93180

This post has been edited by mjb2006: Dec 13 2012, 03:42
Go to the top of the page
+Quote Post
AndyH-ha
post Dec 13 2012, 06:23
Post #4





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



Peak and RMS are not tied to one another. Making them so would probably lead to some peculiar results -- not that modern mastering doesn't often produce rather peculiar results. I don't use things like ReplayGain, so I could be quite wrong, but I did not think such tools applied compression, which is a rather more complicated process than adjusting either peak or RMS. The results you aim for will require a multi-band compressor, at the least, or an RMS adjustor plus a ruthlessly used hard limiter.

On the other hand, from the comments I've seen is this forum and other places, most modern pop, rock, and other such genres that one finds widely played on radio, etc. frequently has well less than 9dB total dynamic range to begin with, let alone 9dB between RMS and peak. Of course if you are recording your own material, or getting 50 year old stuff from LP, that is a different matter.
Go to the top of the page
+Quote Post
splice
post Dec 13 2012, 07:40
Post #5





Group: Members
Posts: 119
Joined: 23-July 03
Member No.: 7935



It looks like Francesco is building playlists for use in "muzak" type situations - restaurants, bars etc. His media options appear to include MP3 players, audio-only DVDs that can be played on a standard DVD player without a visual display, and music servers that can be updated automatically over the Internet. He wants to:
- Automatically classify tracks using parameters such as "tempo, pitch, loudness, signature, beats, key and so on".
- Arrange the tracks into playlists by genre etc using the above classifications.
- Use MP3 or AAC format to make the track files as small as practical.
- Process the tracks to a consistent loudness for each genre.
- Store the playlists in a format that can be accessed with a minimal user interface (a few buttons).

This post has been edited by splice: Dec 13 2012, 07:43


--------------------
Regards,
Don Hills
Go to the top of the page
+Quote Post
terataz
post Dec 13 2012, 18:18
Post #6





Group: Members
Posts: 24
Joined: 10-June 09
Member No.: 70548



QUOTE (splice @ Dec 13 2012, 07:40) *
It looks like Francesco is building playlists for use in "muzak" type situations - restaurants, bars etc. His media options appear to include MP3 players, audio-only DVDs that can be played on a standard DVD player without a visual display, and music servers that can be updated automatically over the Internet. He wants to:
- Automatically classify tracks using parameters such as "tempo, pitch, loudness, signature, beats, key and so on".
- Arrange the tracks into playlists by genre etc using the above classifications.
- Use MP3 or AAC format to make the track files as small as practical.
- Process the tracks to a consistent loudness for each genre.
- Store the playlists in a format that can be accessed with a minimal user interface (a few buttons).


Splice,
not sure how you did it, but you're quite right on all you've said wink.gif

Thanks all for your replies.

We did have a good go with ReplayGain via mp3gain, but could not find a consistent way to normalize files with it.
Instead, it seems mp3gain does a batch analisys and make some sort of average.
When you change the audio batch, the average change, making the volume inconsistent between batches.
What we look for instead is a sort of standard that we and our clients can refer to.

For reference only, this is how we managed to achieve our goal.
It is not the most elegant solution, but it seems to work.

Per each single file:
1) Peak normalization to 0db using sox
2) normalize-audio -a -9dBFS for a standard RMS of around -9db
3) sox vol 0db 0.01 for a soft limiter to prevent clipping


Go to the top of the page
+Quote Post
DVDdoug
post Dec 13 2012, 19:15
Post #7





Group: Members
Posts: 2566
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454



If you boost the level by 3dB, the average and peak both increase by 3dB (assuming no limiting or clipping.) The ratio* between the peak and average is constant unless you do non-linear processing (clipping, limiting, compression).

QUOTE
1) Peak normalization to 0db using sox
2) normalize-audio -a -9dBFS for a standard RMS of around -9db
You can skip step 1. Peak Normalization is a volume adjustment, and adjusting to
-9dB is another volume adjustment.

QUOTE
3) sox vol 0db 0.01 for a soft limiter to prevent clipping
After adjusting to -9dB RMS, you'll have lots of "signal" above 0dB and several dB of limiting, which will probably cause some files to sound distorted. Soft clipping isn't as noticeable as hard-clipping, but it's still distortion.

QUOTE
Instead, it seems mp3gain does a batch analisys and make some sort of average.
When you change the audio batch, the average change, making the volume inconsistent between batches.
The "Album Gain" is a batch adjustment to keep the same relative levels throughout the album.... Loud songs remain loud, and quiet songs remain quiet the way the album was intended. If you choose "Track Gain", the songs are processed independently.

ReplayGain works great for me!, but nothing is perfect! Two humans might not even agree when two different songs are equally loud, especially if a song has loud-parts and quiet parts. Dynamic compression and limiting can help a lot, but they destroy the dynamic contrast in the music (if over-done).



* Decibels are logarithmic, so the dB is a constant number. If the peaks are twice as loud as the average, that's a 6dB difference and when you increase/decrease the volume (linearly), the ratio remains 2:1 and difference remains 6dB.

This post has been edited by DVDdoug: Dec 13 2012, 19:34
Go to the top of the page
+Quote Post
splice
post Dec 13 2012, 22:09
Post #8





Group: Members
Posts: 119
Joined: 23-July 03
Member No.: 7935



QUOTE (terataz @ Dec 13 2012, 09:18) *
...
Splice,
not sure how you did it, but you're quite right on all you've said wink.gif ...


I just did "Search for all posts by terataz" and read them. Then I thought to myself, "Where have I heard music like this?" beer.gif

This post has been edited by splice: Dec 13 2012, 22:12


--------------------
Regards,
Don Hills
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th August 2014 - 16:46