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.

62 lines
1.6KB

  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
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or (at your option) any later version.
  10. */
  11. #ifndef ALIENWAH_H
  12. #define ALIENWAH_H
  13. #include "Effect.h"
  14. #include "EffectLFO.h"
  15. #include <complex>
  16. #define MAX_ALIENWAH_DELAY 100
  17. /**"AlienWah" Effect*/
  18. class Alienwah:public Effect
  19. {
  20. public:
  21. Alienwah(EffectParams pars);
  22. ~Alienwah();
  23. void out(const Stereo<float *> &smp);
  24. void setpreset(unsigned char npreset);
  25. void changepar(int npar, unsigned char value);
  26. unsigned char getpar(int npar) const;
  27. void cleanup(void);
  28. static rtosc::Ports ports;
  29. private:
  30. //Alienwah Parameters
  31. EffectLFO lfo; //lfo-ul Alienwah
  32. unsigned char Pvolume;
  33. unsigned char Pdepth; //the depth of the Alienwah
  34. unsigned char Pfb; //feedback
  35. unsigned char Pdelay;
  36. unsigned char Pphase;
  37. //Control Parameters
  38. void setvolume(unsigned char _Pvolume);
  39. void setdepth(unsigned char _Pdepth);
  40. void setfb(unsigned char _Pfb);
  41. void setdelay(unsigned char _Pdelay);
  42. void setphase(unsigned char _Pphase);
  43. //Internal Values
  44. float fb, depth, phase;
  45. std::complex<float> *oldl, *oldr;
  46. std::complex<float> oldclfol, oldclfor;
  47. int oldk;
  48. };
  49. #endif