MultitapEchoControls.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * MultitapEchoControls.h - a multitap echo delay plugin
  3. *
  4. * Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
  5. * Copyright (c) 2008-2014 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 MULTITAP_ECHO_CONTROLS_H
  26. #define MULTITAP_ECHO_CONTROLS_H
  27. #include "EffectControls.h"
  28. #include "MultitapEchoControlDialog.h"
  29. #include "Knob.h"
  30. #include "Graph.h"
  31. class MultitapEchoEffect;
  32. class MultitapEchoControls : public EffectControls
  33. {
  34. Q_OBJECT
  35. public:
  36. MultitapEchoControls( MultitapEchoEffect * eff );
  37. virtual ~MultitapEchoControls();
  38. virtual void saveSettings( QDomDocument & doc, QDomElement & parent );
  39. virtual void loadSettings( const QDomElement & elem );
  40. inline virtual QString nodeName() const
  41. {
  42. return( "multitapechocontrols" );
  43. }
  44. void setDefaultAmpShape();
  45. void setDefaultLpShape();
  46. virtual int controlCount()
  47. {
  48. return( 5 );
  49. }
  50. virtual EffectControlDialog * createView()
  51. {
  52. return( new MultitapEchoControlDialog( this ) );
  53. }
  54. private slots:
  55. void ampSamplesChanged( int, int );
  56. void ampResetClicked();
  57. void lpSamplesChanged( int, int );
  58. void lpResetClicked();
  59. void lengthChanged();
  60. void sampleRateChanged();
  61. private:
  62. MultitapEchoEffect * m_effect;
  63. IntModel m_steps;
  64. TempoSyncKnobModel m_stepLength;
  65. FloatModel m_dryGain;
  66. BoolModel m_swapInputs;
  67. FloatModel m_stages;
  68. graphModel m_ampGraph;
  69. graphModel m_lpGraph;
  70. friend class MultitapEchoEffect;
  71. friend class MultitapEchoControlDialog;
  72. };
  73. #endif