CompressorControls.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * CompressorControls.h
  3. *
  4. * Copyright (c) 2020 Lost Robot <r94231@gmail.com>
  5. *
  6. * This file is part of LMMS - https://lmms.io
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2 of the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public
  19. * License along with this program (see COPYING); if not, write to the
  20. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21. * Boston, MA 02110-1301 USA.
  22. *
  23. */
  24. #ifndef COMPRESSOR_CONTROLS_H
  25. #define COMPRESSOR_CONTROLS_H
  26. #include "CompressorControlDialog.h"
  27. #include "EffectControls.h"
  28. #include "Knob.h"
  29. class CompressorEffect;
  30. class CompressorControls : public EffectControls
  31. {
  32. Q_OBJECT
  33. public:
  34. CompressorControls(CompressorEffect* effect);
  35. void saveSettings(QDomDocument & _doc, QDomElement & _parent) override;
  36. void loadSettings(const QDomElement & _this) override;
  37. inline QString nodeName() const override
  38. {
  39. return "CompressorControls";
  40. }
  41. int controlCount() override
  42. {
  43. return 28;
  44. }
  45. EffectControlDialog* createView() override
  46. {
  47. return new CompressorControlDialog(this);
  48. }
  49. private:
  50. CompressorEffect * m_effect;
  51. FloatModel m_thresholdModel;
  52. FloatModel m_ratioModel;
  53. FloatModel m_attackModel;
  54. FloatModel m_releaseModel;
  55. FloatModel m_kneeModel;
  56. FloatModel m_holdModel;
  57. FloatModel m_rangeModel;
  58. FloatModel m_rmsModel;
  59. IntModel m_midsideModel;
  60. IntModel m_peakmodeModel;
  61. FloatModel m_lookaheadLengthModel;
  62. FloatModel m_inBalanceModel;
  63. FloatModel m_outBalanceModel;
  64. IntModel m_limiterModel;
  65. FloatModel m_outGainModel;
  66. FloatModel m_inGainModel;
  67. FloatModel m_blendModel;
  68. FloatModel m_stereoBalanceModel;
  69. BoolModel m_autoMakeupModel;
  70. BoolModel m_auditionModel;
  71. BoolModel m_feedbackModel;
  72. FloatModel m_autoAttackModel;
  73. FloatModel m_autoReleaseModel;
  74. BoolModel m_lookaheadModel;
  75. FloatModel m_tiltModel;
  76. FloatModel m_tiltFreqModel;
  77. IntModel m_stereoLinkModel;
  78. FloatModel m_mixModel;
  79. float m_inPeakL;
  80. float m_inPeakR;
  81. float m_outPeakL;
  82. float m_outPeakR;
  83. friend class CompressorControlDialog;
  84. friend class CompressorEffect;
  85. } ;
  86. #endif