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.2KB

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