math - How to output a square wave on my soundcard -
i create digital (square) signal on sound card. works great if generate high frequencies. but, since can't output dc on sound card, lower frequencies resulting digital bits fade 0.
this soundcards high pass square wave: http://www.electronics-tutorials.ws/filter/fil39.gif
what's mathematical function of signal, that, when passed through high pass become square?
ideally, solution demonstrated in gnuplot.
the sound card cuts out low frequencies in waveform, need boost amount in pass it.
a square wave contains many frequencies (see the section on fourier series here). suspect easiest method of generating corrected square wave sum fourier series, boosting amplitudes of low frequency components compensate high-pass filter in sound card.
in order work out how boost each low frequency component, first need measure response of high-pass filter in soundcard, outputting sine waves of various frequencies constant amplitude, , measuring each frequency ratio r(f)
of amplitude of output amplitude of input. then, approximation square wave output can generated multiplying amplitude of each frequency component f
in square wave fourier series 1/r(f)
(the 'inverse filter').
it's possible high-pass filter in soundcard adjusts phase of signal. in case, 1 might better off modelling high pass rc filter, (which how soundcard doing filtering), , invert both amplitude , phase response that.
Comments
Post a Comment