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.

94 lines
2.8KB

  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. class Effect;
  21. class FilterParams;
  22. class XMLwrapper;
  23. class Allocator;
  24. #include "../Params/FilterParams.h"
  25. #include "../Params/Presets.h"
  26. /** Effect manager, an interface between the program and effects */
  27. class EffectMgr:public Presets
  28. {
  29. public:
  30. EffectMgr(Allocator &alloc, const SYNTH_T &synth, const bool insertion_,
  31. const AbsTime *time_ = nullptr);
  32. ~EffectMgr();
  33. void paste(EffectMgr &e);
  34. void add2XML(XMLwrapper& xml);
  35. void defaults(void) REALTIME;
  36. void getfromXML(XMLwrapper& xml);
  37. void out(float *smpsl, float *smpsr) REALTIME;
  38. void setdryonly(bool value);
  39. /**get the output(to speakers) volume of the systemeffect*/
  40. float sysefxgetvolume(void);
  41. void init(void) REALTIME;
  42. void kill(void) REALTIME;
  43. void cleanup(void) REALTIME;
  44. void changeeffectrt(int nefx_, bool avoidSmash=false) REALTIME;
  45. void changeeffect(int nefx_) NONREALTIME;
  46. int geteffect(void);
  47. void changepreset(unsigned char npreset) NONREALTIME;
  48. void changepresetrt(unsigned char npreset, bool avoidSmash=false) REALTIME;
  49. unsigned char getpreset(void);
  50. void seteffectpar(int npar, unsigned char value) NONREALTIME;
  51. void seteffectparrt(int npar, unsigned char value) REALTIME;
  52. unsigned char geteffectpar(int npar);
  53. unsigned char geteffectparrt(int npar) REALTIME;
  54. const bool insertion;
  55. float *efxoutl, *efxoutr;
  56. // used by UI
  57. float getEQfreqresponse(float freq);
  58. FilterParams *filterpars;
  59. static const rtosc::Ports &ports;
  60. int nefx;
  61. Effect *efx;
  62. const AbsTime *time;
  63. private:
  64. //Parameters Prior to initialization
  65. char preset;
  66. char settings[128];
  67. bool dryonly;
  68. Allocator &memory;
  69. const SYNTH_T &synth;
  70. };
  71. #endif