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.

85 lines
2.3KB

  1. /*
  2. * ZamComp mono compressor
  3. * Copyright (C) 2014 Damien Zammit <damien@zamaudio.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #ifndef ZAMCOMPUI_HPP_INCLUDED
  18. #define ZAMCOMPUI_HPP_INCLUDED
  19. #include "DistrhoUI.hpp"
  20. #include "ImageKnob.hpp"
  21. #include "ZamCompArtwork.hpp"
  22. using DGL::Image;
  23. using DGL::ImageKnob;
  24. START_NAMESPACE_DISTRHO
  25. // -----------------------------------------------------------------------
  26. class ZamCompUI : public UI,
  27. public ImageKnob::Callback
  28. {
  29. public:
  30. ZamCompUI();
  31. protected:
  32. // -------------------------------------------------------------------
  33. // Information
  34. uint d_getWidth() const noexcept override
  35. {
  36. return ZamCompArtwork::zamcompWidth;
  37. }
  38. uint d_getHeight() const noexcept override
  39. {
  40. return ZamCompArtwork::zamcompHeight;
  41. }
  42. // -------------------------------------------------------------------
  43. // DSP Callbacks
  44. void d_parameterChanged(uint32_t index, float value) override;
  45. void d_programChanged(uint32_t index) override;
  46. // -------------------------------------------------------------------
  47. // Widget Callbacks
  48. void imageKnobDragStarted(ImageKnob* knob) override;
  49. void imageKnobDragFinished(ImageKnob* knob) override;
  50. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  51. void onDisplay() override;
  52. private:
  53. Image fImgBackground;
  54. ScopedPointer<ImageKnob> fKnobAttack, fKnobRelease, fKnobThresh;
  55. ScopedPointer<ImageKnob> fKnobRatio, fKnobKnee, fKnobMakeup;
  56. Image fLedRedImg;
  57. float fLedRedValue;
  58. Image fLedYellowImg;
  59. float fLedYellowValue;
  60. };
  61. // -----------------------------------------------------------------------
  62. END_NAMESPACE_DISTRHO
  63. #endif // ZAMCOMPUI_HPP_INCLUDED