Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While I don't support Dell's decisions, digital (and analog) clipping can easily damage speakers driven at what is normally their maximum power they can handle, since the resulting clipped waveform carries a lot more energy than an unclipped one.


True, but VLC actually applies soft limiting when set to above 100%, so that hard clipping never occurs. I use this feature alot, it's great for taking down the usually thunderous sound effects in hollywood movies a few notches, while keeping quiet scenes at hearable levels.


> ... the resulting clipped waveform carries a lot more energy than an unclipped one.

Is this claim actually true?

My understanding is that if you take a waveform and clip it, the resulting waveform actually carries less energy (think of the corresponding integral), but more of that energy is pushed into the higher frequencies. It's this – the unexpectedly large amount of high-frequency energy – that kills speakers because their crossover networks push it into the tiny, tiny tweeters, and they are utterly unprepared for it.


>> ... the resulting clipped waveform carries a lot more energy than an unclipped one.

> Is this claim actually true?

Yes, it is -- but it depends on how we define "clipped".

> My understanding is that if you take a waveform and clip it, the resulting waveform actually carries less energy (think of the corresponding integral)

Only if the clipping reduces the peak value. If you compare a sinewave with a peak value of 1, and a square wave with a peak value of 1, the square wave has a substantially higher average level (with a ratio of pi / 2).

> It's this – the unexpectedly large amount of high-frequency energy – that kills speakers because their crossover networks push it into the tiny, tiny tweeters, and they are utterly unprepared for it.

Yes -- the rate at which the speaker cones are required to move is an additional factor. But for a "clipping" definition that clips by means of trying to exceed the available voltage, these two effects add.

http://i.imgur.com/oE5NFZ9.png

In the above linked image, the red trace is sin(x), the integral for the interval 0 < x < pi is 2. The green trace produces an integral of pi. The ratio of the two is pi/2, and the speaker power difference is (pi/2)^2 = 2.46 (because the speaker's power is the square of the applied voltage).

The green trace is what you would get if you simply turned up the volume beyond any reasonable setting -- the amplifier produces a clipped version of the sine wave and the peak value is equal to the supply voltage.


> Only if the clipping reduces the peak value...

I don't know of any widely used definition of "clipping", nor any definition that fits the context of this discussion, that allows for a signal's peak value not to be reduced. It's called clipping because the extreme values look to have been clipped away, as if by scissors. The parts that have been clipped away contain energy, don't they? So won't the clipped signal will carry less energy than the original?

When you take a sine wave of peak value 1 and clip it, what you get is not a square wave with a peak value of 1. Rather, you get a peak-truncated sine wave in which values in excess of the clipping threshold V are replaced with the clipping threshold. There's less power in this clipped sine wave than in the original because min(V, |sin t|) <= |sin t| for all t.


> I don't know of any widely used definition of "clipping",

But there is one. In electrical engineering, it's any process that arbitrarily limits a signal's amplitude. By far the most common meaning is a signal that exceeds the voltage range of an amplifier or signal pathway.

> nor any definition that fits the context of this discussion, that allows for a signal's peak value not to be reduced.

See above.

> It's called clipping because the extreme values look to have been clipped away, as if by scissors.

Yes, but this can result from trying to pass a signal too large for the circuit, or it can mean an intentional scheme in which a fixed signal amplitude is truncated, the meaning you're discussing.

In the present discussion, in which a volume setting is increased until the speakers are jeopardized, the meaning is clear -- it's an increase in signal amplitude that the amplifier cannot support, resulting in the waveform being clipped at the maximum available amplifier voltage.

> The parts that have been clipped away contain energy, don't they? So won't the clipped signal will carry less energy than the original?

Not if the signal amplitude is increased. In the present discussion, the problem is being caused by raising the volume level too high, which causes the signal to exceed the available amplifier voltage. My diagram shows this case:

http://i.imgur.com/oE5NFZ9.png

The red trace is the maximum volume setting that the amplifier can support without distorting the signal. The green trace is a much higher volume setting that essentially reduced the output to a square wave. In both cases, the peak voltage is the same.

> When you take a sine wave of peak value 1 and clip it, what you get is not a square wave with a peak value of 1.

That depends on how you define "clip". If you increase the size of the sinewave, clipping takes place at the maximum voltage. If you clip by reducing the possible range of voltages, the sinewave remains the same size but maximum amplitude goes down. The present discussion revolves around the first of these choices.


We must be talking past one another. I thought I was speaking in the electrical-engineering sense of clipping (my undergrad studies were in EE).

In any case, to make sure we're talking about the same things, I'll be more formal. Let y(t) by a time varying signal. Now define a maximum amplitude V > 0. Let us say that clipping occurs at time t if |y(t)| > |V|. Define the clipped version of y to be w(t) = max(–V, min(V, y(t))).

Now:

Claim 1: |w(t)| <= |y(t)| for all t. That is, the clipped version of the signal is contained within the unclipped version. Proof: Follows from the definition of min, max, and V.

Claim 2: The clipped version carries less energy than the unclipped. Proof: Follows from Claim 1 and integration.

Now, here's where you lose me. The claim you made that sparked this conversation was this: "the resulting clipped waveform carries a lot more energy than an unclipped one." But this claim seems to contradict my Claim 2.

Can you show me how to reconcile these seemingly contradictory claims?

Edited to add: I'm not claiming that these claims can't be reconciled. Rather, I'm hopeful that thinking about the exercise will help us to see how we're talking past one another.


I think he or she's saying that the speakers were designed with the expectation that the largest signal it would handle is a sine waveform with amplitude = the dynamic range. So when a square waveform comes along (as a result of clipping a higher amplitude waveform) it drives the speaker with 2.4x more power than expected.


Here's the first crossroad, where we diverge:

> Now define a maximum amplitude V > 0.

The problem being discussed is one in which the user cranks up the volume such that the maximum volume level is far exceeded, and the amplifier circuit, which cannot reproduce the higher level, instead clips the waveform at the supply voltage.

> The claim you made that sparked this conversation was this: "the resulting clipped waveform carries a lot more energy than an unclipped one."

And it does, as you can see from this diagram:

http://i.imgur.com/oE5NFZ9.png

The red trace is the 100% volume level for the system, and it is not clipped. The green, "clipped" trace is far above 100%. It's really very simple.

> But this claim seems to contradict my Claim 2.

Yes. Your claim 2 doesn't apply to a case in which the maximum output voltage of the amplifier cannot reproduce the input waveform. So instead the amplifier clips its input signal at its voltage limits, as the above diagram shows.

The interesting thing about this analysis is that two ways to analyze it produce the same result.

If we use a simple integration of the unclipped and clipped cases, we see a power increase of 2.46, as discussed earlier.

If instead we use Fourier analysis to examine the harmonics of a sine wave and a square wave, the square wave's higher harmonic energies sum to 2.46 of the original sine wave's energy level in the speaker (but pi/2 above the sinewave voltage levels):

Sine wave harmonic lines = 1f

Square wave harmonic lines = (4/pi) sum(sin(2 pi f t (2k-1) / (2k-1),k,1,oo) (http://en.wikipedia.org/wiki/Square_wave#Examining_the_squar...)

The outcomes obviously have to come out the same. The above shows how they do it.


OK. I think I see where our signals are getting crossed. I look at your diagram and think, The green signal g is not what you get when you try to output the red signal r but the output stage clips it at the supply voltage (my V). Rather, the green signal g is what you get when you take the red signal r, amplify it by A = Infinity, and then try to output that new signal rA, which the output stage then clips.

For all A > 1, |rA| > |r|. Therefore, I have no problem agreeing that a clipped rA carries more energy than the original r. (In fact, this is just saying that bigger signals carry more energy, regardless of clipping.)

To me, your original statement read as though it made the following claim: If your amplifier tries to output a signal r but clips off the peaks, what you get out is a signal that carries more energy than r. (This is the claim I found hard to believe.)

But what you really meant (I think) was that, if you take a sine wave as input and, as a human controlling the volume knob, keep turning up the volume until the sine wave's maximum amplitude so far exceeds what the amplifier can reproduce that it comes out looking like a square wave, then that square wave carries more energy than the original, un-volume-adjusted sine wave. Is that what you meant?

If that's what you meant, I have no problem believing your claim. It's just that I wouldn't call turning up the volume knob to be part of the "clipping" process, but rather amplifying. When you turn up the volume knob, what you get out is always a "bigger" signal, even if it's clipped.


> It's just that I wouldn't call turning up the volume knob to be part of the "clipping" process, but rather amplifying.

But it is, indeed it's the most common example of clipping in engineering practice. Consider two alternatives -- one in which the amplifier is able to accommodate a great increase in volume without any distortion, and another in which it cannot.

In this image:

http://i.imgur.com/g8txTmC.png

The blue trace represents maximum normal volume (100%). The green trace represents a system in which the amplifier can accommodate a great increase in volume setting (200% of normal), simply because its power supply voltage is at least twice as high as that required for 100% volume. The red trace represents a system that cannot tolerate any volume settings greater than 100%.

In this diagram, the 200%-volume green trace has a higher subjective volume level than the 100%-volume blue trace (i.e. twice as high in voltage, four times as high in speaker power). The red trace, which would sound very distorted to the user, also has a higher power level than the 100% trace, but less than the green trace. The red trace is typical of systems that are limited to 100% volume by power supply voltage.

The red trace represents the most common example of "clipping" as it takes place in actual equipment and in engineering practice. Its output has more energy than the blue trace, and less than the green trace.

-- former NASA engineer


I agree with everything you wrote. Again, however, I think we're talking past one another. When you talk about clipping, you seem to mean turning up the volume until a signal clips. This both amplifies the signal and clips off its extremes. What I mean by clipping is to take a signal and clip off its extremes.

That sole difference explains our entire conversation. In your view, clipping involves making the signal bigger. That bigger signals carry more energy naturally leads to your claim. In my view, clipping a signal makes it smaller, leading to the opposite claim.

Thanks for sticking with me through the conversation.


Consider it in the frequency domain: clipping adds odd harmonics.

The fundamental frequency is reduced in energy a little bit, but the higher frequency harmonics end up containing relatively large amounts of energy.


Nobody prevents the manufacturing to put some electronic bits before the speakers to cap the maximum power. Even better, teach the sound card to do that.


A square wave has twice the power of a sine wave of identical amplitude.

This is why distorting the amplifiers (especially digital clipping) is so much worse for speakers than overpowering the speakers. This is a very well known fact in audio circles.

Playing metal at full volume is not as damaging as playing anything intensely digitally clipped at full volume.

Yes, Dell is putting on shitty speakers on their laptops, (what else is new), but VLC should be amplifying the output using level-limiting (hard-limiting), which would effectively bring all the quiet parts to be just as loud as the loud parts, instead of just digitally clipping the output.


>A square wave has twice the power of a sine wave of identical amplitude.

1.41 x

>Playing metal at full volume is not as damaging as playing anything intensely digitally clipped at full volume.

The output of the amplifier really ought to be bandwidth limited either as a natural consequence of the components used or explicitly with a filter. It is silly to spend power on things that can't be heard.


Assuming the parent is talking about equal maximum amplitude of the sine and square waves, the square wave RMS voltage will be sqrt(2), or 1.4, times the sine wave RMS voltage. And since power is proportional to voltage squared, the square wave will carry sqrt(2)^2, or 2, times the sine wave power.


Actually, if we look at two half-cycle waveforms, one sine and one square, like this:

http://i.imgur.com/oE5NFZ9.png

(Just the left 1/2 of the graph for this example)

The integral of the sine waveform with a peak value of 1, on the interval 0 x < pi, is :

http://www.wolframalpha.com/input/?i=integrate%28sin%28x%29%...

= 2

The integral of the square wave on the same interval is = pi

So the ratio increase in average voltage at the speaker (comparing the sine to the square) is pi/2 = 1.57. The increase in speaker power is (pi/2)^2 = 2.46.


It also assumes a speaker's reactance is purely resistive. It's not.


Derp, thanks to both for the correction.


>> A square wave has twice the power of a sine wave of identical amplitude.

> 1.41 x

Yes, for a voltage of x, but remember that the speaker is a resistance, for which the power varies as x^2/r (Ohm's law: p = e^2/r), So the original claim is correct.


Most metal released these days is digitally clipped. Even classic old 80s "remastered" records are digitally clipping all over the place. The loudness wars has ruined most metal through remasters.


Ah yes, the death of dynamics in music! One horrendous offender that I own is Paul McCartney's Memory Almost Full. I think he remastered it and rereleased it but there isn't a chance that I'm spending my money on it again! I think the mastering engineer discovered the joys of gain and hard knee in compressors.


Its well known if you are over pumping your speakers.

You shouldn't be able to blow up your speakers if your amp, speakers and limiters are setup correctly.

After all, if you're busting out £20k on a set of decent speakers, you don't want to burn them out because your idiot producer "turned it up to 11"


>but VLC should be amplifying the output using level-limiting (hard-limiting), which would effectively bring all the quiet parts to be just as loud as the loud parts, instead of just digitally clipping the output.

That's compression, not hard-limiting. Hard limiting would leave the quiet parts quiet relative to the loud parts. It would only crush them if they were not enough dynamics in the first place.


So would compression. The implication is that after you hard limit, you also increase the overall volume, such that the limit threshold of -Xdb is now 0db. Otherwise, there is no point to hard limit.


I actually never seen VLC clip sound that much on volumes > 100%.

Maybe if your speakers are very quiet and crappy and you have to get every control to 100% (hardware, system, vlc) in order to hear anything - maybe in this case it will.

Hard clipping is very noticeable for the listener so not many people will set it to the maximum if they have choice.

Anyway, you can protect from this either in hardware or in the driver.


Analog limiter ICs (that I know of) limit the signal according to input voltage, something that does not catch this issue. Furthermore, limiting power at the audio codec level would require for the codec to have that feature and I don't know of audio codecs with that capability.


Cheap shit. Seriously, cheap shit. There are several ways to solve this, all of which boil down to "use more chips" or "use better speakers", thus increasing the price of already incredibly shitty speakers. Source: I'm involved in designing consumer electronic products and the only corners that don't get cut are those that, if cut, result in certifications not being granted and therefore in products you're unable to sell. Everyone, Apple included, does it.

The easiest way to solve this is use stronger materials for the speaker construction. This does, yes, affect the quality of the sound, which is already somewhere between catastrophic and abysmal on a laptop. The frequency response is likely to be worse, on a set of speakers that already has a frequency response that makes them quite useless for music.

You can also do it in electronics, as measuring the power delivered to speakers is not exactly rocket science. The response time wouldn't be great, but it's continuously shredding the speakers with square signals that damages them, not a couple of pulses every once in a while. You can also detect heavy slopes. You can even detect heavy slopes in software.

But no, seriously, this is a problem that can be solved. The mere fact that a lot of manufacturers manage to come up with speakers that don't break should be a testimony to this. I have (granted, desktop) speakers that have gone through a decade of heavy metal, grindcore and fucking SIDs and MODs, on bad ALSA drivers that I could barely get to work for years. They're fine. This is just Dell selling cheap shit.


This is great information - and I'd love to know which speaker manufacturers you approve of. I'd rather own an expensive set of desktop speakers that lasts ten years than deal with Dell parts breaking all the time.


Get a pair of these. Don't pay more than $40 for the pair. They are quite decent, especially at this (retail) price point. Dayton Audio B652 6-1/2"


> I'd love to know which speaker manufacturers you approve of

I have no idea how things go in the laptop market, so I can't say there's one I approve of in particular. The fact that the ones on the laptops are crap can, however, be assessed quite easily by ear :).


Why Apple included?


Then one should figure out why nobody needed this feature.

I'm no expert but maybe it's actually possible to create speaker that doesn't go bad.

(I could code the protection into the sound driver in half a day probably)


> I'm no expert but maybe it's actually possible to create speaker that doesn't go bad.

Of course it is, but nobody wants to do that; it's not profitable. * sigh * .

I sometimes wonder how difficult would it be to create, say, a brand of kettles with lifetime warranty, designed to last 50+ years instead of 50+ weeks the ones we have do. How hard would it be to sell them and to what ends would the competition go to stop you from killing their market?


Over on this side of the pond we generally use "coffee makers" instead of "kettles". But the problem is the same. They fail after a few years. It's all cheap consumer crap made in China.

We've given up trying to buy "good" coffee makers. We just buy something cheap that's on sale and throw it away when it breaks. There should be the equivalent of "Gresham's Law" for consumer goods (the bad eliminates the good). But I don't know the name of that. Perhaps "China's Law" would be appropriate.


We have coffee makers as well, but you can't make a cup of tea with a coffee machine.

Nor make a cup-a-soup, pot/instant noodles, pre-boil water for cooking veg, hot water bottle, etc.


I used to boil water in a stovetop kettle. But that takes too long. So now I just use the microwave. Take a teabag, pour cold water over it, nuke for 90 seconds, DONE!

Of course it doesn't taste nearly as good as pouring hot water from a kettle onto a teabag, but it's so fast and convenient.

And I don't think anyone in the USA buys loose tea. It's all teabags here (i.e. probably 99% of the market).


The microwave trick not only tastes bad, but it also doesn't heat evenly as you get patches of boiling water and patches of cold water.

Modern kettles boil in about 2 minutes anyway. So I don't really see them as any more inconvenient than using the microwave. The real inconvenience is having to get up to switch the device on; what I really want is a networked kettle so I can boil it from the comfort of my seat hehe


Microwave just the water, then put the teabag in after. Then it will taste the same.


I never had either failing speaker or failing* kettle in my life so it's hard for me to say anything. Maybe there just so much you can get from laptop speakers so it makes sense to cap their power hard?

* Some no loger turn off automatically, tho


> * Some no loger turn off automatically, tho

And you don't think a kettle burning its way through your kitchen is a fail !


Kettle: I had one with the same problem. That's a terminal failure to me...


Dell isn't winning much on this. The service calls and now the reputation hit cost them more than they could make repairing laptops.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: