DelayEffect.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * delayeffect.h - declaration of DelayEffect class, the Delay plugin
  3. *
  4. * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/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 DELAYEFFECT_H
  25. #define DELAYEFFECT_H
  26. #include "Effect.h"
  27. #include "DelayControls.h"
  28. #include "Lfo.h"
  29. #include "StereoDelay.h"
  30. #include "ValueBuffer.h"
  31. class DelayEffect : public Effect
  32. {
  33. public:
  34. DelayEffect(Model* parent , const Descriptor::SubPluginFeatures::Key* key );
  35. virtual ~DelayEffect();
  36. virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames );
  37. virtual EffectControls* controls()
  38. {
  39. return &m_delayControls;
  40. }
  41. void changeSampleRate();
  42. private:
  43. DelayControls m_delayControls;
  44. StereoDelay* m_delay;
  45. Lfo* m_lfo;
  46. float m_outGain;
  47. float m_currentLength;
  48. };
  49. #endif // DELAYEFFECT_H