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.

81 lines
2.4KB

  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 <complex>
  20. #include "Effect.h"
  21. #include "EffectLFO.h"
  22. using namespace std;
  23. #define MAX_ALIENWAH_DELAY 100
  24. /**"AlienWah" Effect*/
  25. class Alienwah:public Effect
  26. {
  27. public:
  28. /**
  29. * Constructor
  30. * @param insertion_ true for insertion Effect
  31. * @param efxoutl_ Pointer to Alienwah's left channel output buffer
  32. * @param efxoutr_ Pointer to Alienwah's left channel output buffer
  33. * @return Initialized Alienwah
  34. */
  35. Alienwah(bool insertion_,
  36. float *const efxoutl_,
  37. float *const efxoutr_);
  38. ~Alienwah();
  39. void out(const Stereo<float *> &smp);
  40. void setpreset(unsigned char npreset);
  41. void changepar(int npar, unsigned char value);
  42. unsigned char getpar(int npar) const;
  43. void cleanup(void);
  44. private:
  45. //Alienwah Parameters
  46. EffectLFO lfo; //lfo-ul Alienwah
  47. unsigned char Pvolume;
  48. unsigned char Pdepth; //the depth of the Alienwah
  49. unsigned char Pfb; //feedback
  50. unsigned char Pdelay;
  51. unsigned char Pphase;
  52. //Control Parameters
  53. void setvolume(unsigned char _Pvolume);
  54. void setdepth(unsigned char _Pdepth);
  55. void setfb(unsigned char _Pfb);
  56. void setdelay(unsigned char _Pdelay);
  57. void setphase(unsigned char _Pphase);
  58. //Internal Values
  59. float fb, depth, phase;
  60. complex<float> *oldl, *oldr;
  61. complex<float> oldclfol, oldclfor;
  62. int oldk;
  63. };
  64. #endif