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.

EffectMgr.h 2.4KB

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