IPB

Welcome Guest ( Log In | Register )

"MP3Gain: How can it be possible?", It 's indicated that the gain adjustments are lossless
Typhoon859
post Aug 1 2012, 00:35
Post #1





Group: Members
Posts: 19
Joined: 19-December 10
Member No.: 86635



So I've been thinking of trying to write a similar program from scratch and there's one main thing that I don't even understand how it's possible, yet alone done. So as is said, the process MP3Gain uses is lossless. Thinking about it, the only way MP3Gain could work where any player would play back the songs with whatever the target volume was would be if the change is present in the waveform. After MP3Gain is applied, if it weren't obvious from the beginning, in any audio editing software, the gain reduction is clearly visible. I could somewhat understand how the process can be reversed with added value, even if the waveform clips, as the information could still somehow be stored (more easily than the other way around). On the other hand, when taken away, don't you permanently lose the dB that you took from the threshold? As an example, if a song starts with some 6 decibel ambient noise and you reduce the song by 6dB, wouldn't that intro just completely disappear? And if the change is undone, wouldn't you not get any of the data back (unless it's stored) and just make the existing data 6dB louder? If that's the case, it isn't really undoing the changes; it's really just adding the difference in value back between the indicated ReplayGain value and what it is now.

Sorry this was kinda long-winded but the last thing though I'd also like to ask about is clipping. If a track's peak values are clipping by default, reducing the loudness now would be too late, wouldn't it? Wouldn't it be clipping no matter what at this point, contrary to what is indicated? The peaks would be chopped off either way since the structure of the waveform is no longer saved after being finalized. And also, the maximized volume indications don't make sense (has to be turned on in the options). For example, I have a file which ReplayGain indicates peaks at about 1.05 (16-bit = 100.8dB) and yet it's marked that only a 1.5dB reduction would be necessary to get it maximized (the loudest point before clipping - 96dB). Is there something I'm missing?

Thanks guys! Answers to these would be extremely helpful.


PS- A lot of the things here indicate to me that the values, whether over or under, remain as part of the data in the container but just doesn't play back, or rather, clips since it's within the 16-bit parameter.
Go to the top of the page
+Quote Post
 
Start new topic
Replies
Typhoon859
post Aug 2 2012, 06:40
Post #2





Group: Members
Posts: 19
Joined: 19-December 10
Member No.: 86635



First of all, I'd just like to say that many of you are underestimating my knowledge and how easy it would be to explain certain things to me, just with a limited number of jargon. Just because you may have learned something first doesn't mean that it's the order someone else may have learned. In other words, just because a certain understanding of facts preceded something else for you doesn't mean that's the only logical way it could make sense. That shouldn't be a factor in the first place in my opinion; this is a forum. What's especially annoying is that many of the remarks have a negative connotation but whatever, I'll ignore that as it is I after all who's seeking for help. I can put up with it as long as it isn't constantly reiterated. You're either willing to educate on the subject matter or you're not.


QUOTE (2Bdecided @ Aug 1 2012, 08:59) *
...with "mp3" in front...
http://lmgtfy.com/?q=mp3+global+gain

The first thing I did was search this and I actually found a useful link in this very forum: http://www.hydrogenaudio.org/forums/index....ic=24527&hl. It's largely stuff I knew for a short while at some point. I can't believe I completely forgot about it all. That still only answers for a bit of my confusion. Anything there though could've easily been explained with about three sentences, but moving on...


QUOTE (pdq @ Aug 1 2012, 09:16) *
I seem to recall that the dynamic range of the mp3 format is in excess of 200 dB. While this is not technically the same as float 32, it is way more than needed in any real world situation.

Edit: The convention is to equate 1.0 with zero dB and anything smaller as negative dB. That way it makes no difference if you are talking about 16 bit integer, 24 bit integer, 32 bit float etc. Full scale for integers is 1.0 = 0 dB, while for float 1.0 is still o dB, it's just not full scale.

Edit2: dB is a logarithmic scale. Multiplying or dividing the amplitude by a factor means adding or subtracting the properly scaled logarithm of the factor to the dB.

Certainly, I mean, the threshold of pain starts as low as around 120dB SPL. The idea should really be so that recordings, when equivocally reproduced at 0dB, sound as loud as the instruments/effects in them would be in real life, or rather, as loud as intended. So anything above 140dB FS shouldn't really even exist and above 130 would really just be unnecessary (though the option for it should exist), so since what you say is actually the case, then yes, MP3 is capable of reproducing more than enough dynamic range. Just for clarification, the global gain field is limited in adjustment to 8-bit integers and each increment relates to ~1.505dB. Wouldn't that mean that it's capable of reproducing a dynamic range of ~383.775dB? Or, is it limited to a 32 bit depth which would be 192dB FS? Lol, I have a feeling that neither is right but I think I'm getting closer. XD

When I saw that the values were represented as 0.xxxxxx-1.xxxxxx, I pretty much instantly realized that the point was to compensate for differences in potential bit depth values. I incorrectly assumed (due to lack of conceptual practice) that it relates to the maximum values of each bit depth so in the case of 16-bit, I was thinking 1.0 = 96dB. As it logically makes sense, it actually relates to 0dB FS in relation to a bit depth value. I don't quite understand "float" beyond possibly an incorrect educated guess that it goes well beyond 192dB if not limitless? <Shrug> That wouldn't make sense though. Doesn't there need to be a cap?

I don't get what 1.05 represents though if it's not relative to 96dB or 144dB or whatever it may be. How is it determined?


QUOTE (db1989 @ Aug 1 2012, 09:24) *
There is no such thing as a 16-bit MP3, as you have already been told.

I understood that the first time. That's why I said within the parameters of 16-bit. An MP3 can be encoded with a 24-bit parameter as well so TO WHATEVER THIS APPLIES TO (as I understand it's not a direct application on the file), when I'm referencing 16-bit, I was already corrected that it's a decoding limitation so that is to what I refer. You can clarify that further for me, as I was asking, or you can patronize me ON A FORUM where people come to inquire for help due to lack of knowledge on a subject. Whichever makes you feel better I guess...

Now, can we keep it cool from here? If you don't feel like answering any of my inquiries because you feel that my knowledge level is way below what is worth your time (however that makes sense), then simply don't respond.

QUOTE
Because 1.0 is an instantaneous point, specifically the maximum, on a waveform with possible amplitudes between -1 and 1, on a linear scale; whereas a decibel is a measure of loudness based on the aggregation of many samples over a period of time, measured logarithmically. A sample at +1 alone does not equal either 96 dB, 0 dB FS, or any other measure of decibels.

Assuming that your reference to 96 dB means dynamic range – rather than, for example, dB SPL, which is not relevant – to have/demonstrate this, the file would need to contain least two waves: one oscillating between 1 and 1, and one between (-1/32768) and (1/32767).

I know the amplitude of a waveform ranges from between 1 and -1. In relation to a bit depth value, 1 does equal to 0dB FS though. I thought that's what it was in relation to, no? If not in relation to anything, then how does it determine if there is clipping at all? EDIT: MJB2006 mentioned the values which it relates to.

I of course didn't mean 96dB SPL as that's obviously not relevant; not sure why it was necessary to even go there besides in a false attempt to put yourself on higher grounds. I however admit (no reason why I shouldn't or should not have admitted anything else) that I don't understand why the second wave is necessary and how or why this would be true. How could I when things are just randomly thrown out there without explanation? Should I go look that up as well - anything I don't know which is mentioned? That's the premise under which I came here in the first place.

QUOTE
Again, linear vs. logarithmic. Without intending offence, considering this and the fact that you don’t know what the time and frequency domains are, it’s probably time to do some background reading before continuing with this thread.

Linear vs. logarithmic - got it. I just restated my thoughts and was asking what would be the correct way to go about understanding this. You get much more from a simple explanation from interaction and experience than you do from an irrelevant three chapters in a book to get to (if even) one relevant statement, all of which will be forgotten without actual application and/or practice.


QUOTE (saratoga @ Aug 1 2012, 11:06) *
MP3s do not have an associated number of bits, or even any specific precision at all. Number of bits is a property of PCM, which MP3 is definitely not.

Ok, but MP3s can be told to limit the decoding of it to 16-bit PCM; is that not true? If it is, then regarding this specifically, that's what I meant even if I didn't initially understand correctly. If that's in fact not true, then what does the 16-bit parameter in an MP3 file indicate then?..

QUOTE

Sigh... Like I've never been there and not more than once even...

This is the equivalent of you asking somewhere about a question which has something to do with gradients which you conceptually understand just not practically and I link you this: go ahead, click this...

Your first response was genuine and it was appreciated; try not to feel like you're on a battle front and that you need to affiliate with the group mindset.

QUOTE
This isn't something you can learn from an internet forum. You'll need a textbook.

You're assuming too much about me and in general. I'm sure if I understood what those terms were about, I'd easily be able to explain it to somebody with a simple response and expand further on things they might further not understood. Past a certain point I guess it would be fair to say that it's up to them to make any further connections. In this case here, I don't think the line has even been anywhere near reached. There is such a thing as a "bad teacher" you know. Not only that but the better the teacher, the simpler and better he/she could explain more complicated things.

This post has been edited by Typhoon859: Aug 2 2012, 07:29
Go to the top of the page
+Quote Post

Posts in this topic
- Typhoon859   "MP3Gain: How can it be possible?"   Aug 1 2012, 00:35
- - greynol   You appear to assume that mp3 data is 16-bit integ...   Aug 1 2012, 00:50
|- - 2Bdecided   QUOTE (greynol @ Aug 1 2012, 00:50) I rec...   Aug 1 2012, 13:59
- - saratoga   QUOTE (Typhoon859 @ Jul 31 2012, 19:35) I...   Aug 1 2012, 02:25
|- - greynol   Since we're not dealing with power, a ~0.2dB i...   Aug 1 2012, 03:30
|- - saratoga   QUOTE (greynol @ Jul 31 2012, 22:30) Sinc...   Aug 1 2012, 15:01
- - Typhoon859   Right, so, there evidently seems to be a lot I don...   Aug 1 2012, 13:24
|- - db1989   QUOTE (Typhoon859 @ Aug 1 2012, 13:24) In...   Aug 1 2012, 14:24
|- - saratoga   QUOTE (Typhoon859 @ Aug 1 2012, 08:24) Re...   Aug 1 2012, 16:06
- - pdq   I seem to recall that the dynamic range of the mp3...   Aug 1 2012, 14:16
- - mjb2006   QUOTE (Typhoon859 @ Jul 31 2012, 17:35) i...   Aug 1 2012, 19:31
- - Typhoon859   First of all, I'd just like to say that many o...   Aug 2 2012, 06:40
|- - saratoga   QUOTE (Typhoon859 @ Aug 2 2012, 01:40) QU...   Aug 2 2012, 16:05
- - Typhoon859   QUOTE (mjb2006 @ Aug 1 2012, 14:31) If yo...   Aug 2 2012, 06:45
|- - 2Bdecided   QUOTE (Typhoon859 @ Aug 2 2012, 06:45) Wh...   Aug 2 2012, 11:53
- - halb27   A short explanation of mp3 technology in the entir...   Aug 2 2012, 10:20
- - db1989   QUOTE (Typhoon859 @ Aug 2 2012, 06:40) QU...   Aug 2 2012, 11:05
- - [JAZ]   @Typhoon859: You should read again your posts, and...   Aug 2 2012, 13:03
|- - [JAZ]   QUOTE ([JAZ] @ Aug 2 2012, 14:03)...   Aug 2 2012, 17:38
|- - alanofoz   QUOTE ([JAZ] @ Aug 3 2012, 03:38)...   Aug 3 2012, 02:52
- - greynol   You're saying full scale is not maximum amplit...   Aug 3 2012, 04:51
|- - alanofoz   QUOTE (greynol @ Aug 3 2012, 14:51) You...   Aug 3 2012, 23:50
|- - [JAZ]   QUOTE (alanofoz @ Aug 4 2012, 00:50) QUOT...   Aug 4 2012, 10:55
- - [JAZ]   The signal to noise ratio is the difference betwee...   Aug 3 2012, 09:54
- - 2Bdecided   I think we scared him off. Interesting how, on a ...   Aug 3 2012, 09:58
|- - skamp   QUOTE (2Bdecided @ Aug 3 2012, 10:58) Int...   Aug 3 2012, 10:11
|- - 2Bdecided   QUOTE (skamp @ Aug 3 2012, 10:11) QUOTE (...   Aug 3 2012, 10:51
|- - Destroid   QUOTE (2Bdecided @ Aug 3 2012, 10:51) Ser...   Aug 3 2012, 11:17
|- - bandpass   QUOTE (2Bdecided @ Aug 3 2012, 10:51) The...   Aug 3 2012, 11:31
- - Destroid   Actually, I hope this person is still lurking and ...   Aug 3 2012, 10:50
- - greynol   Allow me to throw another reason into the mix as t...   Aug 3 2012, 15:36
- - alanofoz   Hmmm... I re-read my post and didn't think it ...   Aug 5 2012, 01:53


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th July 2014 - 17:50