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.

87 lines
2.4KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. EffectMgr.h - Effect manager, an interface betwen the program and effects
  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 EFFECTMGR_H
  18. #define EFFECTMGR_H
  19. #include <pthread.h>
  20. #include "Alienwah.h"
  21. #include "Phaser.h"
  22. #include "../Params/Presets.h"
  23. class Effect;
  24. class FilterParams;
  25. class XMLwrapper;
  26. #include "Distorsion.h"
  27. #include "EQ.h"
  28. #include "DynamicFilter.h"
  29. #include "../Misc/XMLwrapper.h"
  30. #include "../Params/FilterParams.h"
  31. #include "../Params/Presets.h"
  32. /**Effect manager, an interface betwen the program and effects*/
  33. class EffectMgr:public Presets
  34. {
  35. public:
  36. EffectMgr(const bool insertion_, pthread_mutex_t *mutex_);
  37. ~EffectMgr();
  38. void add2XML(XMLwrapper *xml);
  39. void defaults(void);
  40. void getfromXML(XMLwrapper *xml);
  41. void out(float *smpsl, float *smpsr);
  42. void setdryonly(bool value);
  43. /**get the output(to speakers) volume of the systemeffect*/
  44. float sysefxgetvolume(void);
  45. void cleanup(void);
  46. void changeeffect(int nefx_);
  47. int geteffect(void);
  48. void changepreset(unsigned char npreset);
  49. void changepreset_nolock(unsigned char npreset);
  50. unsigned char getpreset(void);
  51. void seteffectpar(int npar, unsigned char value);
  52. void seteffectpar_nolock(int npar, unsigned char value);
  53. unsigned char geteffectpar(int npar);
  54. const bool insertion;
  55. float *efxoutl, *efxoutr;
  56. // used by UI
  57. float getEQfreqresponse(float freq);
  58. FilterParams *filterpars;
  59. private:
  60. int nefx;
  61. Effect *efx;
  62. pthread_mutex_t *mutex;
  63. bool dryonly;
  64. };
  65. #endif