public override void process_int(Channel input1, Channel left_op1, Channel right_op1) { // (struct effect *p, struct data_block *db) Channel db = input1; PhasorParams pp = (PhasorParams)this.parameters; RCFilter.LC_filter(db, db.BufferSize, sys.HIGHPASS, pp.f, pp.fd); if (pp.bandpass != 0) { RCFilter.RC_bandpass(db, db.BufferSize, (pp.fd)); } pp.f += pp.df; if (pp.f >= pp.freq_high || pp.f <= pp.freq_low) { pp.df = -pp.df; } RCFilter.RC_set_freq(pp.f, (pp.fd)); }
public override void process_int(Channel input1, Channel left_op1, Channel right_op1) { //throw new NotImplementedException(); if (parameters.enable) { AutowahParams ap; ap = (AutowahParams)this.parameters; float[] dry = new float[input1.BufferSize]; for (int ii = 0; ii < input1.BufferSize; ii++) { dry[ii] = input1[ii]; } int i; /* * if (ap->wah_count != 0) { * LC_filter(db->data, db->len, HIGHPASS,ap->freq_high, ap->fd); * } */ ap.f += ap.df; if (ap.f >= ap.freq_high) { ap.df = -ap.df; ap.wah_count = 2; } if (ap.f <= ap.freq_low && ap.wah_count == 2) { ap.wah_count = 0; } if (ap.wah_count == 1) { ap.df = 0; ap.f = ap.freq_low; ap.wah_count = 0; } if (ap.df != 0) { RCFilter.RC_bandpass(input1, input1.BufferSize, ap.fd); } ap.f += ap.df; if (ap.f >= ap.freq_high || ap.f <= ap.freq_low) { ap.df = -ap.df; ap.wah_count += 2; if (ap.df != 0) { ap.wah_count++; } } RCFilter.RC_set_freq(ap.f, ap.fd); if (ap.mixx == 1) { for (i = 0; i < input1.BufferSize; i++) { input1[i] = (input1[i] + dry[i]) / 2; } } } }