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

Here I was expecting silence, as each sound - including each sound's inverse - was played simultaneously.


Depends how you take the sum!

https://en.wikipedia.org/wiki/Divergent_series#Absolute_conv...

[edit] See my comment below: my joke is about the fact that, depending on the order in which you sum an infinite sequence of waveforms, you can create a sequence that converges to any sound you want [1] (as long as those waveforms together span the full frequency space). Note also that a sum over a truly continuous space of arbitrary waveforms is even more ill-defined.

[1] https://en.wikipedia.org/wiki/Riemann_series_theorem


Sound waves are physical. You cannot change the empirical outcome by doing the math differently.

Sound waves are indeed cancelled out by their inverse.


You are incorrectly assuming sound is additive, but it isn't.

Sound is non-linear as sound gets louder - sound wave volume is physically limited because the low of the sound wave can't be lower than vacuum.

Another non-linearity is air cannot transmit frequencies higher than some limit.

Another is that sound has a noise floor depending on the temperature of the gas (noise like rain on a roof?).

There are surely other gross non-linearities.

Those non-linearities mean you can't add or subtract some sounds, and you can't assume commutativity.


This would make sense if it were physically possible to play every noise at once. (Where would you place the infinitely many emitters? If they have any displacement at all, then there will be points that would not experience destructive interference at all frequencies.)


There is no empirical result because you can't actually play all sounds at the same time.


Well, for starters, it's physically impossible to have an infinite number of speakers playing an infinite number of waveforms simultaneously, so this silly idea does require mathematical abstraction to be meaningful. That shouldn't be too surprising because there are many places in the physical world where we use infinite series to calculate simple finite physical quantities, e.g. when we integrate to find the area of a region.

My point is that if you really sum every possible waveform, the resulting value may or may not converge depending on the order in which you sum them; in fact, it's a well-known property of such conditionally-convergent series that you can actually get any limiting value you want based on how your order them [0]! (let's ignore the fact that the fourier coefficients can take on a continuous set of values). For example, even if you were only allowed to play a single frequency sound wave sin(x) at volumes that are the inverse of some integer value multiplied by a max volume of 1 (in arbitrary units), you may or may not have them cancel depending on how you group the terms in the sum:

  sum = 1*sin(x) + -1*sin(x) + (1/2)*sin(x) + -(1/2)*sin(x) ...
were the ith term in the sequence (starting at i=1) is

  a_i = (2/n-1)*sin(x) for odd x
  a_i = -(2/n)*sin(x) for even x
This is a conditionally-converging series that will hit all positive and negative harmonic coefficients 1/n and -1/n: the even terms cancel each preceding odd term, and the Nth partial sums therefore alternate between 0 and 2 * sin(x)/(N+1), which itself tends towards zero. But you can group these terms in a different order and get a different limit for the sum; in fact, you can group them to get whatever final value you want!

Now, if you extend this thinking to every frequency of sinusoidal wave, you can start summing every pure tone in arbitrary order to get an arbitrary coefficient for each frequency. By picking your limit for each frequency correctly, you can sum your sine waves in a fourier series [1] to get any song you could ever want! And this is while limiting ourselves to discrete frequencies and alternating harmonic coefficients (since it allows us to take a discrete infinite sum).

So the unexplained punchline to my previous comment is that the problem is ill-defined, or rather, that you can view any song as just a specific ordering of an infinite series of other sounds. (You don't have to use sine waves as your basis, by the way; you can use a bunch of different waveforms that look more like "noise" as long as their combination spans the same infinite-dimensional linear space as pure sine waves; you just end up with different coefficients. For example, in quantum mechanics, you can get a sine wave (momentum eigenstate) by summing energy eigenstates (non-sine waves with a specific form) with the correct coefficients.)

[0] https://en.wikipedia.org/wiki/Riemann_series_theorem#Alterna...

[1] http://mathworld.wolfram.com/FourierSeries.html


That reasoning allows you to get any final signal you want depending on where you stop in the series, not on how you order the individual coefficients. Addition is still commutative. The parent comment was about every sound _and_ its inverse, which can only ever add up to zero.

(Also, you're missing the frequency components there; your math cannot reproduce any sound at all, it can only reproduce different amplitudes of the same sine wave.)


I'm not missing arbitrary frequency components; please reread the penultimate paragraph, where I mention them explicitly. As I said there, you can extend my argument about a single frequency to include all multiples of that base frequency, and since you can set the coefficient for each frequency arbitrarily based on your ordering, you can set the fourier coefficients arbitrarily and in so doing recover any waveform you want.

Also, your point about commutativity is more subtle than you think; it fails for an infinite sum because you have an infinite space in which to rearrange things. Sure, the terms cancel eventually, but you can keep sticking the negative terms farther and farther back in a pattern so that by the time they've cancelled earlier positive terms, there's already a bunch of new positive terms to take their place. The subtlety comes from the fact that you can keep doing this forever, and you can do it in a way where the sum eventually converges to a specific value.

But don't take my word for it. This is an extremely well-known and basic result in mathematical analysis (the fancy math term for calculus and related topics). Again, see links above, or go straight to a proof [0]. If you want a deeper understanding, check out Rudin's Principle's of Mathematical Analysis [1], which explains this and other fun math stuff very well.

[edit] Just to be crystal clear, the Riemann series theorem does not apply to partial sums, which is what you are saying; if you do an infinite sum on a conditionally convergent series (like the alternating harmonic sum, a variation on which I used in my example), then your final result can literally be any number you want based on how you order the terms in the series. You can set it up so that the infinite sum keeps getting closer an closer to an arbitrary value. If this sounds nonintuitive, it's because infinite phenomena are subtle and nonintuitive!! This is a very cool example of how weird things get once you start dealing with the infinite.

[0] https://en.wikipedia.org/wiki/Riemann_series_theorem#Proof

[1] https://www.amazon.com/Principles-Mathematical-Analysis-Inte...


You're right, I missed that your sin(x) example was talking only about a single component.

However, cherry-picking a different reordering for each frequency component before doing an inverse FFT really isn't the same thing as playing all the sounds simultaneously.

Anyway, the thing is, we're not talking about an infinite series. This is a thread about digital audio playback, where both amplitude and phase components (I'm going to assume this site uses some sort of DCT-based codec) are quantized, and hence occupy a finite space. No amount of reordering will change that sum.


Yeah for sure. I mean I was just trying to make a joke about divergent series and how "Every Noise at Once" is a deeply vague statement. But you're right that in the discrete arena it is literally a finite sum that can cancel perfectly (assuming that every sound has exactly one representable "opposite" sound in your storage format).


Isn't the inverse of a sound the same sound?


It's the same sound, but out of phase, so they cancel out. Think operating principle of noise-canceling headphones.


Nope, it's flipped on the horizontal axis (if you picture it as a graph) so when both are summed you get zero (at least in perfect destructive interference).




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

Search: