Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: lower volume output to prevent clips (Read 37031 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

lower volume output to prevent clips

Reply #25
come on, I was offered a solution I probably do not agree with 

If someone ask you a question and you feel you know the answer but the one that asked it doesn't agree, is that really a solution.
Can and can not be...


I don't base judgement on "feeling" but on "knowledge", as all the other esteemed members of this community do. You demonstrate the lack of the even the basic knowledge of this matter but where unwilling to accept advices because of your "feelings". That's the problem, man...
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #26
ok, you are probably right
But then you probably didn't see the obvious, I needed something easy

"thx for calling me stupid in a nice way"
But then again, stupid is a stupid word, we all lack some kind of knowledge

lower volume output to prevent clips

Reply #27
"thx for calling me stupid in a nice way"


No, I didn't whish to call you "stupid". You were just unwilling to accept informed advices given on good faith because of your feelings, so maybe "presumptous" would be a more fitting definition, but english is not my mother tongue, so I may be wrong with this term...

Sergio
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #28
man, I wasn't offended

we all have 1 consciousness and 1 unconsciousness.
what you maybe really meant you or we may never know

"Imagination is more important than knowledge..."  -Albert Einstein (1879-1955)

Sometimes you just go with the feeling

---------

A big thanx to you David (2Bdecided).
Now I know a bit more than before

have to add 1 last but in this topic 
but when playing a mp3 file, does it get decoded to wav while playing or not?

lower volume output to prevent clips

Reply #29
have to add 1 last but in this topic 
but when playing a mp3 file, does it get decoded to wav while playing or not?


Kind of. At some stage, exactly the same type of data (either 16-bit integer or 24-bit integer, stereo PCM samples) has to be generated. Exactly the same data exists in a .wav file as is sent to the sound card driver, but no actual file is generated when you play back mp3s - it's all done "on the fly".

Cheers,
David.

lower volume output to prevent clips

Reply #30
Then I do not see how it can be no clipping in the mp3 file.
I can understand that the mp3 file does not have clipping but the final audio that comes out has clipping
I hope I understood everything correctly, or mayeb not?

lower volume output to prevent clips

Reply #31
Let's say you're a librarian at a big old-fashioned library. You got a book, an on one page there's a circle, filling up the whole page. There are lots of pages like this.

You want to store the book on microfilm. You load the pages in the machine (whatever it's called) and you take a photo of the page with the circle. The film now has an image of a circle.

You want to print some pages from the microfilm. You need to adjust the zoom/magnification.

Oops, now you notice that one of the pages from the book had an incomplete circle; it was cropped at the edges. There's nothing you can do, because the microfilm copy is wrong too.

Oops, you now notice that you made a mistake when you printed the microfilms. You set the zoom too high, and now only part of the circles are on paper. You can adjust the zoom and print again.

---

Easy to understand?

lower volume output to prevent clips

Reply #32
...
I can understand that the mp3 file does not have clipping but the final audio that comes out has clipping
...

Exactly. As already said, clipping can occour at decoding time of an mp3 stream. mp3gain (and other tools) can do things in order to prevent such clipping.

Really, try mp3gain, (or foobar and its RG featurs). It's SO easy... you just load a bunch of files in it and let it do his tricks... nothing complicated. You, by now have probably anderstood that the difference bewteen the two is that mp3gain (losslessy) alter the mp3 stream so that clipping will nevr occur again with that stream independently of the player used, while foobar with RG embed information so that only it (and few others players) will not clip with that stream.

About your considerations about the importance of feeling and instinct in life, I concur. But if 1, 2, 3, ..., n persons give you an informed advice, on your request, investing their time to help you and you discard their advices "a priori", how do you call that?

Cheers!

Sergio
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #33
kjoonlee, you are saying the original has clipping too, but it doesn't if you measure with the limits that wav has.

smz, that choice was for you to make

I have myself been a fool to answer sometimes but ofcourse totally different subject and forum.

-----------

I remember a long time ago when I tried mp3gain and the limit that was recommended was 89dB


and ok, I get the point, mp3 has a lot higher limit than wav.

but how do I do this while ripping or converting, --scale .89 or foobar?

Edit:
I've tried with scale, 89dB is ok
Am I right by saying it just limits the sound wave to go over 89dB and doesn't cut anything?

lower volume output to prevent clips

Reply #34
...
I've tried with scale, 89dB is ok
Am I right by saying it just limits the sound wave to go over 89dB and doesn't cut anything?


No. --scale 0.89 doesn't have nothing to do with 89 dB. It convert each and every sample to floating point and then multiply it by 0.89 before feeding it to the encoder.
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #35
kjoonlee, you are saying the original has clipping too, but it doesn't if you measure with the limits that wav has.

Notice how I said only some pages of the book were cropped. Only some CDs have clipping.

If you compress CDs, you're bound to get some new clipping sometimes, but the new clipping shouldn't be very serious. I'm just saying you can adjust the volume of the MP3 decoder to prevent clipping.

 

lower volume output to prevent clips

Reply #36
Please have a look at this picture:



The blue curve is the sum of the red and green curves which in turn are sines of (slightly) different frequency and phase. The blue curve represents the signal stored in your original WAV. For sake of argument, the legal -- non clipping -- range of your wav is from -1 to +1. As you can see, the blue curve is doing fine.

NB the following is grossly simplified:
The mp3 sees that the blue curve consists of two sines of different frequency. It decides that the frequency of the red sine is inaudible and thus removes it. The green curve is untouched. Upon decoding you are only left with the green sine which is obviously out of bounds.

So the clipping only happens when you want to decode (there is no clipping inside the mp3 file). You have to look at what is stored in the mp3 and if the resulting decoded signal exceeds the legal range and by how much. Once you have the maximum amplitude you can use it to calculate the necessary attenuation you have to apply to your mp3 before decoding to wav. The attenuated file will allways be quieter than the original.

The tools to do this have allready been mentioned.

You can of course also attenuate the input signal before encoding, but by how much can never be told beforehand. You also lose some dynamic range (which can be mostly prevented if you use the preferred replaygain/mp3gain approach and a dithering decoder).

lower volume output to prevent clips

Reply #37
Ok, thanx Gecko!

Now I have tried Mp3Gain, and when decoding the mp3 file to wav I see in Sound Forge that the max output is on -8.4dB :S
So my conclusion is that it lowers too much

When lowering in Sound Forge by 0.6-1.0dB on the original wav file it usually does not give clipping on the decode file from the mp3 file.

Thanx Moneo, I'll use the scale 9 command in lame.

And thanx everyone else that helped

lower volume output to prevent clips

Reply #38
I'm thinking that you haven't configured mp3gain correctly.  With max no-clip gain applied, the peak level should be no less than -1.5 dB for the track with the highest peak in album mode or every track in track mode.

It's taking a while, but you're getting there.

lower volume output to prevent clips

Reply #39
hehe, probably

Do you mean in Advanced Options, Enable "Maximizing" Features ?

The scale command is ok for me


lower volume output to prevent clips

Reply #41
Yes, maximizing features!

The scale command will require more work.  Why do you keep fighting this?


It's quite quick in mp3gain, isn't it? I think there's even a guide to it somewhere, but basically...

1. Back up all your mp3s
2. Options>Advanced> tick "enabled maximising features" (you've already found this)
3. Add all your mp3s to the list
4. Modify Gain>Apply Max no-clip Gain for Album
5. wait - that's it!

You don't have to re-rip anything! Note: MP3Gain automatically assumes that mp3s in different folders are in different "albums".

The problem you'll hit with using --scale to avoid clipping is that however low you set it (unless it's stupidly and audibly low), you'll probably find an album one day that still clips with whatever setting you've chosen, and have to lower it again.


Remind me again: can you actually hear the clipping, or do you just not like knowing it's there?!

I ask because many people (myself included) usually can't hear it - at least when the clipping had been introduced by mp3 encoding of the kind of content which typically causes this problem. Some people can hear it, and on some content I think most people would hear it, but generally it's not a seriously audible problem. (whereas clipping anywhere else is often nasty, and easily audible).

Cheers,
David.

lower volume output to prevent clips

Reply #42
I ask because many people (myself included) usually can't hear it - at least when the clipping had been introduced by mp3 encoding of the kind of content which typically causes this problem. Some people can hear it, and on some content I think most people would hear it, but generally it's not a seriously audible problem. (whereas clipping anywhere else is often nasty, and easily audible).

I have found that the clipped peaks that are caused by decoder clipping are often very short, usually less than a millisecond or so. I guess that is a too short duration for a human brain to be detectable. The actual duration of the clipped peaks can be easily seen with any decent wave editor when the display is enlarged to the maximum possible size.

lower volume output to prevent clips

Reply #43
ok ok, I am gonna try but have I understood it correct, you all sayin I do not need to lower the vol at all?


Please explain what do you mean by "lowering the vol"...

mp3gain does exactly that: it lowers (or increase) "the vol" of your mp3 files at your heart content, in setps of 1.5 dB, either by a constant value that you indicate or by a computed value to target either the max non clipping volume, a predefined average album "volume" (typically 89 dB, but can be changed), or a "track" value, so that all the tracks sounds at about the same volume (this last option not adviced, IMHO, unless for DJ purpose, maybe).

Beware that if I'm not misunderstood the "maximize" feature apply different gain values to different tracks in order to maximize EACH track. So you loose the inherent volume differences between the various tracks of an album. Read the docs.. they talk about that...

Sergio
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #44
Beware that if I'm not misunderstood the "maximize" feature apply different gain values to different tracks in order to maximize EACH track. So you loose the inherent volume differences between the various tracks of an album. Read the docs.. they talk about that...

It has an album mode:
...
1. Back up all your mp3s
2. Options>Advanced> tick "enabled maximising features" (you've already found this)
3. Add all your mp3s to the list
4. Modify Gain>Apply Max no-clip Gain for Album
5. wait - that's it!

You don't have to re-rip anything! Note: MP3Gain automatically assumes that mp3s in different folders are in different "albums". ...

This keeps the relative track volume levels inside each album in correct proportion.

lower volume output to prevent clips

Reply #45
Yeap, you're right Alex B! Sorry, but I hadn't mp3gain available and was trying to remember!

Tnxs!

Sergio

Edit: and I was half-blind, as I didn't noticed what 2Bdecided had already written! 

Edit2: But I insist that "Album gain" is the way to go, eventually with the target value modified for the few albums that do clip at the "standard" target of 89dB, so that you don't have to adjust your player volume when switching from an album to another one. But this is just a matter of taste...
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #46
Point is: MP3's dynamic range is larger than the dynamic range of your WAV files (more room below and more room above). MP3s can represent sample values above and below the limited WAV range (having fixed-point 16 bits in mind).

Since WAV->MP3 is a lossy process the signal is altered but it doesn't involve clipping because MP3 has a larger dynamic range and can represent the signal. But MP3->WAV might force the decoder to clip samples because WAV can only carry a limited range of sample values.

Luckily there's something like Replaygain and MP3gain around. They affect the volume before the mapping to a limited set of possible sample values.

EDIT: Darn! I was replying to the last post on the first page. I didn't notice there was a second page with lots of other replies. ;-)
@Gecko: Nice graphical example!

lower volume output to prevent clips

Reply #47
Yes, maximizing features!

The scale command will require more work.  Why do you keep fighting this?


Coz, I want it to be as good as it can be

But I'll probably start using lossless as soon as I buy a flash mp3 player that supports FLAC.
iAudio U3 has it but 2GB ain't much .........



ok ok, I am gonna try but have I understood it correct, you all sayin I do not need to lower the vol at all?


Please explain what do you mean by "lowering the vol"...

decrease the vol, you all were saying I can just use mp3gain.............


mp3gain does exactly that: it lowers (or increase) "the vol" of your mp3 files at your heart content, in setps of 1.5 dB, either by a constant value that you indicate or by a computed value to target either the max non clipping volume, a predefined average album "volume" (typically 89 dB, but can be changed), or a "track" value, so that all the tracks sounds at about the same volume (this last option not adviced, IMHO, unless for DJ purpose, maybe).

Beware that if I'm not misunderstood the "maximize" feature apply different gain values to different tracks in order to maximize EACH track. So you loose the inherent volume differences between the various tracks of an album. Read the docs.. they talk about that...

Sergio


thanx


I am sure now, I will just use the scale


------

About the clipping, ofcourse I do not hear it.
But as I said b4, the better the better

lower volume output to prevent clips

Reply #48

Yes, maximizing features!

The scale command will require more work.  Why do you keep fighting this?


Coz, I want it to be as good as it can be


You still don't (or don't want to) understand. This will not be "as good as it can be". You are going to loos dynamic range. Not with mp3gain (or ReplayGain).
Sergio
M-Audio Delta AP + Revox B150 + (JBL 4301B | Sennheiser Amperior | Sennheiser HD598)

lower volume output to prevent clips

Reply #49
[--scale 0.95] will not be "as good as it can be". You are going to loos dynamic range. Not with mp3gain (or ReplayGain).

The only drawback I see is: You can't be sure about whether 0.95 will do the trick or not.
But I think I know what you mean by "loos dynamic range". This would be true if LAME quantizes the samples back to 16 bit integers after applying the gain. It does not. LAME imports anything to floating-point and then applies the gain (possible round-off errors when dealing with floating point are negligible in this case).