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.

Alienwah.h 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. unsigned int srate, int bufsize);
  39. ~Alienwah();
  40. void out(const Stereo<float *> &smp);
  41. void setpreset(unsigned char npreset);
  42. void changepar(int npar, unsigned char value);
  43. unsigned char getpar(int npar) const;
  44. void cleanup(void);
  45. private:
  46. //Alienwah Parameters
  47. EffectLFO lfo; //lfo-ul Alienwah
  48. unsigned char Pvolume;
  49. unsigned char Pdepth; //the depth of the Alienwah
  50. unsigned char Pfb; //feedback
  51. unsigned char Pdelay;
  52. unsigned char Pphase;
  53. //Control Parameters
  54. void setvolume(unsigned char _Pvolume);
  55. void setdepth(unsigned char _Pdepth);
  56. void setfb(unsigned char _Pfb);
  57. void setdelay(unsigned char _Pdelay);
  58. void setphase(unsigned char _Pphase);
  59. //Internal Values
  60. float fb, depth, phase;
  61. complex<float> *oldl, *oldr;
  62. complex<float> oldclfol, oldclfor;
  63. int oldk;
  64. };
  65. #endif