This is an interactive demonstration of the sinc lowpass filter in time domain.

The input signal is a sine wave with adjustable frequency and phase.

The filter is the sinc function: sinc(t) = sin(2*pi*t) / (2*pi*t), or 1 when t equals zero. To control the cutoff frequency, t is multiplied by an adjustable parameter. Greater multipliers result in shorter period (narrower peak), and vice versa. Changing the multiplier also changes the filter's amplitude gain (proportional to the area under the curve), which is taken into account by scaling the final output.

Filtering is performed using discrete convolution. That is, the input signal is first multiplied by the sinc filter at every point along the horizontal axis, giving us the green curve. Then each point of that curve is added together, and the sum is scaled to undo the effect of the filter's amplitude gain. For clarity, only the magnitude of a single sample centered at the sinc filter's peak (t = 0) is computed, as represented by the orange line.

By modulating the input phase, you can observe that the orange line traces a sine wave just like the input, possibly with a different amplitude.

Reset the values, carefully drag the sinc cutoff down to about 7.40 and observe the final amplitude reaching zero. In this setup the input and cutoff frequencies are just slightly off. With a phase of 0, a peak of the input wave coincides with the peak of the sinc filter. However, the sinc's peak is clearly wider and so negative values of the input wave are multiplied with a positive number, yielding mostly negative values on green curve. This effect continues onwards on both sides: as the input sine is about to flip sign, so does the sinc filter. But they have opposite signs, and so the green curve is pushed underneath the horizontal axis. These negative parts of the green curve add up and cancel out the big positive peak at the center.

If we were to follow the curves far enough left or right, eventually the filter and input would be in phase again, yielding positive samples. But at that point the amplitude of the sinc wave is so small that all the samples would be very close to zero after multiplication, and their contribution would be quite insignificant.

Now if you increase the input frequency all the way up to 30, you can observe the input wave rapidly flipping sign right under the main peak of the sinc filter. Most of the signal cancels out right there, and the extended sides of the sinc*input curve are quite evenly distributed around the center line.

This should illustrate why real filters with finite length do not have brick-wall frequency response: as the input and cutoff frequency get closer, the sides of the filter become increasingly important as they are needed to cancel out the main peak. Longer and longer filters are needed for tighter cutoff. On the other hand, even a short filter with not much beyond the main peak is effective at culling very high frequencies.

This example implicitly uses a rectangular window by only considering the samples that that make up the curves on the screen. In real world use, the filter's performance is improved by multiplying the sinc with another function, such as a Kaiser window.