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.

113 lines
3.4KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. SUBnoteParameters.h - Parameters for SUBnote (SUBsynth)
  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 SUB_NOTE_PARAMETERS_H
  18. #define SUB_NOTE_PARAMETERS_H
  19. #include "../globals.h"
  20. #include "../Misc/XMLwrapper.h"
  21. #include "EnvelopeParams.h"
  22. #include "FilterParams.h"
  23. #include "Presets.h"
  24. class SUBnoteParameters:public Presets
  25. {
  26. public:
  27. SUBnoteParameters();
  28. ~SUBnoteParameters();
  29. void add2XML(XMLwrapper *xml);
  30. void defaults();
  31. void getfromXML(XMLwrapper *xml);
  32. void updateFrequencyMultipliers(void);
  33. //Parameters
  34. //AMPLITUDE PARAMETRERS
  35. unsigned char Pstereo; //0 for mono,1 for stereo
  36. unsigned char PVolume;
  37. unsigned char PPanning;
  38. unsigned char PAmpVelocityScaleFunction;
  39. EnvelopeParams *AmpEnvelope;
  40. //Frequency Parameters
  41. unsigned short int PDetune;
  42. unsigned short int PCoarseDetune;
  43. unsigned char PDetuneType;
  44. unsigned char PFreqEnvelopeEnabled;
  45. EnvelopeParams *FreqEnvelope;
  46. unsigned char PBandWidthEnvelopeEnabled;
  47. EnvelopeParams *BandWidthEnvelope;
  48. //Filter Parameters (Global)
  49. unsigned char PGlobalFilterEnabled;
  50. FilterParams *GlobalFilter;
  51. unsigned char PGlobalFilterVelocityScale;
  52. unsigned char PGlobalFilterVelocityScaleFunction;
  53. EnvelopeParams *GlobalFilterEnvelope;
  54. //Other Parameters
  55. //If the base frequency is fixed to 440 Hz
  56. unsigned char Pfixedfreq;
  57. /* Equal temperate (this is used only if the Pfixedfreq is enabled)
  58. If this parameter is 0, the frequency is fixed (to 440 Hz);
  59. if this parameter is 64, 1 MIDI halftone -> 1 frequency halftone */
  60. unsigned char PfixedfreqET;
  61. // Overtone spread parameters
  62. struct {
  63. unsigned char type;
  64. unsigned char par1;
  65. unsigned char par2;
  66. unsigned char par3;
  67. } POvertoneSpread;
  68. float POvertoneFreqMult[MAX_SUB_HARMONICS];
  69. //how many times the filters are applied
  70. unsigned char Pnumstages;
  71. //bandwidth
  72. unsigned char Pbandwidth;
  73. //How the magnitudes are computed (0=linear,1=-60dB,2=-60dB)
  74. unsigned char Phmagtype;
  75. //Magnitudes
  76. unsigned char Phmag[MAX_SUB_HARMONICS];
  77. //Relative BandWidth ("64"=1.0f)
  78. unsigned char Phrelbw[MAX_SUB_HARMONICS];
  79. //how much the bandwidth is increased according to lower/higher frequency; 64-default
  80. unsigned char Pbwscale;
  81. //how the harmonics start("0"=0,"1"=random,"2"=1)
  82. unsigned char Pstart;
  83. private:
  84. };
  85. #endif