Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.0KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Alienwah.h - "AlienWah" effect
  4. Copyright (C) 2002-2005 Nasca Octavian Paul
  5. Author: Nasca Octavian Paul
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of version 2 of the GNU General Public License
  8. as published by the Free Software Foundation.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License (version 2 or later) for more details.
  13. You should have received a copy of the GNU General Public License (version 2)
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. #ifndef ALIENWAH_H
  18. #define ALIENWAH_H
  19. #include "Effect.h"
  20. #include "EffectLFO.h"
  21. #include <complex>
  22. #define MAX_ALIENWAH_DELAY 100
  23. /**"AlienWah" Effect*/
  24. class Alienwah:public Effect
  25. {
  26. public:
  27. Alienwah(EffectParams pars);
  28. ~Alienwah();
  29. void out(const Stereo<float *> &smp);
  30. void setpreset(unsigned char npreset);
  31. void changepar(int npar, unsigned char value);
  32. unsigned char getpar(int npar) const;
  33. void cleanup(void);
  34. private:
  35. //Alienwah Parameters
  36. EffectLFO lfo; //lfo-ul Alienwah
  37. unsigned char Pvolume;
  38. unsigned char Pdepth; //the depth of the Alienwah
  39. unsigned char Pfb; //feedback
  40. unsigned char Pdelay;
  41. unsigned char Pphase;
  42. //Control Parameters
  43. void setvolume(unsigned char _Pvolume);
  44. void setdepth(unsigned char _Pdepth);
  45. void setfb(unsigned char _Pfb);
  46. void setdelay(unsigned char _Pdelay);
  47. void setphase(unsigned char _Pphase);
  48. //Internal Values
  49. float fb, depth, phase;
  50. std::complex<float> *oldl, *oldr;
  51. std::complex<float> oldclfol, oldclfor;
  52. int oldk;
  53. };
  54. #endif