Per-album volume leveling

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Per-album volume leveling

by nynaevelan » Fri Feb 08, 2008 11:09 am

IS this MM3 compatible? If not, does anyone know of a source which I can use to analyze albums with only 1 track since MM3 will not process them??

Nyn

by Max Power » Fri Jul 13, 2007 1:36 pm

Thanks guys! This is much more useful than leveling on a per track basis. Script works great... took about 5 minutes to do ~14,000 songs.

Re: script

by onkel_enno » Tue Aug 23, 2005 7:37 am

psyxonova wrote: For one more time....
Excellent Job Onkel!!!! :lol:
Image

Now I know whom to ask for moving Threads around :lol:

Re: script

by psyXonova » Tue Aug 23, 2005 6:43 am

Sarkos wrote:I'm starting to think this conversation should be moved to the Scripts forum... I apologise for the long post but I don't have a website to put the script on :(
I agree with you and this is why i moved this post here. This way people can have the chance to find this amazing script easilly

For one more time....
Excellent Job Onkel!!!! :lol:

by onkel_enno » Tue Aug 23, 2005 12:02 am

And everybody's happy now 8)

by Sjettepet » Mon Aug 22, 2005 1:57 pm

Success here! Sorry for my earlier doubts Onkel.

Sjettepet

by Sjettepet » Mon Aug 22, 2005 1:13 pm

:oops: Never got such a quick reply in any forum. Thanks Adamo! I'll try again.

Sjettepet

by Adamo » Mon Aug 22, 2005 1:10 pm

Sjettepet wrote:Tried it on 7 albums, but I after the confirmation I got no progress indicator or any sign that the script had finished. Also the "leveling" column remains blank. What is normal behaviour? Did I do something wrong?
You have to use MM's built-in volume analyzer on the tracks first (Tools>Analyze Volume). All this script does is use the pre-analyzed values and set the rest in the album to that of the track with the highest volume.

by Sjettepet » Mon Aug 22, 2005 1:05 pm

Tried it on 7 albums, but I after the confirmation I got no progress indicator or any sign that the script had finished. Also the "leveling" column remains blank. What is normal behaviour? Did I do something wrong?

Sjettepet

by Sjettepet » Mon Aug 22, 2005 12:51 pm

O.k. I can't wait to try it myself. It would make me an even happier monkey! I'll report back.

Sjettepet

Re: script

by Adamo » Mon Aug 22, 2005 12:43 pm

Sarkos wrote:Use it at your own risk :o
Throwing caution to the wind, ran on entire library. Works great. Great work.

script

by Sarkos » Mon Aug 22, 2005 12:02 pm

I rewrote onkel_enno's script to do all your albums at once. It works ok on my pc. Use it at your own risk :o

I'm starting to think this conversation should be moved to the Scripts forum... I apologise for the long post but I don't have a website to put the script on :(

If you want to debug, uncomment the SDB.MessageBox line near the bottom, and comment out the next 2 lines.

Code: Select all

Option Explicit
'This Script will set the Volume Level of all selected Songs
'to the Volume Level of the loudest Song

'1. Create a file AlbumVolumeLevel.vbs in MediaMonkey\Scripts and paste these lines
'2. Add this Section to Scripts.ini

'[AlbumVolumeLevel]
'FileName=AlbumVolumeLevel.vbs
'ProcName=AlbumLevel
'Order=12
'DisplayName=Analyze Album Volume
'Description=Analyze Album Volume
'Language=VBScript
'ScriptType=0

'3. restart MediaMonkey
'4. you'll find "Analyze Album Volume" in Tools\Scripts

sub AlbumLevel

	dim list
	dim song
	dim result
	dim i
	dim albumMap
	dim albumId
	dim level
	
	set albumMap = CreateObject( "Scripting.Dictionary" )
	set list = SDB.CurrentSongList
	
	if list.Count = 0 then
		set list = SDB.AllVisibleSongList
		if list.Count = 0 then
			SDB.MessageBox "No tracks selected", mtError, Array(mbOK)
			exit sub
		end if
	end if
	
	result = SDB.MessageBox( "Are you sure you want to level " & list.Count & " track(s)?", mtConfirmation, Array( mbOK, mbCancel ) )
	if result = mrOk then
		for i = 0 to list.Count - 1
			set song = list.Item(i)
			albumId = song.Album.ID
			level = song.Leveling
			if level <> -999999 and albumId > 0 then ' if the song has been levelled and is part of an album
				if albumMap.exists( albumId ) then ' if there is a min level for this album
					if level < albumMap.Item( albumId ) then ' check this song level against the min level
						albumMap.Item( albumId ) = level ' assign if lower
					end if
				else
					albumMap.add albumId, level
				end if
			end if
		next
		
		for i = 0 to list.Count - 1
			set song = list.Item(i)
			albumId = song.Album.ID
			if albumId > 0 and albumMap.exists( albumId ) then
'				SDB.MessageBox """" & song.Title & """ from " & song.Leveling & " to " & albumMap.Item( albumId ), mtInformation, Array(mbOK)
				song.Leveling = albumMap.Item(albumId)
				song.UpdateDB
			end if
		next
	end if

end sub

by Adamo » Mon Aug 22, 2005 8:00 am

onkel_enno wrote:I don't really understand why the amount is stored by which the volume of the track should be increased/decreases and not the real Volume Level.
Thanks writing a much more elegent fix than mine. As for why the actual (corrected) volume is not used as the stored value, this is probably because all of the values would end up being the same. MM is levelling each and every track to one target dB value (zero?). So, the only meaningful value would be the difference between original and corrected.

Of course, the ORIGINAL volume of the track would be useful to know, but might prove to be even more confusing to the average user.

by onkel_enno » Mon Aug 22, 2005 7:14 am

Sjettepet wrote:With Album Leveling all albums would sound as if they had been recorded/mastered at the same level, while the dynamics between the tracks would be preserved.
I still believe that the Script does exactly what you're describing.

I copied s.th. from the Audiograbber-Help:
Normalizing means how loud a track is recorded. Different CD's, just like LP's from the old days, are usually recorded at different volumes. All tracks on the same CD are individually, recorded at about the same level and as long as one listens to only one CD at a time there is usually no problem with the loudness of the CD.

The problem starts when you mix tracks from different CD's because they occasionally have an output level that differs from one CD to another. One CD can play quite loud and another noticeably quieter. The normalize function comes in handy in these cases and you can select the same level for all your CD's.

Most of the CD's are properly recorded and the normal level is usually between 95-99 %. By choosing to normalize only the tracks normalized to less than about 91 %, your result will be that all the songs will have approximately the same volume and most tracks will be left in their original condition. These percentage values detect when the sound is loudest on the track. Normalize to 0% means absolute silence.
Audiograbber uses percentage, not dB.

IMHO if for track volume the loudest sound is important, than for album volume it should be the loudest track.

@Sjettepet
Surely it is possible to write a script that does it for all albums, but let's wait and see if it's correct this way or not.

by Sjettepet » Mon Aug 22, 2005 6:50 am

onkel_enno wrote:Album Leveling means that the whole Album is leveled by the loudest track of that album, right?
Err, I don't think so Onkel. I would describe it as levelling albums rather than tracks.

For example, the result of corrent volume leveling implementation may look like this:

Album A:
track 1: -4.3
track 2: +0.9
track 3: -0.6

Album B:
track 1: +2.1
track 2: +1.3
track 3: - 5.4

This means that the difference in volume level between tracks on a given album is affected. And, as the topic starter rightly points out, this should not be desired since most albums have been professionally mastered.

In the above result, Album A may, after volume leveling, still "sound" at a higher or lower volume than Album B, simply because the original was mastered at a different overall volume.

Album Leveling such as Sarkos proposes would be very sensible and very welcome. It's result would look more like something like this:

Album A:
track 1: -2.1
track 2: -2.1
track 3: -2.1

Average bit volume on Album A: 60dB (or highest: 87dB)

Album B:
track 1: +0.3
track 2: +0.3
track 3: +0.3

Average bit volume on Album A: 60dB (or highest: 87dB)

The numbers given have no mathematical meaning but just serve as an example to indicate the difference between the two sorts of volume leveling.

With Album Leveling all albums would sound as if they had been recorded/mastered at the same level, while the dynamics between the tracks would be preserved. Current volume leveling kills dynamic range of an album.

Sjettepet

Top