Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#228610 - 27/07/2004 06:01 Alternative auto-gain controls
Globbits
new poster

Registered: 21/05/2004
Posts: 29
Hi all

I've got a Mk2 Empeg, with Hijack kernel. Very VERY pleased with the unit, but am not fond of the various different volume levels of each of my mp3's!

I've had a play with the automatic volume control and I have to say it's very good. But, being a SQ nut, the fact that it auto-gain controls as it goes along means that the gain isn't constant throughout a track. Not acceptable I'm afraid

So, I've found mp3gain - a nice little utility which puts gain information into the id3 tag. Winamp seems to happily read this gain control and adjust accordingly. But, before I completely replace all the 45GB of files on my Empeg:

1) Does the Empeg support this sort of gain information?
2) If not, is there any way I can get this to work, without relying on Hijack's AGC....?

Thanks in advance

Richard
_________________________
I don't have a signature - this is a figment of your imagination

Top
#228611 - 27/07/2004 07:36 Re: Alternative auto-gain controls [Re: Globbits]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Quote:
So, I've found mp3gain - a nice little utility which puts gain information into the id3 tag. Winamp seems to happily read this gain control and adjust accordingly.

The mp3gain program alters the MP3 file's audio data itself, so the results are audible in any MP3 decoder, including that in the car-player.

Peter

Top
#228612 - 27/07/2004 09:01 Re: Alternative auto-gain controls [Re: peter]
Globbits
new poster

Registered: 21/05/2004
Posts: 29
Hi Peter

Fortunately, that's not how it works. The audio is left alone, and merely a gain control updated in the id3 tag. That's why it's such a better option, as the original audio isn't affected

Just want to find out if the Empeg will support its use
_________________________
I don't have a signature - this is a figment of your imagination

Top
#228613 - 27/07/2004 09:16 Re: Alternative auto-gain controls [Re: Globbits]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
That's not what the program implies, the program implies that it is changing the mp3 data, it stores the analysis & "undo" information in the tags.

Adrian

Top
#228614 - 27/07/2004 09:28 Re: Alternative auto-gain controls [Re: sn00p]
Globbits
new poster

Registered: 21/05/2004
Posts: 29
Quote:
From the mp3gain FAQ
Does normalizing the mp3 degrade its quality?
No. MP3Gain does not decode and re-encode the mp3 to change its volume. You can change the volume as many times as you want, and the mp3 will sound just as good (or just as bad!) as it did before you started.


Honest - it doesn't. I've converted my mp3's and the ID3 tag is the only bit that's changed....
Not only that, but if I play the music using iTunes, the volume level hasn't changed - that's why I'm asking the question


Edited by Globbits (27/07/2004 09:32)
_________________________
I don't have a signature - this is a figment of your imagination

Top
#228615 - 27/07/2004 10:26 Re: Alternative auto-gain controls [Re: Globbits]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Quote:
Fortunately, that's not how it works. The audio is left alone, and merely a gain control updated in the id3 tag. That's why it's such a better option, as the original audio isn't affected

Each MP3 audio frame has in its header a gain value which the decoder applies to the frame. The program goes through the file changing all these gain values (while leaving the rest of each frame alone -- that's what the FAQ answer is trying to say). I don't know why you don't perceive a difference in Itunes (perhaps it's using the tag data to undo the normalisation in favour of its own), but you certainly will on the car-player.

Peter

Top
#228616 - 27/07/2004 10:27 Re: Alternative auto-gain controls [Re: peter]
Globbits
new poster

Registered: 21/05/2004
Posts: 29
Ah ok - now that answer I like
Thanks - technical explanations are always welcome
Will update my Empeg tonight, and tomorrow, and the day after........
_________________________
I don't have a signature - this is a figment of your imagination

Top
#228617 - 05/08/2004 18:16 Re: Alternative auto-gain controls [Re: peter]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I think that this is untrue. According to the MP3 frame header "spec" on id3.org, MP3 frames seem to have the following fields in their headers:
  • Sync
  • mpeg-1/mpeg-2
  • Layer (mp2/mp3)
  • Checksum existence flag
  • Bitrate
  • Frequency
  • Padding byte existence flag
  • Private bit (?)
  • Stereo/Mono Mode
  • Mode extension (?)
  • Copyright bit
  • Original media bit
  • Emphasis
  • Optional checksum
None of these fields seems to be for volume change. Looking at the mp3gain source, it looks like it slaps the gain info in the Xing/Lame Info header/tag.

That being said, is the car player responding to mp3gain changes? How about the replaygain-suggested RGAD ID3v2 frame, if it were set?
_________________________
Bitt Faulk

Top
#228618 - 05/08/2004 18:27 Re: Alternative auto-gain controls [Re: wfaulk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Despite what that spec said, each MP3 frame *does* in fact have relative volume level information stored as part of it. Programs like MP3Trim and others *do* take advantage of this information.

I think the reason you didn't see it on that web page is because the information is not stored in the header. It's part of the actual data of the MP3 frame. It's still adjustable by a third-party program without needing to re-encode the frame, but it's not part of the header. Not certain about that, but I think that's the case.
_________________________
Tony Fabris

Top
#228619 - 05/08/2004 18:33 Re: Alternative auto-gain controls [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Yeah, upon further investigation, I think that you're right.

Annoying. It'd be much better if it'd just write a tag and players would respond to that tag. Even better, it uses APEv2 tags to store its analysis and undo information instead of the probably already existant ID3v2 tag, just to add to the bloat a little bit more.

Still, it definitely modifies the Xing/Info tag, too. Maybe that's just metametadata.
_________________________
Bitt Faulk

Top
#228620 - 05/08/2004 18:52 Re: Alternative auto-gain controls [Re: wfaulk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
What I don't understand is what does a program like MP3gain do in this case, where the classical recording has a couple of really huge peaks. If it increases the gain on all of the MP3 frames, those peaks will clip.

Or does it simply decrease the gain on everything else in your collection by a huge amount?

Either way it's an inelegant solution.
_________________________
Tony Fabris

Top
#228621 - 05/08/2004 19:01 Re: Alternative auto-gain controls [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
It decreases the gain on everything else. The designer then suggests that you may need a "pre-amp" gain to push things back up. He's also considered clipping scenarios.

I'd like to hear how it could be better, honestly, other than by opening a can of whoopass on all the producers and engineers who've decided that we'd prefer our music to be louder at the expense of dynamic range.
_________________________
Bitt Faulk

Top
#228622 - 05/08/2004 19:06 Re: Alternative auto-gain controls [Re: wfaulk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Quote:
It decreases the gain on everything else.

Meaning that when you hit that classical song in your collection, those peaks drive your amp to its limit and blow your speakers rather than just clipping digitally.

Quote:
I'd like to hear how it could be better, honestly, other than by opening a can of whoopass on all the producers and engineers who've decided that we'd prefer our music to be louder at the expense of dynamic range.

I agree. The only other solution is additional dynamic range compression above and beyond what's already been applied to the music. Which comes with its own set of problems of course.
_________________________
Tony Fabris

Top
#228623 - 05/08/2004 19:08 Re: Alternative auto-gain controls [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Also read this and this and this (repeat).
_________________________
Bitt Faulk

Top
#228624 - 05/08/2004 19:15 Re: Alternative auto-gain controls [Re: wfaulk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Heh, I love his pop/classical comparison, it looks almost exactly like mine.

He makes a good point about turning down the loud tracks. i.e., that most of their energy is already "up there" and that turning them down won't lose much quality.
_________________________
Tony Fabris

Top
#228625 - 05/08/2004 19:22 Re: Alternative auto-gain controls [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
The other option is to use dynamic range expansion on the compressed tracks. I bet you'd start to really hear the terrible compression artifacts, though.

Of course, the potentially better solutions are all both CPU-intensive and storage-intensive. The big advantage to replaygain is that it's CPU-intensive, but that can be done beforehand because it stores its data in 4 bytes per track (8 if you use per-track and per-album data).
_________________________
Bitt Faulk

Top
#228626 - 06/08/2004 05:58 Re: Alternative auto-gain controls [Re: wfaulk]
Globbits
new poster

Registered: 21/05/2004
Posts: 29
Just to chuck a very large spanner in the works, I've finished re-uploading my music with mp3gain's amended frame-volumes, and it's had absolutely no effect on the volume from the empeg!

Since I'd just installed emphatic 2.0 on the empeg, I did wonder whether it was that. So, I've now installed the latest hijack, but still no joy

Any ideas?
_________________________
I don't have a signature - this is a figment of your imagination

Top
#228627 - 06/08/2004 12:42 Re: Alternative auto-gain controls [Re: Globbits]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
That would be 100% in the player, currently.

However....

Is there a gain on the DSP that Hijack could tweak? It's feasible that we could write a tool to do real replaygain stuff (not munge the data like mp3gain is doing) and have Hijack read that data and adjust the gain based on it. This would be largely equivalent to the proposed method preferred by the author of replaygain.
_________________________
Bitt Faulk

Top
#228628 - 06/08/2004 13:49 Re: Alternative auto-gain controls [Re: Globbits]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Quote:
I've finished re-uploading my music with mp3gain's amended frame-volumes, and it's had absolutely no effect on the volume from the empeg!

Does MP3Gain have an option to either just *tag* the files with an offset number, or actually *apply* the gain changes to the MP3s audio data? If such an option exists, and you chose the former, then that would be expected behavior.
_________________________
Tony Fabris

Top
#228629 - 06/08/2004 18:21 Re: Alternative auto-gain controls [Re: tfabris]
Globbits
new poster

Registered: 21/05/2004
Posts: 29
Hmm - not sure how to answer that.
As I understand it, mp3gain stores a "marker" in the id3v2 tag, to say what the overall gain level is. When you apply changes, it then applies a general multiplier to each frame, to affect the gain. (Hope that makes sense?!)
So, to answer your question, it does both - but the key is that it (allegedly - I have my doubts) does affect the audio data

By the way, sorry for the slow responses - the notification messages are being filtered as Spam by hotmail
_________________________
I don't have a signature - this is a figment of your imagination

Top
#228630 - 06/08/2004 19:00 Re: Alternative auto-gain controls [Re: Globbits]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
mp3tag stores audio analysis and undo information in tags (though it uses APEv2 instead of ID3v2, just to be annoying). It also stores replaingain information in the Xing header or LAME Info header (which are virtually the same thing). It also seems to modify each mp3 frame to change its gain setting.

It seems that the latter part of that ought to affect playback on the player. I don't know why it wouldn't, really. Perhaps the tracks you chose were already close to the ideal that mp3gain tries to match. Perhaps the player somehow undid itself by reading both the gain info in the frames and in the tags (this seems highly unlikely).

See if you can find some real quiet track and a real loud track and mp3gain them and play them on the player. Let us know if they seem closer in volume or not.
_________________________
Bitt Faulk

Top
#228631 - 06/08/2004 19:22 Re: Alternative auto-gain controls [Re: wfaulk]
Globbits
new poster

Registered: 21/05/2004
Posts: 29
I have done, I'm afraid. Got a very eclectic selection on the empeg, with widely-varying volume levels. No difference I could tell - basically, I still have to change the volume by up to 10dB to get them to the same listening levels
_________________________
I don't have a signature - this is a figment of your imagination

Top
#228632 - 06/08/2004 19:39 Re: Alternative auto-gain controls [Re: Globbits]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Nuts. I'll have to do some experiments when I have time.
_________________________
Bitt Faulk

Top