void Echo::setdelay(const unsigned char & Pdelay) { delay.setmVal(Pdelay); //this->Pdelay=Pdelay; //delay=1+(int)(Pdelay/127.0*SAMPLE_RATE*1.5);//0 .. 1.5 sec initdelays(); }
void Echo::setlrdelay(const unsigned char & Plrdelay) { REALTYPE tmp; this->Plrdelay=Plrdelay; tmp=(pow(2,fabs(Plrdelay-64.0)/64.0*9)-1.0)/1000.0*SAMPLE_RATE; if (Plrdelay<64.0) tmp=-tmp; lrdelay=(int) tmp; initdelays(); }
void Echo::setlrdelay(unsigned char _Plrdelay) { float tmp; Plrdelay = _Plrdelay; tmp = (powf(2.0f, fabsf(Plrdelay - 64.0f) / 64.0f * 9.0f) - 1.0f) / 1000.0f; if(Plrdelay < 64.0f) tmp = -tmp; lrdelay = tmp; initdelays(); }
void Echo::setlrdelay(unsigned char Plrdelay) { REALTYPE tmp; this->Plrdelay = Plrdelay; tmp = (pow(2, fabs(Plrdelay - 64.0) / 64.0 * 9) - 1.0) / 1000.0; if(Plrdelay < 64.0) tmp = -tmp; lrdelay = tmp; initdelays(); }
Echo::Echo(const int &insertion_, REALTYPE *const efxoutl_, REALTYPE *const efxoutr_) :Effect(insertion_, efxoutl_, efxoutr_, NULL, 0), samplerate(SAMPLE_RATE), Pvolume(50), Ppanning(64), Pdelay(60), Plrdelay(100), Plrcross(100), Pfb(40), Phidamp(60), delayTime(1), lrdelay(0), avgDelay(0), delay(new REALTYPE[(int)(MAX_DELAY * samplerate)], new REALTYPE[(int)(MAX_DELAY * samplerate)]), old(0.0), pos(0), delta(1), ndelta(1) { initdelays(); setpreset(Ppreset); }
Echo::Echo(bool insertion_, float *efxoutl_, float *efxoutr_, unsigned int srate, int bufsize) :Effect(insertion_, efxoutl_, efxoutr_, NULL, 0, srate, bufsize), samplerate(srate), Pvolume(50), Pdelay(60), Plrdelay(100), Pfb(40), Phidamp(60), delayTime(1), lrdelay(0), avgDelay(0), delay(new float[(int)(MAX_DELAY * srate)], new float[(int)(MAX_DELAY * srate)]), old(0.0f), pos(0), delta(1), ndelta(1) { initdelays(); setpreset(Ppreset); }
void Echo::setdelay(unsigned char _Pdelay) { Pdelay = _Pdelay; avgDelay = (Pdelay / 127.0f * 1.5f); //0 .. 1.5 sec initdelays(); }
void Echo::setdelay(unsigned char Pdelay) { this->Pdelay=Pdelay; avgDelay=(Pdelay/127.0*1.5);//0 .. 1.5 sec initdelays(); }