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.

85 lines
2.6KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. LFOParams.h - Parameters for LFO
  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 LFO_PARAMS_H
  18. #define LFO_PARAMS_H
  19. #include <rtosc/ports.h>
  20. #include "Presets.h"
  21. class XMLwrapper;
  22. #define LFO_SINE 0
  23. #define LFO_TRIANGLE 1
  24. #define LFO_SQUARE 2
  25. #define LFO_RAMPUP 3
  26. #define LFO_RAMPDOWN 4
  27. #define LFO_EXP_DOWN1 5
  28. #define LFO_EXP_DOWN2 6
  29. class LFOParams:public Presets
  30. {
  31. public:
  32. LFOParams();
  33. LFOParams(char Pfreq_,
  34. char Pintensity_,
  35. char Pstartphase_,
  36. char PLFOtype_,
  37. char Prandomness_,
  38. char Pdelay_,
  39. char Pcontinous,
  40. char fel_);
  41. ~LFOParams();
  42. void add2XML(XMLwrapper *xml);
  43. void defaults();
  44. /**Loads the LFO from the xml*/
  45. void getfromXML(XMLwrapper *xml);
  46. void paste(LFOParams &);
  47. /* MIDI Parameters*/
  48. float Pfreq; /**<frequency*/
  49. unsigned char Pintensity; /**<intensity*/
  50. unsigned char Pstartphase; /**<start phase (0=random)*/
  51. unsigned char PLFOtype; /**<LFO type (sin,triangle,square,ramp,...)*/
  52. unsigned char Prandomness; /**<randomness (0=off)*/
  53. unsigned char Pfreqrand; /**<frequency randomness (0=off)*/
  54. unsigned char Pdelay; /**<delay (0=off)*/
  55. unsigned char Pcontinous; /**<1 if LFO is continous*/
  56. unsigned char Pstretch; /**<how the LFO is "stretched" according the note frequency (64=no stretch)*/
  57. int fel; //what kind is the LFO (0 - frequency, 1 - amplitude, 2 - filter)
  58. static const rtosc::Ports &ports;
  59. private:
  60. /* Default parameters */
  61. unsigned char Dfreq;
  62. unsigned char Dintensity;
  63. unsigned char Dstartphase;
  64. unsigned char DLFOtype;
  65. unsigned char Drandomness;
  66. unsigned char Ddelay;
  67. unsigned char Dcontinous;
  68. };
  69. #endif