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.

91 lines
2.4KB

  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. #include "ZamCompPlugin.hpp"
  23. using DGL::Image;
  24. using DGL::ImageKnob;
  25. START_NAMESPACE_DISTRHO
  26. // -----------------------------------------------------------------------
  27. class ZamCompUI : public UI,
  28. public ImageKnob::Callback
  29. {
  30. public:
  31. ZamCompUI();
  32. ~ZamCompUI() override;
  33. protected:
  34. // -------------------------------------------------------------------
  35. // Information
  36. unsigned int d_getWidth() const noexcept override
  37. {
  38. return ZamCompArtwork::zamcompWidth;
  39. }
  40. unsigned int d_getHeight() const noexcept override
  41. {
  42. return ZamCompArtwork::zamcompHeight;
  43. }
  44. // -------------------------------------------------------------------
  45. // DSP Callbacks
  46. void d_parameterChanged(uint32_t index, float value) override;
  47. void d_programChanged(uint32_t index) override;
  48. // -------------------------------------------------------------------
  49. // Widget Callbacks
  50. void imageKnobDragStarted(ImageKnob* knob) override;
  51. void imageKnobDragFinished(ImageKnob* knob) override;
  52. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  53. void onDisplay() override;
  54. private:
  55. Image fImgBackground;
  56. ImageKnob* fKnobAttack;
  57. ImageKnob* fKnobRelease;
  58. ImageKnob* fKnobThresh;
  59. ImageKnob* fKnobRatio;
  60. ImageKnob* fKnobKnee;
  61. ImageKnob* fKnobMakeup;
  62. Image fLedRedImg;
  63. float fLedRedValue;
  64. Image fLedYellowImg;
  65. float fLedYellowValue;
  66. };
  67. // -----------------------------------------------------------------------
  68. END_NAMESPACE_DISTRHO
  69. #endif // ZAMCOMPUI_HPP_INCLUDED