Hacker News new | ask | show | jobs
by seandougall 2510 days ago
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.)

1 comments

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).