Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your primary issue is that <strong>frequencies aren't well defined over short time intervals</strong>. This is particularly true for low frequencies, which is why you notice the problem most there. </p> <p>Therefore, when you take really short segments out of the sound train, and then you filter these, the filtered segments wont filter in a way that produces a continuous waveform, and you hear the jumps between segments and this is what generates the clicks you here.</p> <p>For example, taking some reasonable numbers: I start with a waveform at 27.5 Hz (A0 on a piano), digitized at 44100 Hz, it will look like this (where the red part is 1024 samples long):</p> <p><a href="http://i48.tinypic.com/zim802.png">alt text http://i48.tinypic.com/zim802.png</a></p> <p>So first we'll start with a low pass of 40Hz. So since the original frequency is less than 40Hz, a low-pass filter with a 40Hz cut-off shouldn't really have any effect, and we will get an output that almost exactly matches the input. Right? <em>Wrong, wrong, wrong</em> – and this is basically the core of your problem. The problem is that for the short sections the <strong>idea</strong> of 27.5 Hz isn't clearly defined, and can't be represented well in the DFT. </p> <p>That 27.5 Hz isn't particularly meaningful in the short segment can be seen by looking at the DFT in the figure below. Note that although the longer segment's DFT (black dots) shows a peak at 27.5 Hz, the short one (red dots) doesn't.</p> <p><a href="http://i50.tinypic.com/14w6luw.png">alt text http://i50.tinypic.com/14w6luw.png</a></p> <p>Clearly, then filtering below 40Hz, will just capture the DC offset, and the result of the 40Hz low-pass filter is shown in green below.</p> <p><a href="http://i48.tinypic.com/2vao21w.png">alt text http://i48.tinypic.com/2vao21w.png</a></p> <p>The blue curve (taken with a 200 Hz cut-off) is starting to match up much better. But note that it's not the low frequencies that are making it match up well, but the inclusion of high frequencies. It's not until we include every frequency possible in the short segment, up to 22KHz that we finally get a good representation of the original sine wave. </p> <p>The reason for all of this is that a small segment of a 27.5 Hz sine wave is <strong>not</strong> a 27.5 Hz sine wave, and it's DFT doesn't have much to do with 27.5 Hz.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload