C# Class SoundLibrary.Filter.Equalizer.FilterDesigner

パライコの IIR フィルタ設計クラス。
フィルタの零/極計算。 零/極 → アナログプロトタイプフィルタ係数計算。 AP フィルタ →[双一次変換]→ ディジタルフィルタ化。 ディジタルフィルタ係数を ParametricEqualizer クラスの形式に変換。 零/極 : AP フィルタの零/極。共役複素数根、実根×2、もしくは実根×1。 AP フィルタ係数 : a[3], b[3]。�巴[i]s^i / �蚤[i]s^i。 ディジタルフィルタ係数: a[3], b[3]。�巴[i]z^-i / �蚤[i]z^-i。 パライコクラスの係数 : a[2], b[2], c。c * (1 + �巴[i]z^-i) / (1 - �蚤[i]z^-i)。
Mostrar archivo Open project: ufcpp/UfcppSample

Protected Properties

Property Type Description
order int

Public Methods

Method Description
BilinearTransform ( Coefficient ap, Coefficient digital, double w ) : void
BilinearTransform ( Coefficient ap, Coefficient digital, double sin, double cos ) : void
BilinearTransform ( double a0, double a1, double &d0, double &d1, double sin, double cos ) : void

1次の伝達関数を双1時変換する。

(b0 + b1 s)/(a0 + a1 s) を、双1次変換した結果を (b0' + b1' z^-1)/(a0' + a1' z^-1)とするとき、 a0, a1 → a0', a1' を求める。 (b に関しても同様の手順で変換可能。)

BilinearTransform ( double a0, double a1, double a2, double &d0, double &d1, double &d2, double sin, double cos ) : void

2次の伝達関数を双1時変換する。

(b0 + b1 s + b2 s^2)/(a0 + a1 s + a2 s^2) を、双1次変換した結果を (b0' + b1' z^-1 + b2' z^-2)/(a0' + a1' z^-1 + a2' z^-2)とするとき、 a0, a1, a2 → a0', a1', a2' を求める。 (b に関しても同様の手順で変換可能。)

DigitalS ( System.Function w ) : System.Function

双1次変換(ωs=π/2) s = (z^-1 + 1) / (z^-1 - 1) = j tan(ω/2)

DigitalS ( System.Function w, System.Function ws ) : System.Function

双1次変換 s = 1/tan(ωs/2) * (z^-1 + 1) / (z^-1 - 1) = j tan(ω/2) / tan(ωs/2)

DigitalS ( System.Function w, double ws ) : System.Function

双1次変換 s = 1/tan(ωs/2) * (z^-1 + 1) / (z^-1 - 1) = j tan(ω/2) / tan(ωs/2)

GetAnalogPrototype ( ) : SoundLibrary.Filter.Equalizer.Coefficient[]

アナログプロトタイプフィルタの係数を計算。

GetAnalogPrototype ( Coefficient coefs ) : void

アナログプロトタイプフィルタの係数を計算。

GetDigitalLPF ( double w ) : SoundLibrary.Filter.Equalizer.Coefficient[]

ディジタル LPF 係数を計算。

GetDigitalLPF ( double w, Coefficient coefs ) : void

ディジタル LPF 係数を計算。

GetLPF ( double w ) : ParametricEqualizer.Parameter[]

PEQ 係数(LPF)を計算。

GetTransferFunction ( System.Function s ) : System.Function

アナログ伝達関数を取得。

GetTransferFunction ( System.Function w, System.Function ws ) : System.Function

ディジタル伝達関数の周波数特性を取得。

GetZeroPole ( ) : SoundLibrary.Filter.Equalizer.ZeroPole[]

フィルタの零点/極を計算。 結果格納用の配列を関数内で確保。

GetZeroPole ( ZeroPole roots ) : void

フィルタの零点/極を計算。

RootToAnalogPrototype ( Root root, double c ) : void
ToPeqCoefficient ( Coefficient digital, ParametricEqualizer peq ) : void
ZInv ( System.Function w ) : System.Function

z^-1 = exp(-jω)

ZeroPoleToAnalogPrototype ( ZeroPole zeropole, Coefficient coef ) : void

Protected Methods

Method Description
FilterDesigner ( ) : System
FilterDesigner ( int order ) : System
GetSinCos ( double w, double &sin, double &cos ) : void

Method Details

BilinearTransform() public static method

public static BilinearTransform ( Coefficient ap, Coefficient digital, double w ) : void
ap Coefficient
digital Coefficient
w double
return void

BilinearTransform() public static method

public static BilinearTransform ( Coefficient ap, Coefficient digital, double sin, double cos ) : void
ap Coefficient
digital Coefficient
sin double
cos double
return void

BilinearTransform() public static method

1次の伝達関数を双1時変換する。
(b0 + b1 s)/(a0 + a1 s) を、双1次変換した結果を (b0' + b1' z^-1)/(a0' + a1' z^-1)とするとき、 a0, a1 → a0', a1' を求める。 (b に関しても同様の手順で変換可能。)
public static BilinearTransform ( double a0, double a1, double &d0, double &d1, double sin, double cos ) : void
a0 double a0(a0'の値に上書きされる)
a1 double a1(a1'の値に上書きされる)
d0 double
d1 double
sin double sin ωs
cos double cos ωs
return void

BilinearTransform() public static method

2次の伝達関数を双1時変換する。
(b0 + b1 s + b2 s^2)/(a0 + a1 s + a2 s^2) を、双1次変換した結果を (b0' + b1' z^-1 + b2' z^-2)/(a0' + a1' z^-1 + a2' z^-2)とするとき、 a0, a1, a2 → a0', a1', a2' を求める。 (b に関しても同様の手順で変換可能。)
public static BilinearTransform ( double a0, double a1, double a2, double &d0, double &d1, double &d2, double sin, double cos ) : void
a0 double a0(a0'の値に上書きされる)
a1 double a1(a1'の値に上書きされる)
a2 double a2(a2'の値に上書きされる)
d0 double
d1 double
d2 double
sin double sin ωs
cos double cos ωs
return void

DigitalS() public static method

双1次変換(ωs=π/2) s = (z^-1 + 1) / (z^-1 - 1) = j tan(ω/2)
public static DigitalS ( System.Function w ) : System.Function
w System.Function ω
return System.Function

DigitalS() public static method

双1次変換 s = 1/tan(ωs/2) * (z^-1 + 1) / (z^-1 - 1) = j tan(ω/2) / tan(ωs/2)
public static DigitalS ( System.Function w, System.Function ws ) : System.Function
w System.Function ω
ws System.Function ωs
return System.Function

DigitalS() public static method

双1次変換 s = 1/tan(ωs/2) * (z^-1 + 1) / (z^-1 - 1) = j tan(ω/2) / tan(ωs/2)
public static DigitalS ( System.Function w, double ws ) : System.Function
w System.Function ω
ws double ωs
return System.Function

FilterDesigner() protected method

protected FilterDesigner ( ) : System
return System

FilterDesigner() protected method

protected FilterDesigner ( int order ) : System
order int
return System

GetAnalogPrototype() public method

アナログプロトタイプフィルタの係数を計算。
public GetAnalogPrototype ( ) : SoundLibrary.Filter.Equalizer.Coefficient[]
return SoundLibrary.Filter.Equalizer.Coefficient[]

GetAnalogPrototype() public method

アナログプロトタイプフィルタの係数を計算。
public GetAnalogPrototype ( Coefficient coefs ) : void
coefs Coefficient 計算結果の格納先
return void

GetDigitalLPF() public method

ディジタル LPF 係数を計算。
public GetDigitalLPF ( double w ) : SoundLibrary.Filter.Equalizer.Coefficient[]
w double カットオフ周波数
return SoundLibrary.Filter.Equalizer.Coefficient[]

GetDigitalLPF() public method

ディジタル LPF 係数を計算。
public GetDigitalLPF ( double w, Coefficient coefs ) : void
w double カットオフ周波数
coefs Coefficient 計算結果の格納先
return void

GetLPF() public method

PEQ 係数(LPF)を計算。
public GetLPF ( double w ) : ParametricEqualizer.Parameter[]
w double
return ParametricEqualizer.Parameter[]

GetSinCos() protected static method

protected static GetSinCos ( double w, double &sin, double &cos ) : void
w double
sin double
cos double
return void

GetTransferFunction() public method

アナログ伝達関数を取得。
public GetTransferFunction ( System.Function s ) : System.Function
s System.Function s 領域変数
return System.Function

GetTransferFunction() public method

ディジタル伝達関数の周波数特性を取得。
public GetTransferFunction ( System.Function w, System.Function ws ) : System.Function
w System.Function 周波数変数ω(正規化角周波数)
ws System.Function カットオフ周波数ωs(正規化角周波数)
return System.Function

GetZeroPole() public method

フィルタの零点/極を計算。 結果格納用の配列を関数内で確保。
public GetZeroPole ( ) : SoundLibrary.Filter.Equalizer.ZeroPole[]
return SoundLibrary.Filter.Equalizer.ZeroPole[]

GetZeroPole() public abstract method

フィルタの零点/極を計算。
public abstract GetZeroPole ( ZeroPole roots ) : void
roots ZeroPole 零点/極一覧の格納先
return void

RootToAnalogPrototype() public static method

public static RootToAnalogPrototype ( Root root, double c ) : void
root Root
c double
return void

ToPeqCoefficient() public static method

public static ToPeqCoefficient ( Coefficient digital, ParametricEqualizer peq ) : void
digital Coefficient
peq ParametricEqualizer
return void

ZInv() public static method

z^-1 = exp(-jω)
public static ZInv ( System.Function w ) : System.Function
w System.Function 周波数ω
return System.Function

ZeroPoleToAnalogPrototype() public static method

public static ZeroPoleToAnalogPrototype ( ZeroPole zeropole, Coefficient coef ) : void
zeropole ZeroPole
coef Coefficient
return void

Property Details

order protected_oe property

protected int order
return int