Csound Csound-dev Csound-tekno Search About

[Csnd] minimum phase filter and other filters

Date2013-10-20 23:34
Fromzohar argaman
Subject[Csnd] minimum phase filter and other filters
AttachmentsNone  None  

Date2013-10-20 23:36
FromMachina
Subject[Csnd] minimum phase filter and other filters
AttachmentsNone  None  

Date2013-10-21 19:49
FromSteven Yi
SubjectRe: [Csnd] minimum phase filter and other filters
Maybe these pages would help:

http://csounds.com/manual/html/SigmodStandard.html
http://csounds.com/manual/html/SigmodSpeciali.html



On Sun, Oct 20, 2013 at 6:36 PM, Machina  wrote:
>
> hi
>
> i see only butterworth, chebyshev, and elliptic filter.
> where can i find more filters implemented in csound?
> im specifically looking for minimum phase filter (and other IIR)
>
> thanks
>

Date2013-10-21 20:28
FromJustin Smith
SubjectRe: [Csnd] minimum phase filter and other filters
By the way, it is not mentioned in the CS docs anywhere, but it seems that butterworth filters (butterbp, butterbr, butterhp, butterlp) are minimum phase. http://www.xsgeo.com/course/filt.htm


On Mon, Oct 21, 2013 at 11:49 AM, Steven Yi <stevenyi@gmail.com> wrote:
Maybe these pages would help:

http://csounds.com/manual/html/SigmodStandard.html
http://csounds.com/manual/html/SigmodSpeciali.html



On Sun, Oct 20, 2013 at 6:36 PM, Machina <machinadeoro@gmail.com> wrote:
>
> hi
>
> i see only butterworth, chebyshev, and elliptic filter.
> where can i find more filters implemented in csound?
> im specifically looking for minimum phase filter (and other IIR)
>
> thanks
>


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2013-10-25 09:24
FromMachina
SubjectRe: [Csnd] minimum phase filter and other filters
AttachmentsNone  None  

Date2013-10-25 09:58
Fromcameron bobro
SubjectRe: [Csnd] minimum phase filter and other filters
"phase distortion" is not the right expression- phase distortion is a synthesis technique that produces sidebands, additional partials harmonic or inharmonic. Phase "smearing", yes. All these things have their plusses and minuses. A filter with heavy phase smearing can sound beautiful (Buchla being the most famous example I guess), a linear phase filter "hard" or "brittle".  

I agree that it would be nice to have the options offered by FabFilter, with degrees of phase trueness all the way to linear. Personally I find that combinations of different filters work best musically.


On Friday, October 25, 2013 10:24 AM, Machina <machinadeoro@gmail.com> wrote:
thanks for your help guys.
maybe i misunderstood the concept of minimum phase. i believed a minimum phase filter provides the least amount of phase distortion. i've seen butterworth vs chebyshev phase distortion and its pretty clear (and audible as well) that chebyshev filter causes a lot less phase distortion (better sound resolution, less smearing). i'm looking for even better filters (specifically for the least smearing LP filters) so i was looking into minimum phase. i was comparing with fabfilter's Pro-Q and couldn't understand what they were using (they have options for linear phase and minimum phase so that was my intuition).

anyway thanks very much for your help. hopefully i would figure this out soon
On Monday, October 21, 2013 at 10:28 PM, Justin Smith wrote:
By the way, it is not mentioned in the CS docs anywhere, but it seems that butterworth filters (butterbp, butterbr, butterhp, butterlp) are minimum phase. http://www.xsgeo.com/course/filt.htm


On Mon, Oct 21, 2013 at 11:49 AM, Steven Yi <stevenyi@gmail.com> wrote:
Maybe these pages would help:

http://csounds.com/manual/html/SigmodStandard.html
http://csounds.com/manual/html/SigmodSpeciali.html



On Sun, Oct 20, 2013 at 6:36 PM, Machina <machinadeoro@gmail.com> wrote:
>
> hi
>
> i see only butterworth, chebyshev, and elliptic filter.
> where can i find more filters implemented in csound?
> im specifically looking for minimum phase filter (and other IIR)
>
> thanks
>


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"







Date2013-10-25 10:06
FromRichard Dobson
SubjectRe: [Csnd] minimum phase filter and other filters
Unfortunately the formal definition of minimum phase is somewhat 
technical (mathematical). The basic requirement is that both poles and 
zeroes of the filter must be within the "unit circle" (in the complex 
plane). Simple Butterworth filters can reasonably be called minimum 
phase if they comply with that requirement. Of course poles must always 
be inside the circle for stability, but there is no problem in having 
zeroes outside the circle, and many filters do just that.

Another way of understanding minimum phase is "minimum delay". This is 
best understood by comparison with a "linear phase" filter, typically 
implemented as a FIR filter. In a FIR filter (always stable) delay is 
strictly linear with frequency (the phase plot is a straight line). In a 
linear phase filter the impulse response is symmetrical (looking much 
like a sinc function). A linear phase filter applies no phase distortion 
as such, only delay, and is widely used for audio mastering as it does 
not distort or smear transients. However, there is a relatively large 
amount of "pre-ringing" in such a filter, which is often considered 
undesirable.

The alternative is to shift most of the energy of the impulse response 
(i.e. the peak of the response) towards the beginning of the impulse 
response, so that there is minimum pre-ringing, and  a slighly longer 
post-ringing. The phase plot is no longer a straight line, so the filter 
is no longer strictly linear phase.


The display utility "FrequencyResponse" written by John Fitch for the 
Audio Programming Book can be used to display the poles, frequency, 
impulse and phase responses of first and second order (biquad) filters.

An example comparison between minimum and linear phase filters is shown 
graphically here:

https://ccrma.stanford.edu/~jos/filters/Linear_Phase_Really_Ideal.html

One important use of minimum phase filters is in loudspeaker crossover 
networks.


Richard Dobson



On 25/10/2013 09:24, Machina wrote:
> thanks for your help guys.
> maybe i misunderstood the concept of minimum phase. i believed a minimum
> phase filter provides the least amount of phase distortion. i've seen
> butterworth vs chebyshev phase distortion and its pretty clear (and
> audible as well) that chebyshev filter causes a lot less phase
> distortion (better sound resolution, less smearing). i'm looking for
> even better filters (specifically for the least smearing LP filters) so
> i was looking into minimum phase. i was comparing with fabfilter's Pro-Q
> and couldn't understand what they were using (they have options for
> linear phase and minimum phase so that was my intuition).
>
> anyway thanks very much for your help. hopefully i would figure this out
> soon
>
> On Monday, October 21, 2013 at 10:28 PM, Justin Smith wrote:
>
>> By the way, it is not mentioned in the CS docs anywhere, but it seems
>> that butterworth filters (butterbp, butterbr, butterhp, butterlp) are
>> minimum phase. http://www.xsgeo.com/course/filt.htm
>>
>>
>> On Mon, Oct 21, 2013 at 11:49 AM, Steven Yi > > wrote:
>>> Maybe these pages would help:
>>>
>>> http://csounds.com/manual/html/SigmodStandard.html
>>> http://csounds.com/manual/html/SigmodSpeciali.html
>>>
>>>
>>>
>>> On Sun, Oct 20, 2013 at 6:36 PM, Machina >> > wrote:
>>> >
>>> > hi
>>> >
>>> > i see only butterworth, chebyshev, and elliptic filter.
>>> > where can i find more filters implemented in csound?
>>> > im specifically looking for minimum phase filter (and other IIR)
>>> >
>>> > thanks
>>> >
>>>
>>>
>>> Send bugs reports to the Sourceforge bug trackers
>>> csound6:
>>> https://sourceforge.net/p/csound/tickets/
>>> csound5:
>>> https://sourceforge.net/p/csound/bugs/
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk
>>>  with body "unsubscribe csound"
>>>
>>>
>>
>


Date2013-10-26 11:43
FromZohar Argaman
SubjectRe: [Csnd] minimum phase filter and other filters
"The alternative is to shift most of the energy of the impulse response (i.e. the peak of the response) towards the beginning of the impulse response, so that there is minimum pre-ringing, and  a slighly longer post-ringing. The phase plot is no longer a straight line, so the filter is no longer strictly linear phase."

this sound really interesting.
how can i "shift" the energy towards the beginning?
this seem like the best compromise between minimum transient smearing and preserving the "punch" with minimum pre-ringing.

plus, browsing through the manual i didnt see any linear phase filters... anybody know that kind of filter?


On Fri, Oct 25, 2013 at 12:06 PM, Richard Dobson <richarddobson@blueyonder.co.uk> wrote:
Unfortunately the formal definition of minimum phase is somewhat technical (mathematical). The basic requirement is that both poles and zeroes of the filter must be within the "unit circle" (in the complex plane). Simple Butterworth filters can reasonably be called minimum phase if they comply with that requirement. Of course poles must always be inside the circle for stability, but there is no problem in having zeroes outside the circle, and many filters do just that.

Another way of understanding minimum phase is "minimum delay". This is best understood by comparison with a "linear phase" filter, typically implemented as a FIR filter. In a FIR filter (always stable) delay is strictly linear with frequency (the phase plot is a straight line). In a linear phase filter the impulse response is symmetrical (looking much like a sinc function). A linear phase filter applies no phase distortion as such, only delay, and is widely used for audio mastering as it does not distort or smear transients. However, there is a relatively large amount of "pre-ringing" in such a filter, which is often considered undesirable.

The alternative is to shift most of the energy of the impulse response (i.e. the peak of the response) towards the beginning of the impulse response, so that there is minimum pre-ringing, and  a slighly longer post-ringing. The phase plot is no longer a straight line, so the filter is no longer strictly linear phase.


The display utility "FrequencyResponse" written by John Fitch for the Audio Programming Book can be used to display the poles, frequency, impulse and phase responses of first and second order (biquad) filters.

An example comparison between minimum and linear phase filters is shown graphically here:

https://ccrma.stanford.edu/~jos/filters/Linear_Phase_Really_Ideal.html

One important use of minimum phase filters is in loudspeaker crossover networks.


Richard Dobson




On 25/10/2013 09:24, Machina wrote:
thanks for your help guys.
maybe i misunderstood the concept of minimum phase. i believed a minimum
phase filter provides the least amount of phase distortion. i've seen
butterworth vs chebyshev phase distortion and its pretty clear (and
audible as well) that chebyshev filter causes a lot less phase
distortion (better sound resolution, less smearing). i'm looking for
even better filters (specifically for the least smearing LP filters) so
i was looking into minimum phase. i was comparing with fabfilter's Pro-Q
and couldn't understand what they were using (they have options for
linear phase and minimum phase so that was my intuition).

anyway thanks very much for your help. hopefully i would figure this out
soon

On Monday, October 21, 2013 at 10:28 PM, Justin Smith wrote:

By the way, it is not mentioned in the CS docs anywhere, but it seems
that butterworth filters (butterbp, butterbr, butterhp, butterlp) are
minimum phase. http://www.xsgeo.com/course/filt.htm


On Mon, Oct 21, 2013 at 11:49 AM, Steven Yi <stevenyi@gmail.com
<mailto:stevenyi@gmail.com>> wrote:
<mailto:machinadeoro@gmail.com>> wrote:
>
> hi
>
> i see only butterworth, chebyshev, and elliptic filter.
> where can i find more filters implemented in csound?
> im specifically looking for minimum phase filter (and other IIR)
>
> thanks
>


Send bugs reports to the Sourceforge bug trackers
csound6:
https://sourceforge.net/p/csound/tickets/
csound5:
https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk
<mailto:sympa@lists.bath.ac.uk> with body "unsubscribe csound"







Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2013-10-28 18:30
FromRichard Dobson
SubjectRe: [Csnd] minimum phase filter and other filters
It's a mathematical procedure, applied at design stage; most simply 
described, it "reflects" or inverts any complex zeroes outside the unit 
circle to the inside. It is not for the faint-hearted (i.e. I have never 
yet tried to do this myself!), but a typical description of the 
procedure is here:

http://www.dspguru.com/dsp/howtos/how-to-design-minimum-phase-fir-filters


This is regarding the design of FIR filters. The majority of "musically 
interesting" FIR filters involve fairly long impulse responses (e.g. 
reverb!), and to run in real time they need to be implemented using 
"fast convolution", i.e. via the FFT. Clearly this means it is a lot 
more computationally demanding than  nice IIR filter, and also has a 
high latency. The opcode most closely associated with this process is 
"convolve".


The majority of IIR filters are themselves usually designed as minimum 
phase anyway; for musical purposes they are easily the more 
"interesting". So it is not that surprising that Csound does not provide 
tools for FIR filter design!

Richard Dobson




On 26/10/2013 11:43, Zohar Argaman wrote:
> "The alternative is to shift most of the energy of the impulse response
> (i.e. the peak of the response) towards the beginning of the impulse
> response, so that there is minimum pre-ringing, and  a slighly longer
> post-ringing. The phase plot is no longer a straight line, so the filter
> is no longer strictly linear phase."
>
> this sound really interesting.
> how can i "shift" the energy towards the beginning?
> this seem like the best compromise between minimum transient smearing
> and preserving the "punch" with minimum pre-ringing.
>
> plus, browsing through the manual i didnt see any linear phase
> filters... anybody know that kind of filter?
>