INTERACT FORUM

Please login or register.

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

Author Topic: Album-Based Replay Gain Plugin Proposal  (Read 2359 times)

salsbst1

  • Regular Member
  • World Citizen
  • ***
  • Posts: 244
Album-Based Replay Gain Plugin Proposal
« on: April 29, 2003, 03:29:22 pm »

I'm considering building (trying to build) a plugin for MC so that all songs from an album have a consistent replay gain applied to them.  I'm not an expert in MC and I've never studied its API before today, so please correct me if I'm wrong about anything.  And please share your ideas!

The reason I would build such a plug in is so that an album may be heard as it was designed to be heard, with softer songs playing softly and louder songs loudly.  Without correction, MCs audio analysis will level-out the reproduced volume (when the replay gain DSP is applied) across the album.

I think there are at least two schools of thought on how this would be done:

a) find the loudest song and use the replay gain (reduction) from that song for all songs from the album;
b) find the average replay gain (perhaps song-length-weighted) for the album and use that for all songs from the album;

example:

for some album:
track one RG: -4 dB, 7 minutes long
track two RG: -7 dB, 5 minutes long
track three RG: -10 dB, 3 minutes long

Under solution (a), all songs would be played back at -10 dB.  Under solution (b), all songs would be played back at -7 dB (mean of the three) or -5.73 dB (weighted mean by time of the three).

I'm sure there are other, some fancier, ideas out there... shout them out, please.  I would suspect that a fancier algorithm that re-calibrates an album based on weighted time in comparison to other albums would be ideal but I'm feeling like addressing the algorithm for the gain changes later.... right now I'm more concerned with the plugin architecture.  I'll allow for whatever algorithms people want to see.

So... the architecture.  I can see a few options for how to accomplish this.  My ideas are based on pretty limited knowledge of the MC api(s) and plugin options, so here's where I need some help/hand-holding.

One way to skin it would be to try to handle the "albumization" of replay gain during playback.  I think this would be done in a DSP plugin. However, I'm not sure that I would be able to access the rest of the album's track's replay gain values in order to do the calcuation.  That is, unless that DSP plugin shared memory with an interface plugin which had access to the handy methods to find the other tracks on an album (I assume that the AlbumGroup property of a file follows the algorithm J River set up having to do with album name and directory in the file system?).   Since I'm not a DSP guy (yet), I'm leaning away from this type of solution, though it's probably best.  Why is it probably best?  Because you can turn it on and off and because it doesn't mess with the individual repaly gain values calculated by audio analysis.

Another way would be to mess with the actual replay gain values.  While I don't think it to be as elegant as the playback-time solution, what I like is simplicity (I can churn this out pretty quickly).  I could create an extra field to store the analyzed replay gain value for every song, and replace their built-in replay gain with the album-based one.  The plugin would allow you to switch back and forth on an album-by-album basis (perhaps).

What do y'all think? Am I missing something?  Any feedback will be much appreciated.

Regards,
Stuart
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: Album-Based Replay Gain Plugin Proposal
« Reply #1 on: April 30, 2003, 01:18:01 pm »

The reason we haven't done album gain is because replay gain isn't really giving you anything if you're going to be listening to a whole album.

I mean, just turn it off if you're listening for that long of a stretch so there's no S/N hit.

Changing the volume knob every hour isn't the huge of a deal for me.  I only like Replay Gain when it saves me from hitting the volume every track. (like when I burn a mix for the car or something)

Just some thoughts...
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up