dynamics_processor_controls.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * dynamics_processor_controls.h - controls for dynamics_processor-effect
  3. *
  4. * Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
  5. * Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
  6. *
  7. * This file is part of LMMS - https://lmms.io
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2 of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public
  20. * License along with this program (see COPYING); if not, write to the
  21. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  22. * Boston, MA 02110-1301 USA.
  23. *
  24. */
  25. #ifndef DYNPROC_CONTROLS_H
  26. #define DYNPROC_CONTROLS_H
  27. #include "EffectControls.h"
  28. #include "dynamics_processor_control_dialog.h"
  29. #include "Knob.h"
  30. #include "Graph.h"
  31. class dynProcEffect;
  32. class dynProcControls : public EffectControls
  33. {
  34. Q_OBJECT
  35. public:
  36. enum StereoModes
  37. {
  38. SM_Maximum,
  39. SM_Average,
  40. SM_Unlinked,
  41. NumStereoModes
  42. };
  43. dynProcControls( dynProcEffect * _eff );
  44. virtual ~dynProcControls()
  45. {
  46. }
  47. virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
  48. virtual void loadSettings( const QDomElement & _this );
  49. inline virtual QString nodeName() const
  50. {
  51. return( "dynamicsprocessor_controls" );
  52. }
  53. virtual void setDefaultShape();
  54. virtual int controlCount()
  55. {
  56. return( 6 );
  57. }
  58. virtual EffectControlDialog * createView()
  59. {
  60. return( new dynProcControlDialog( this ) );
  61. }
  62. private slots:
  63. void samplesChanged( int, int );
  64. void sampleRateChanged();
  65. void resetClicked();
  66. void smoothClicked();
  67. void addOneClicked();
  68. void subOneClicked();
  69. private:
  70. dynProcEffect * m_effect;
  71. FloatModel m_inputModel;
  72. FloatModel m_outputModel;
  73. FloatModel m_attackModel;
  74. FloatModel m_releaseModel;
  75. graphModel m_wavegraphModel;
  76. IntModel m_stereomodeModel;
  77. friend class dynProcControlDialog;
  78. friend class dynProcEffect;
  79. } ;
  80. #endif