Help - Search - Members - Calendar
Full Version: [Request] Replaygain mode "Auto"
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
fewtch
Request:

* Feature: Replaygain mode "Playlist" added (off/track/album/playlist) -- see below.

* Feature: Ability to store desired Replaygain mode in playlists. That way it would be possible to use "Track" mode in a folder full of random files... "Album" mode in a folder containing a full album... or just "Off" for a folder of files where no replaygain is desired. Playlist-based selection would be used when "playlist" is selected for the Replaygain mode.

Apologies if something like this has been posted before, I'm new to the FB2k forum.

Edit -- request changed slightly (name of function 'playlist' rather than 'auto').
picmixer
Hmh, sounds interesting.

You could actually achieve something similar already by simply making sure that the files that you want played back in track gain mode also only contain track gain values. On Albums you can have both Track and ALbum gain values.

Then simply switch replayain mode to album gain and Foobar will automatically switch back to tarck gain mode for those files that only contain track gain values.

Am not sure wether that fullfills the full funcionality you require though. And would take a bit of time to first remove the old replaygain info and rescan those files you only want track gained.
fewtch
Well... considering that people tend to store their files differently, it would make it easier to have an "Auto" (or "Auto - Playlist") Replaygain mode... storing a global value in a playlist would be way easier than retagging a bunch of files.

I have a few folders with a large bunch of random MP3 files, e.g. one is just called "Pop music" (and a couple others like that)... obviously album gain isn't any good there, but in most cases I have separate albums ripped from CDs that I listen to mostly in order. Would be nice to be able to use track gain on random collections, album gain on full albums, and maybe "none" in a few special cases where I needed to preserve the original gain values of a collection of files.

Anyway, hope Peter considers this, or something similar... would greatly appreciate it.
kjoonlee
QUOTE(fewtch @ Nov 20 2003, 07:05 PM)
I have a few folders with a large bunch of random MP3 files, e.g. one is just called "Pop music" (and a couple others like that)... obviously album gain isn't any good there, but in most cases I have separate albums ripped from CDs that I listen to mostly in order.  Would be nice to be able to use track gain on random collections, album gain on full albums, and maybe "none" in a few special cases involving lossless compressed files.


Excuse me if I'm mistaken, but if you're random collections are truly random, and don't belong to any album in particular, couldn't you just remove all %__REPLAYGAIN_ALBUM_PEAK% or %__REPLAYGAIN_ALBUM_GAIN% fields from those random collections? If there are no album replaygain values then foobar2000 will use the track values instead, regardless of your replaygain playback settings. (If there are no track values, then foobar2000 will use the album values.)
fewtch
QUOTE(kjoonlee @ Nov 20 2003, 03:19 AM)
Excuse me if I'm mistaken, but if you're random collections are truly random, and don't belong to any album in particular, couldn't you just remove all %__REPLAYGAIN_ALBUM_PEAK% or %__REPLAYGAIN_ALBUM_GAIN% fields from those random collections? If there are no album replaygain values then foobar2000 will use the track values instead, regardless of your replaygain playback settings. (If there are no track values, then foobar2000 will use the album values.)

Yes... it would be possible, but I'm just proposing an alternate (and easier) way of doing this from Foobar itself. And also -- what about people who don't tag their files and let Foobar decide instead? Since Foobar already makes it easier, why not make it easier still...

Excuse me if I'm mistaken too in anything I said above... I'm very new to FB2k.
2Bdecided
If your files aren't from albums, then they shouldn't have an album gain.

If you have a CD single with more than one track, then obviously you can give it an album gain. A CD single with more than one track counts as an "album", because the tracks were (hopefully) mastered together to be (probably) heard together.

But if you have an individual track of uncertain origin (you didn't <gulp> download these did you fewtch? ohmy.gif wink.gif ), then it should not have an album gain attached to it. (If you really want, the album gain could be set the same as the track gain, but I think that's wrong).

To calculate an album gain for a folder full of random tracks will ensure that album based ReplayGain playback maintains the unintentional loudness differences between these tracks. i.e. it prevents ReplayGain from working properly! Surely that's the last thing you want to do?

So, that's the answer for your situation: If you have individual tracks from different sources, don't store an album gain for these tracks.



As for auto switching ReplayGain track or album, depending on whether you're listening to tracks or a whole album? I don't think that's useful. If you want to even out loudness differences (because you're listening very quietly, or in a noisy environment etc) then you might choose track gain when listening to a whole album. If you want to keep intentionally quiet songs quiet (or just find that it works better), then you might choose album gain when listening to individual tracks.

Which RG value you use depends on whether you want all songs equal loudness (even intentionally quiet ones), or all songs kind-of-sensible loudness. It doesn't matter whether you're listening to tracks or albums IMO.

But if someone wants to program your suggestion, then it won't hurt anyone. I don't think it'll help though, and it'll confuse what track and album gain do.

FWIW I leave it set to album always, with the non replay gained files slider at -6dB.

Cheers,
David.

P.S. I'm very new to fb2k too - they seem a friendly lot, quite happy to help, and I can imagine that almost all possible features will be implemented eventually. It's so cool! (That'll be the icecream maker plug-in! wink.gif )
smok3
auto switch should imho:

nm.
fewtch
QUOTE(2Bdecided @ Nov 20 2003, 05:12 AM)
As for auto switching ReplayGain track or album, depending on whether you're listening to tracks or a whole album? I don't think that's useful.

Maybe not, but you've got to admit that it's logical at least... smile.gif
Peter
How about commands to change replaygain mode in playback menu (also assignable to keyboard) ?
fewtch
QUOTE(zZzZzZz @ Nov 20 2003, 06:35 AM)
How about commands to change replaygain mode in playback menu (also assignable to keyboard) ?

Sounds like a good idea too... maybe not quite as automatic as selecting mode based on playlists, but would easier switching.

Edit -- do you mean a command that would apply to everything in the current(ly playing) playlist, or only the current file? The first would be a nice option, not sure what the second would accomplish though.
kl33per
How about another drop-down box like the 'Order' drop down box.
2Bdecided
QUOTE(fewtch @ Nov 20 2003, 01:10 PM)
QUOTE(2Bdecided @ Nov 20 2003, 05:12 AM)
As for auto switching ReplayGain track or album, depending on whether you're listening to tracks or a whole album? I don't think that's useful.

Maybe not, but you've got to admit that it's logical at least... smile.gif

It sounds logical because the gains are now called track and album. And they're called Track and Album because that itself seems logical when you're writing the tags.

But when you're playing the material back, Radio and Audiophile (the original names) still make some sense, and then there's no logic to switching between them depending on whether you're playing tracks or albums, because that's not the point!


I wonder if there's a neat and simple way, still labelling them track and album, that makes it clear that you don't need to select "track" for tracks, and "album" for albums?! If it were me, I think I'd just put "(recommended)" next to "album", or have a pop up help window.

Cheers,
David.
Lodgikal
QUOTE(zZzZzZz @ Nov 20 2003, 02:35 PM)
How about commands to change replaygain mode in playback menu (also assignable to keyboard) ?

Good idea. That would be a much more convenient way to change replaygain mode "on the fly".

Another fine thing would be a special field (something like %_replaygain_mode%) to indicate what mode foobar currently operates in.
fewtch
QUOTE(2Bdecided @ Nov 21 2003, 02:54 AM)
It sounds logical because the gains are now called track and album. And they're called Track and Album because that itself seems logical when you're writing the tags.

But when you're playing the material back, Radio and Audiophile (the original names) still make some sense, and then there's no logic to switching between them depending on whether you're playing tracks or albums, because that's not the point!

"Radio" and "Audiophile?" Thank g-d someone had the sense to change those... "Radio" is suggestive of heavy compression/high volume and worse sound quality, and "Audiophile" suggestive of somehow improving the overall sound quality. What a nightmare it could have been if those names were kept, particularly in combination.

As far as using "Album" gain on a big folder full of tracks... sounds to me like a poor idea. You're treating a random collection of songs as something coherent (which it is not) and adjusting volume accordingly. Why would you want to do that? You likely still end up with major differences in volume between songs and defeat the purpose of ReplayGain.

P.S...
QUOTE
But if you have an individual track of uncertain origin (you didn't <gulp> download these did you fewtch?  ohmy.gif wink.gif )

The answer is no. A lot of my CDs contain "filler" that I never listen to, so instead of wasting hard drive space on that I created a few folders labeled "Pop Music" or "80's Wave" and just put the songs I like into those folders based on genre. It's a pain in the rear to individually ReplayGain such files (I use a variety of different softwares for encoding rather than a monolithic app), and I like the provision in Foobar2k to select the type of gain desired -- that's why I requested the feature at the top of the thread.
2Bdecided
QUOTE(fewtch @ Nov 21 2003, 01:31 PM)
As far as using "Album" gain on a big folder full of tracks... sounds to me like a poor idea.  You're treating a random collection of songs as something coherent (which it is not) and adjusting volume accordingly.  Why would you want to do that?  You likely still end up with major differences in volume between songs and defeat the purpose of ReplayGain.

It works really well. You fix the problem of hot and not-so-hot mastered CDs, but get to keep intentionally quiet songs quiet.

QUOTE
P.S...
QUOTE
But if you have an individual track of uncertain origin (you didn't <gulp> download these did you fewtch?  ohmy.gif wink.gif )

The answer is no. A lot of my CDs contain "filler" that I never listen to, so instead of wasting hard drive space on that I created a few folders labelled "Pop Music" or "80's Wave" and just put the songs I like into those folders based on genre. It's a pain in the rear to individually ReplayGain such files (I use a variety of different softwares for encoding rather than a monolithic app), and I like the provision in Foobar2k to select the type of gain desired -- that's why I requested the feature at the top of the thread.


If you've got more than one track from an album, then the ReplayGain album gain (calculated from just the tracks you kept from that album, or from all the tracks from that album) should be a sensible value.

But, assuming you didn't do that, (or even if you did) then one solution is just to delete the ReplayGain album gain value in all those files.

That would probably help a lot of people - I bet everyone has a folder of "other" stuff, and I bet some of those folders were treated as an album, and have silly album gains added to all the songs. It would be useful to just wipe all those values.

That sounds very easy, but can that be done automatically in a few mouse clicks somewhere?

Cheers,
David.
kjoonlee
QUOTE(fewtch @ Nov 21 2003, 10:31 PM)
A lot of my CDs contain "filler" that I never listen to, so instead of wasting hard drive space on that I created a few folders labeled "Pop Music" or "80's Wave" and just put the songs I like into those folders based on genre.  It's a pain in the rear to individually ReplayGain such files (I use a variety of different softwares for encoding rather than a monolithic app), and I like the provision in Foobar2k to select the type of gain desired -- that's why I requested the feature at the top of the thread.

I use $if(%__REPLAYGAIN_TRACK_PEAK%,,$rgb(255,0,0)) to make non-replaygained files stand out as red (as opposed to black) in the playlist. I would first remove all album gain info from the filler songs, configure the ReplayGain scanner to Skip tracks / albums that already have ReplayGain info (just to be safe), select all the red tracks, and Scan per-file track gain.

I hope this helps.. smile.gif
picmixer
Or use

CODE
$char(9)$if(%__replaygain_track_gain%,$puts(rg,'|'T'|'),$puts(rg,'|'X'|'))$if(%__replaygain_album_gain%,$puts(rg,'|'A'|'))$get(rg)


And you'll have a nice replaygain mode indicator at the very right of your string. Will tell you wether the file is album gained, track gained or not at all.

Simply copy and paste to the very end of your playlist string.
Lyx
QUOTE
Another fine thing would be a special field (something like %_replaygain_mode%) to indicate what mode foobar currently operates in.


think about the above suggestion for a moment! This simple feature could make some nice stuff possible!

I don't like the album modes which some formatting-strings use, but i have to admit, that such strings could use such a field to -automatically- switch between album and single mode. They could simply do a check against this field, and based on this decide to either operate in album or single mode.

Together with an easy way to switch replaygain mode (menu-option, keyboard-shortcut, toolbar) IMHO this sounds like a really nice idea!

- Lyx

EDIT: thinking about it..... together with storing the rg-mode in the playlist, it would be even more interesting.
Doctor
My 2c, if I may.

The playlist RG proposal does not sound hot to me. You will still have to provide a "default" to fall back on, and you have the PL management headache. Implementing a playlist command and allowing fb2k to obey it is enough. I don't care for it.

Hot key control of RG method is almost going back to just twisting the volume - manual RG. I think that nobody will use it, ever.

I don't really care for keeping intentionally quiet songs quiet. Nowadays, it's more like normal songs and overcompressed ones anyway.

But, I've been thinking about an authentic Auto replaygain for a while. I want Album gain when I'm listening to albums, and Track gain when I'm listening to tracks. Here's the algorithm:

When a new track is started, decide on gain.

If got no RG info, play straight; if got track but not album, play track; if got album but not track (weird), play album; duh.

Otherwise, we've got both and we want to choose one.

bool next_song_same_album = the song we are going to play after this one is from the same album (and perhaps even follows in the track order). Query the playlist for that, paying attention to random, "follows cursor" etc. (well, random means Track anyway) If there is no next song, the answer is "false".

Second, we want bool prev_song_same_album = previous song was from the same album. If we don't know what the previous song was, assume "false".

If (next_song_same_album || prev_song_same_album) use Album gain.

Now, I don't know the internals of fb, so it may be that the previous song is just unavailable. Then, check what RG method was used. If it was Album, use Album, if it was not set or set to Track, use Track.

That's it.
2Bdecided
Think about what this would do...

Consider two albums, 10 tracks each. Album 1 is generally much louder than album 2 (because album 1 is from 2003, and album 2 is from 1990). Track 5 on each album happens to be much quieter than the other tracks on the respective album.

If I cue up

Album 1 Track 5
Album 2 Track 5
Album 2 Track 6


It will go loud, quiet, loud.


Look at the other options:
If I used track gain throughout, all tracks would be the same loudness.
If I used album gain throughout, I'd get quiet, quiet, loud.
If I disabled ReplayGain, I might get: medium, quiet, medium.

If I used your suggestion, I'd get loud, quiet, loud.


I can't see the point of the last one, but don't let that stop anyone from programming it!

But if you do program it, you've got to answer the questions about why this new "ReplayGain automatic" mode doesn't seem to do anything sensible at all!

Cheers,
David.
GeSomeone
QUOTE(2Bdecided @ Nov 25 2003, 11:17 AM)
If I used your suggestion, I'd get loud, quiet, loud.


The point is you would get Track|Album|Album.
That could be nice if the last two belong together, but album gain makes less sense when not playing Albums smile.gif. I think the name is good as it has become now, try to explain something like this with Audiophile/Radio dry.gif


Speaking for myself the current choices are sufficient smile.gif
picmixer
QUOTE(GeSomeone @ Nov 25 2003, 12:16 PM)
The point is you would get Track|Album|Album.
That could be nice if the last two belong together, but album gain makes less sense when not playing Albums smile.gif.

Well to me Album Gain mode when playing single files (from full albums obviously) makes at least some sence. It will simply mean that tracks that where supposed to be quiet will stay a bit quiet and tracks that where intended to be louder will stay slightly louder. Doesn't matter wether they are from the same Album or not, does it?

Mixing up the two certainly does not make any more scence to me (see 2Bdecided's explenation). After all single files that are not part of a whole album arent suposed to have an Album Gain value at all and FB2k will then automatically switch back to Track Gain.
Doctor
2Bdecided: the algorithm I proposed is DWIM (Do What I Mean). In your example, you meant to get weird results and the algorithm obliged. ;-)

OTOH, it can be simpler and stabler. Something like, if I'm starting the first song of an album sequence, use album, otherwise, track. So, the only way you would get album is by playing one. I don't like it though, I want to be able to jump in the middle of an album.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.