/// <summary> /// /// </summary> public PitchShifter(Queue input, Queue temp1, Queue temp2, Queue output, int size, int overlap, double rate, int maxSkip) : base(input, output) { this.cap = new EllipticFilterDesigner(8, 0.99, 0.05).GetAnalogPrototype(); this.cd = new Coefficient[this.cap.Length]; for (int i = 0; i < this.cd.Length; ++i) { this.cd[i] = new Coefficient(); } this.peq = new ParametricEqualizer.Parameter[this.cap.Length]; for (int i = 0; i < this.peq.Length; ++i) { this.peq[i] = new ParametricEqualizer.Parameter(); } this.pipes = new Pipe[3]; this.fl = new ParametricEqualizer(this.peq); this.fr = new ParametricEqualizer(this.peq); this.ts = new TimeStretcher(input, output, size, overlap, 1.0 / rate, maxSkip); this.rt = new RateTransposer(input, output, rate); this.fp = new FilteredPipe(input, output, fl, fr); this.temp1 = temp1; this.temp2 = temp2; this.SetRate(rate); this.cp = new CascadePipe(this.pipes); }
/// <summary> /// /// </summary> public PitchShifter(Queue input, Queue temp1, Queue temp2, Queue output, int size, int overlap, double rate, int maxSkip) : base(input, output) { this.cap = new EllipticFilterDesigner(8, 0.99, 0.05).GetAnalogPrototype(); this.cd= new Coefficient[this.cap.Length]; for(int i=0; i<this.cd.Length; ++i) this.cd[i] = new Coefficient(); this.peq = new ParametricEqualizer.Parameter[this.cap.Length]; for(int i=0; i<this.peq.Length; ++i) this.peq[i] = new ParametricEqualizer.Parameter(); this.pipes = new Pipe[3]; this.fl = new ParametricEqualizer(this.peq); this.fr = new ParametricEqualizer(this.peq); this.ts = new TimeStretcher(input, output, size, overlap, 1.0/rate, maxSkip); this.rt = new RateTransposer(input, output, rate); this.fp = new FilteredPipe(input, output, fl, fr); this.temp1 = temp1; this.temp2 = temp2; this.SetRate(rate); this.cp = new CascadePipe(this.pipes); }