[LAU] Soundcard Oscilloscope

Fons Adriaensen fons at linuxaudio.org
Sat Mar 24 10:32:13 CET 2018


On Fri, Mar 23, 2018 at 10:06:25PM +0000, Will Godfrey wrote:

> Bypassing the global filter gives a smaller, high frequency ring at all
> corners of the square - very unusual.

Not at all. A 'perfect' square wave has infinite bandwidth, and
therefore can't exist in a sampled format as everything above
half the sample rate has to be removed.

What you see on the edges of a bandlimited square wave is just
the effect of the antialising filter. Calling this 'ringing' is
sort of a misnomer - there is no resonance as you would have
with a high Q filter. Also it doesn't correspond to any single
frequency even it looks a bit like it does. 

Imagine the signal that is the difference between a 'perfect'
square wave and the same after a sharp 'brick wall' lowpass
filter. That difference is just the sum of all the harmonics
that have been removed by the filter. In other words, of all
the harmonics that are NOT in the bandlimited signal. 

If you want to avoid this (for aesthetic reasons, there is no
point otherwise), a more gradual lowpass filter (which also
attenuates harmonics within the audible range) will do that,
producing 'rounded' corners instead.

Ciao,

-- 


More information about the Linux-audio-user mailing list