public static void ToPeqCoefficient(Coefficient digital, ParametricEqualizer.Parameter peq) { double[] a = digital.a; double[] b = digital.b; peq.c = b[0] / a[0]; peq.a1 = -a[1] / a[0]; peq.a2 = -a[2] / a[0]; peq.b1 = b[1] / b[0]; peq.b2 = b[2] / b[0]; }
/// <summary> /// PEQ 係数(LPF)を計算。 /// </summary> /// <param name="w"></param> /// <returns></returns> public virtual ParametricEqualizer.Parameter[] GetLPF(double w) { ParametricEqualizer.Parameter[] peq = new ParametricEqualizer.Parameter[this.Length]; for (int i = 0; i < peq.Length; ++i) { peq[i] = new ParametricEqualizer.Parameter(); } ToPeqCoefficient(this.GetDigitalLPF(w), peq); return(peq); }