How Averaging Becomes a Low-Pass Filter
We already know how to store the previous sample, multiply values, and add them. Put those three operations together and we can build a real filter.
1. The simplest filter we can build
These are live sample values. As the input frequency changes, watch how similar — or different — adjacent samples become.
2. Drag from low frequency to high frequency
3. The extreme case: Nyquist
At the highest representable sine frequency, neighbouring samples can alternate approximately:
Now average adjacent samples:
4. Same behaviour — now shown as a frequency response
The dot shows the frequency selected above. The response graph is not a separate phenomenon — it is another way of describing what you are already seeing in the samples.
5. The DSP block diagram
└→ z−1 → × 0.5 ──┴→ + → y[n]
Give us the previous sample.
Scale each contribution.
Add them to produce the output sample.
6. Hear the attenuation
Start the sine and sweep the frequency upward. With the filter on, the signal becomes progressively quieter as it approaches Nyquist. Bypass it and the source level remains constant.
7. What just happened?
FAST CHANGE → ADJACENT SAMPLES DIFFERENT / OPPOSE → CANCEL
This is the simple visual bridge between sample-by-sample arithmetic and frequency-selective filtering.