IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Which filter artifacts can be eliminated without trade-off?, (in a universe where computing power comes free)
googlebot
post Apr 3 2012, 08:04
Post #1





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



I'm learning, please correct any of the following sentences, if the aren't correct:

  1. We cannot eliminate ringing, just choose where we want it (pre-, post-).
  2. We can minimize ripple by computing power (choice of windowing function) without quality trade-off.
  3. Aliasing in resamplers can eventually only be controlled by passband width and filter steepness (dependency to 1).


If 3 is true, why does the SoX offer a dedicated "allow aliasing" option besides bandwidth and steepness?
Go to the top of the page
+Quote Post
bandpass
post Apr 3 2012, 09:17
Post #2





Group: Members
Posts: 361
Joined: 3-August 08
From: UK
Member No.: 56644



QUOTE (googlebot @ Apr 3 2012, 07:04) *
why does the SoX offer a dedicated "allow aliasing" option besides bandwidth and steepness?

SoX offers a bandwidth option (of which "steep" filter is one particular case) and with this, the stop-band (the point at which the selected attenuation begins) is automatically set to the (old or new as appropriate) nyquist frequency, so there will be no aliasing or imaging (at levels above the selected attenuation). Selecting "allow aliasing" repositions the the filter's stop band to begin above the nyquist.

From an audio perspective, I've not found aliasing particularly useful: if filtering at ~20kHz, one (or at least I) can hear neither the ringing nor the traded aliasing, so it makes no odds. If filtering in the audible band (e.g. resampling 16kHz -> 44.1kHz) then you're trading one audible artefact for another—it might be useful to do so depending on the audio content.

Two minor things that "allow aliasing" give are quicker filtering/conversion due to the shorter filter (but the effect is very small when FFT filtering), and "full" spectrograms that don't fade out at the top of the graph (so that must mean fuller-sounding audio, right? wink.gif ).

This post has been edited by bandpass: Apr 3 2012, 09:19
Go to the top of the page
+Quote Post
Woodinville
post Apr 3 2012, 09:41
Post #3





Group: Members
Posts: 1414
Joined: 9-January 05
From: In the kitchen
Member No.: 18957



If I may offer a suggestion:

load octave, the signal package, and the audio package (and whatever else that entails). It's free and it runs on most anything.

then, learn how to run "remez", which is an FIR filter designer. (while IIR also fits into your question, it's only a question of ringing both before and after, or just after)

The root mechanism in octave isn't good enough to do a really good example of a minimum-phase FIR.

But let me offer a few lines of code. Each of these filters can be plotted (as to response) by using freqz(bb,1)

bb1=remez(32,[0 .4 .6 1],[1 1 0 0]) - short filter, 60dB rejection, small but visible ripple, transition band of .2 times the bandwidth of the digital system.

bb2=remez(64,[0 .45 .55 1],[1 1 0 0]) - same rejection, transition band of .1

Plot both of the filter impuse responses centered with regard to each other on the same horizontal scale.

Look at the steepness of the transition band, look at the shape of the filter.

You will notice something right away.

Then try this

for bb2 do

bbr=roots(bb2);
for (ii=1:64)
if ( abs(bbr(ii))>1)
bbr(ii)=1/bbr(ii);
end
end
bbb=real(poly(bbr));
t=sum(bbb);
bbb=bbb/t;

now to freqz(bbb) and compare it to freqz(bb2)

Holy cow, batman, identical smile.gif

now plot bbb on top of bb2

Minimum phase FIR ...

Playing with the arguments (and doing "help remez") will let you design a variety of FIR filters, and learn how the tradeoffs actually work.



--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
googlebot
post Apr 3 2012, 10:41
Post #4





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



Thank you guys, very insightful.
Go to the top of the page
+Quote Post
2Bdecided
post Apr 3 2012, 12:13
Post #5


ReplayGain developer


Group: Developer
Posts: 5362
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (googlebot @ Apr 3 2012, 08:04) *
[*]We cannot eliminate ringing, just choose where we want it (pre-, post-).
Well, you can reduce it by having a more gentle roll off. That's probably stating the obvious though.

It doesn't need to introduce more aliasing - it can sacrifice more of the frequencies below Nyquist.

You may find this thread interesting...
http://www.hydrogenaudio.org/forums/index....showtopic=68524

Cheers,
David.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd December 2014 - 16:39