0
$\begingroup$

Let's say, that I want to low-pass the norm (hence positive values) of an analytic signal (related to Hilbert transform). This allows me to perform experiments with the envelope of audio.

For low-passing, I apply a Gaussian blur. It's technically the same as applying multiple time a moving average. The advantages of a Gaussian blur are:

  • easy to implement, and enough fast.
  • good attenuation in the "stop band" (I just have to iterate more moving average to improve this).
  • all values remain positives. This is important, because I use the low-passed norm to perform divisions.

But I'd like to test a low-pass with a narrower transition band.

Could you suggest me a simple solution, for a low-pass FIR (or something "linear phase" anyways) , with a narrower transition band than a straightforward Gaussian blur, and that allows to keep all values positive. For instance, with a sinc based FIR, there are oscillations around the zero line, and I want to avoid that. Adding an offset is out of question, as I want a result that is representative of the amplitude of the audio.

$\endgroup$
0
$\begingroup$

You can't, at least not strictly. Low pass filters with an all positive impulse response will always have a very wide transition band.

However, if you want to do audio envelope detection both Hilbert Transform and low pass filters are the wrong tools for the job: Hilbert Transformers don't work well on broad band signals and low pass filters mess up your transients and onsets.

$\endgroup$
  • $\begingroup$ Thanks, you confirmed what I wanted to know: " an all positive impulse response will always have a very wide transition band". I don't see the problem with Hilbert Transform and broad band signal , at least when I look at the frequency response, it closely match real part. Yes, low pass mess-up transients, I improved a bit results by "emulating" a weighted gaussian Median filtering (I believe it works, tested with images). But if I could restrict the transition band with a plain low pass, results might be better. I want to auto-adjust level of a "pleasing" distortion effect. $\endgroup$ – Mehdi Jul 13 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.