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.

SUBnoteParameters.h 3.4KB

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