Alienwah.h (1749B)
1 /* 2 ZynAddSubFX - a software synthesizer 3 4 Alienwah.h - "AlienWah" effect 5 Copyright (C) 2002-2005 Nasca Octavian Paul 6 Author: Nasca Octavian Paul 7 8 This program is free software; you can redistribute it and/or 9 modify it under the terms of the GNU General Public License 10 as published by the Free Software Foundation; either version 2 11 of the License, or (at your option) any later version. 12 */ 13 14 #ifndef ALIENWAH_H 15 #define ALIENWAH_H 16 17 #include "Effect.h" 18 #include "EffectLFO.h" 19 #include <complex> 20 21 #define MAX_ALIENWAH_DELAY 100 22 23 namespace zyn { 24 25 /**"AlienWah" Effect*/ 26 class Alienwah final:public Effect 27 { 28 public: 29 Alienwah(EffectParams pars); 30 ~Alienwah(); 31 void out(const Stereo<float *> &smp); 32 33 unsigned char getpresetpar(unsigned char npreset, unsigned int npar); 34 void setpreset(unsigned char npreset); 35 void changepar(int npar, unsigned char value); 36 unsigned char getpar(int npar) const; 37 void cleanup(void); 38 39 static rtosc::Ports ports; 40 private: 41 //Alienwah Parameters 42 EffectLFO lfo; //lfo-ul Alienwah 43 unsigned char Pvolume; 44 unsigned char Pdepth; //the depth of the Alienwah 45 unsigned char Pfb; //feedback 46 unsigned char Pdelay; 47 unsigned char Pphase; 48 49 50 //Control Parameters 51 void setvolume(unsigned char _Pvolume); 52 void setdepth(unsigned char _Pdepth); 53 void setfb(unsigned char _Pfb); 54 void setdelay(unsigned char _Pdelay); 55 void setphase(unsigned char _Pphase); 56 57 //Internal Values 58 float fb, depth, phase; 59 std::complex<float> *oldl, *oldr; 60 std::complex<float> oldclfol, oldclfor; 61 int oldk; 62 }; 63 64 } 65 66 #endif