sevensor 7 hours ago

> sine waves and provides the amplitude and frequency of each sine wave.

And phase! Good luck trying to reconstruct your signal after you discard the phase. Lest you object that nobody would do this: I’ve seen people actually try to do this, and they couldn’t make sense of the garbage that resulted.

tonyarkles 5 hours ago

With respect to the frequency changing as the signal's downsampled, I'm pretty sure the author isn't correctly keeping track of the fact that by having fewer samples they're effectively changing the sample rate. It looks like the FFT every time is using 2048 bins, which is somewhat unexpected. They're not documenting how they're taking a 2048-point FFT with fewer than 2048 samples. Otherwise, fantastic article!

r--w 5 hours ago

Fortunately, if you’re a ClickHouse user, you can use the built-in function `largestTriangleThreeBuckets(n)(x, y)`.

toddwprice 5 hours ago

If stuck on a desert island with only one algorithm in my bag, I’d wish for the Fourier. At least I would die happy.

gblargg 4 hours ago

Typically you want the peaks preserved when zooming out.

kohlerm 7 hours ago

It is definitely a real problem to be solved. We used something similar in an IOT application some time ago