INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Replay Gain - Radio/Album - Compromise  (Read 4780 times)

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Replay Gain - Radio/Album - Compromise
« on: April 09, 2004, 09:30:25 am »

Many of us have been asking for a better Replay Gain that handles whole albums (Album), instead of individual tracks (Radio).  For most albums Radio Replay Gain is just fine, but for Pink Floyd, live albums, Roger Waters and Alan Parsons, it just doesn't work well.  Tracks that run into each other, with no silence between the tracks, where the Radio Replay Gain calculates different values, causes abrupt volume changes in music that should smoothly flow from track to track.

I was listening to Alan Parsons / Tales of Mystery and Imagination this morning, it was unlistenable with Replay Gain turned on.  I can't remember to turn Replay Gain on and off based on the album type.

So how about just changing MC to allow us to manually change the adjustment Replay Gain value for tracks?  This simply means changing the adjustment value in the Replay Gain field, changing it from read only to user adjustable.


Then I could set the Replay Gain value for the Alan Parsons album, all tracks to the same value, and presto, problem solved.

While waiting for Album Replay Gain, this is a good compromise, that I assume is easy to implement, and solves everything for me.

What are your thoughts?

While waiting, does anyone know of a program that will allow me to modify the MC read only tags in APE and MP3 files, so I can do this Replay Gain adjustment now?
Logged

Madcow

  • Regular Member
  • World Citizen
  • ***
  • Posts: 170
  • moo!
Re:Replay Gain - Radio/Album - Compromise
« Reply #1 on: April 09, 2004, 09:54:37 am »

I asked for this a while back and got a fairly firm "no" (I was quite surprised as it seemed like a small tweak to make):

http://yabb.jriver.com/interact/index.php?board=3;action=display;threadid=16909;start=msg116582#msg116582
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #2 on: April 09, 2004, 10:00:14 am »

Good, I'm not the only one who wants this.

MC must have their reasons for not changing this for us (unknown to us), but there must be some other external program that will allow us to change MC read only tag values.  Anyone know of one?

I'll be doing some google research on this subject this weekend.
Logged

skeeterfood

  • Citizen of the Universe
  • *****
  • Posts: 779
  • We're all just food for the skeeters.
Re:Replay Gain - Radio/Album - Compromise
« Reply #3 on: April 09, 2004, 10:26:51 am »

OK, first download Tag Frontend from http://members.home.nl/w.speek/tag.htm

Inside the zip you will find Tag.exe, Tag.cfg, and Tag.txt.  Extract those files to a directory of your choosing.

If you simply run Tag.exe on a file, it will spit out all the tags available.

The tag you're looking for is "Replay Gain (radio)".

You can update the tag with the following command:
Code: [Select]
tag -t "Replay Gain (radio)=<value>" <filename> (replace <value> with your desired gain value)

There you go...

-John
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #4 on: April 09, 2004, 10:32:09 am »

Thanks, I'll give it a try this weekend.
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #5 on: April 09, 2004, 12:55:35 pm »

Question to MC:

Is our idea of making the Replay Gain value user edit-able being considered?

If not, which is of course your choice, will you tell us why?
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #6 on: April 09, 2004, 03:48:56 pm »

-John
John, thanks for the info on the Tag program, works like a charm.

For anyone else reading, the Tag.exe command takes wildcards, so all one needs to do it get a DOS window, cd to the dir where the files to change are and enter:

tag -t "Replay Gain (radio)=<new-value>" *.ape

The replay gain is updated in all files.  I'm sure MC will need to reread those files to get the new values.

GEEK INFO:  The "Last Played" field is stored in seconds since 1/1/1970.  Which is the UNIX format for storing date/time information.   Not sure what size variable MC is using, but a "time_t" type in UNIX is a "long" and will not be large enough to hold the value sometime in 2038.  

So now i have to worry that I won't be able to use MC in 34 years, I'll report it as a bug then....
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #7 on: April 10, 2004, 12:44:24 pm »

Wow - this works so GREAT.  I can't believe how many albums I subconciously avoided listening to, due to vastly different Replay Gain settings across all the tracks.   Now that I  can set the Replay Gain for the WHOLE album to the same value, I've rediscovered some albums.

On Alan Parsons Project / Tales of Mystery and Imagination, the Replay Gain settings varied from +8 to -7 db, a whopping 15db difference between tracks that should all be alike, or close.  The softly spoken tracks with Richard Burdon talking were +8, no longer softly spoken compared to the rest of the album.

The existing Replay Gain works great for 95% of what it scans, but like most "automated" tasks, there needs to be an override.

So I ask again, that MC make the Replay Gain setting user adjustable.  There is a perfectly workable workaround posted in this thread (thanks John), but it could be easier.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #8 on: April 10, 2004, 02:53:10 pm »

I also would love an "Album Gain" feature in MC, but for the time being, I'll use this method.

Question for you guys using this tagging method:

Do you calculate the average replay gain for an album (song1+song2+...songn/n) and then set each song to that value?  It seems the most logical way in order to make the album gain as close as possible to the 'ideal' for your playlist.
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #9 on: April 10, 2004, 03:01:42 pm »

I'm still experimenting on how to know what the set the whole album at.  A simple average could be used, but that would give more weight to short tracks.

On the Alan Parsons / Tales of Mystery and Imagination, there are are few tracks, very short tracks that MC sets at +8db, but it hardly seems right to give those short tracks equal effect on the final setting.  So I've been multiplying the MC value * the  track seconds for each track, adding them up and then dividing by the total seconds.  (I wrote a program to do all this for me)

Seems okay so far, but I doubt there will ever be a perfect method, it will take some tweaking.  However, I don't think +-2 db is meaningful.  The average person can hear a 3b difference in levels.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #10 on: April 10, 2004, 03:07:21 pm »

Ahh, I had not considered track length.  So an average based on track length/total album length would make more sense.  I think I'll setup a spreadsheet for this method...  It would be nice if someone could make a plugin to do this for us!  :)
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #11 on: April 10, 2004, 03:12:35 pm »

Hmmmm... I don't have a clue on where to start doing a plugin....  Good idea though.  

I export my entire MC database to a delimited txt file, and I wrote a C++ program to read the file, and write me a set of html files for my entire collection.  Last night I added the code to do the Replay Gain calc for all albums and display it on my web page.  

I'm thinking of excluding short tracks from the calc, the shorter the track, the less likely the single track replay gain value is meaningful to the rest of the album.

So when I want to reset the replay gain on an album, the calc'd value is already done on my web page.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #12 on: April 10, 2004, 03:26:30 pm »

That makes some sense.  On a random smartlist, I generally exclude short (45 seconds or less) songs so that I don't get random 'intros' anyway.  Excluding those, or reducing their weight would help make the other songs fit into the playlist better.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #13 on: April 10, 2004, 06:52:47 pm »

pbreet,

Do you have a way of automating the adjustments of the Replay Gain tags?

I have built a spreadsheet that calculates the percentage (timewise) that each song takes up on its album.  The percentage figure the spreadsheet calculates is then multiplied by the replay gain that MC calculated during audio analysis.  Then, all these weighted replay gains are summed for each album resulting in a duration weighted replay gain.

I left in the very short tracks because I think using this method, they won't affect overall replay gain much.

Anyway, it would be nice to have a way to apply these "corrected" replay gains automatically, but for now, I'll start doing it manually with the software linked above.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #14 on: April 10, 2004, 09:49:15 pm »

Ok, done... I used Excel to calculate everything, and then generated a DOS batch file from a spread sheet that applied the Album Gain to each song.

So far, I like it a lot!  I can listen to a random play list without too much volume variation, and I can listen to whole albums without the volume changes that can ruin a good Pink Floyd recording.  And I never have to turn off Replay Gain!
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #15 on: April 10, 2004, 09:54:13 pm »

I'm still tweaking my album replay gain calc, I think I need to implement a standard deviation on the MC Radio Replay Gain values to eliminate the "outliers", and then average the remaining tracks (weighted by track length).  Outliers would be short tracks with WAY outragious MC replay gain values.

This is kind of fun getting this right.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #16 on: April 11, 2004, 12:20:53 am »

Indeed, this is an interesting process.

I am fairly happy with my results so far, but no doubt using some more detailed analysis would net an improvement.  I am interested in seeing what you ended up doing!

My current problem is that the replay gains I have set now range from almost -16 up to -1.3.  The CD with a RG of -1.3 is Dire Straights-Brothers in Arms.  Back then, the music industry didn't see a need to 'crank up' their digital recordings and as a result, this album is one of the best sounding even to this day.

The problem now is, how do I fit all this together?  I'd like to use my previous adjustment setting of +5, but with the 'quieter' CD's, I'll be clipping quite a bit.  I guess I am going to try playing with a +1.3 setting, even though at that level, any Windows error beeps will probably blow out my speakers! :)
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #17 on: April 11, 2004, 11:38:04 am »

I am fairly happy with my results so far, but no doubt using some more detailed analysis would net an improvement.  I am interested in seeing what you ended up doing!

I'll be playing around with using standard deviations this week, I can do calc, but I need help in knowing how many standard deviations to consider valid data.

Quote
My current problem is that the replay gains I have set now range from almost -16 up to -1.3.  The CD with a RG of -1.3 is Dire Straights-Brothers in Arms.  Back then, the music industry didn't see a need to 'crank up' their digital recordings and as a result, this album is one of the best sounding even to this day.

My Brothers in Arms (remastered) is quite loud in volume, my RG's for that album range from -5 to -12.  Which still points out to me that album replay gain is the right way to go, all tracks on any album should always have the same adjustment value.

Buddy Guy / Sweet Tea is one of the worst mixed albums, every track is maxed out in level, with no dynamic range.

Quote
The problem now is, how do I fit all this together?  I'd like to use my previous adjustment setting of +5, but with the 'quieter' CD's, I'll be clipping quite a bit.  I guess I am going to try playing with a +1.3 setting, even though at that level, any Windows error beeps will probably blow out my speakers! :)

I have two sound cards, one for normal windows sounds, and the other high quality card, just for MC, so I don't have that problem.  MC is easy to set up with two sound cards, in the options, you choose which card MC sends music to.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #18 on: April 11, 2004, 01:38:45 pm »

Actually, I am already using two sound cards.  The onboard sound on my nForce motherboard is what I am using for audio.  But I think the Windows sounds automatically switched from my SB Extigy (my old external USB sound processor) to the nForce when I enabled it...  I had forgotten about this and will go switch the Windows audio right now.  

Actually, I think my setup is fairly unusual.  I am feeding the nForce optical output (ASIO) into the SB Extigy for D/A conversion.  This isn't the best solution, but it's not too bad as it gives me some external volume control (and remote control) in addition to my speaker volume... And it allows me to plug in headphones easily (and this mutes the main speakers).

I wish I could help you on the statistical analysis, but it's been about 10 years since I had statistics in Engineering school and I doubt I could remember enough to offer any useful advice.  I was thinking about digging out my old textbooks, but I think they are buried somewhere in storage.

p.s.  My copy of Brothers In Arms is the original CD release.  It is a very very quiet CD.  Even before I applied an Album Gain to it, the RG's were all above -5, I can't remember for sure, but I think some may have been positive.
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #19 on: April 17, 2004, 11:14:45 am »

The Tag program mentioned in this thread works for 95% of my ape and mp3 files.

It seems to crap out on any file with lyrics in the tags ( I played around getting lyrics a while back ).

Does anyone know of some other program that will let me change the Replay Gain tags in the music files as tagged by MC?

(while we wait for MC to someday, make the Replay Gain settings user changable).
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #20 on: April 17, 2004, 12:54:48 pm »

That's odd pbreet.  90% of my APEs have lyrics and I never ran into an issue.  It took me some time, but I now have my entire library tagged for album gain in MC, and analyzed for album gain in foobar2000 (which stores replay gain in 4 custom tags different from MC's).  The only time I ran into any issue, is when I tried to tag a file I was playing in MC - doh!.

I wonder what could be causing your issues?

As a side note, I have found some odd behavior in other software (like foobar) that seem to be caused by the tags that MC places inside the APE files.  I am still trying to track down what the problem actually is, but am having no luck finding a tag viewer for APE files that shows *all* custom tags.
Logged

pbreet

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #21 on: April 17, 2004, 06:21:11 pm »

That's odd pbreet.  90% of my APEs have lyrics and I never ran into an issue.  It took me some time, but I now have my entire library tagged for album gain in MC,

Yes, I've got my entire library set for album gain now too, but for some files where I can't get the Tag program to work, it gets done displaying the lyrics and then hangs forever until I kill it.  I've remove the lyrics in MC, but they still show up as described using the Tag program.

I was trying to write my own tag program, I can find the "Replay Gain (radio)" string in the music files, but the value doesn't seem to follow it, else it's in binary, but (and I know little about the tagging methods), I would have expected all to be stored as strings.    I suppose I could do the research to learn how to access and update tags. too bad the Tag program doesn't work for me.

Or I could do lots of reripping.....  writing the program would be more fun.

 
Quote
I am still trying to track down what the problem actually is, but am having no luck finding a tag viewer for APE files that shows *all* custom tags.
Please let me know if you ever find one, Thanks.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #22 on: April 18, 2004, 12:54:48 am »

It appears that APEv2 tags values are stored mainly in UTF-8 (recommended), or alternately binary (not recommended) format.

http://www.personal.uni-jena.de/~pfk/mpp/sv8/apetag.html
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #23 on: April 18, 2004, 01:34:42 pm »

It turns out that foobar2000 has an extremely powerful tagger called masstagger.  If you can figure out how to use it (not much documentation), you can run scripts that will do just about anything, including reading values from a text file.

I just used it to copy 'replaygain_album_gain' that foobar calculates into the 'Replay Gain (radio)' tag that MC uses for all of my APE files.
Logged

SXSW

  • Regular Member
  • Member
  • *
  • Posts: 1
  • Change this by choosing profile
Re:Replay Gain - Radio/Album - Compromise
« Reply #24 on: April 27, 2004, 11:28:32 pm »

Has anyone managed to make this simpler for non-techies like me?  I'd really like to figure out a way to import the album gain tags as calculated by Foobar2k into MC's radio gain tags.  Could anyone walk me through it?  Thanks for any help.
Logged

paulr

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 527
  • nothing more to say...
Re:Replay Gain - Radio/Album - Compromise
« Reply #25 on: April 27, 2004, 11:39:13 pm »

SXSW,

If you are using APE files, check out this thread in the 3rd Party section of the forum:  http://yabb.jriver.com/interact/index.php?board=5;action=display;threadid=20914

The instructions may look daunting at first, but if you follow it step by step and use copy/paste for the script, it should work flawlessly.

I don't use any other formats besides APE, so I haven't looked into importing tags from Foobar for others...  But maybe this will give you some ideas on how to accomplish it if you don't use APE.

This process works very well for me....  Until, that is, MC supports album gain natively!  (hint)
Logged
Pages: [1]   Go Up