4

I've constantly heard about the Low-Pass (or High-Pass) filter, but I am confused. I read that it works on cancelling out certain frequencies that are below (or above) a certain threshold.

However, I am using the Time-Domain for calculating Note Onsets (that is, using the change in signal amplitude/energy). So I am not sure on how I can apply low-pass filtering to the time-domain. Any other good filters for note-onset detection?

5
  • Is this a programming question? If so, asking on stackoverflow with the signal-processing tag might be a better option.
    – Mark Heath
    Jun 20, 2011 at 6:41
  • @Mark It was closed there
    – phwd
    Jun 20, 2011 at 22:03
  • @phwd typical. I do think that programming questions are better asked on SO even if they are audio related.
    – Mark Heath
    Jun 20, 2011 at 22:06
  • @Mark There is an Area 51 proposal that one can commit to : Signal, Image & Video Processing. For the time being it seems it will be thrown back and forth between SO and Audio.
    – phwd
    Jun 20, 2011 at 22:10
  • Since there are now two of these questions and the other one has answers, I'm going to close this one. I agree that it's more programming-oriented but if SO doesn't want these kinds of things then I think they're fine here. Jun 21, 2011 at 15:07

3 Answers 3

5

Filters do work in the time domain, in the form of an algorithm (or an analog circuit).

Linear, time-invariant filters (such as high/low-pass filters) have a frequency response which is a function of the frequency. An ideal low-pass filter with cutoff frequency 1000Hz will have a frequency response that is 1 below 1000Hz and 0 above 1000Hz.

For detecting changes in amplitude, one technique is to first use an optional high-pass filter with very low cutoff frequency in order to eliminate DC components. Then get the absolute value of the resulting signal. The resulting positive signal then goes through a low-pass filter in order to smooth out individual cycles and remove unwanted noise, and that then goes through a deriver (which is a special type of high-pass filter), in order to detect changes in amplitude. The result is compared to some threshold in order to get the significant changes in amplitude.

As you may guess, all of the above needs a complete course in signal processing for clarification. Happy googling!

3
  • Linear, time-invariant filters ... have a frequency response which is a function of the frequency. Isn't that the very definition of operating in the frequency domain and not the time domain?
    – Ted Hopp
    Jun 20, 2011 at 11:03
  • Filters operate in the time domain: they are normally an algorithm that gets input samples and produces output samples. LTI systems have a frequency response, which means that there is a (simple) relationship between the Fourier transforms of input and output signals (basically, Y(f) = H(f).X(f), where H(f) is the transform of the filter's impulse response). But operation is still in the time domain.
    – Juancho
    Jun 20, 2011 at 12:25
  • You can, of course get a frame of samples, do a fast Fourier transform to get a frequency representation, multiply by your desired frequency response, then apply the inverse Fourier transform and get your output frame back to the time domain. This is a valid filtering technique, but needs special care on how to select all parameters: windowing functions for the frames, overlaping of frames, etc.
    – Juancho
    Jun 20, 2011 at 12:28
2

(If this is too elementary please forgive me. Not meaning at all to talk down to you!)

Say you have a "noisy sine wave" on your oscilloscope. The main part of the sine wave is the low-frequency part, and the noise (the "fuzziness") on the sine wave is the high-frequency part.

The oscilloscope sweep would be your time domain.

Low-pass filters let the low frequencies pass through. So this would get rid of the fuzz.

High-pass filters let the high frequencies pass through. This would get rid of the sine wave and leave the noise.

0

Filters can operate in either the time domain or (by various granular or overlap techniques) in the frequency domain. Filters produce changes in both the time domain and the frequency domain. However the changes in both domains are usually easier to describe in the frequency domain, even though they effect the time domain signal as well.

Examples of time domain filters include IIR and FIR filters. FIR filters do a form of weighted averaging of nearby samples, and, depending on the weightings, this averaging can reduce fast variations from the average (thus reducing high frequencies). Or the opposite by essentially subtracting the average. Etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.