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.

97 lines
2.8KB

  1. /*
  2. * ZaMultiComp mono multiband 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 ZAMULTICOMPUI_HPP_INCLUDED
  18. #define ZAMULTICOMPUI_HPP_INCLUDED
  19. #include "DistrhoUI.hpp"
  20. #include "ImageKnob.hpp"
  21. #include "ImageToggle.hpp"
  22. #include "ZaMultiCompArtwork.hpp"
  23. using DGL::Image;
  24. using DGL::ImageKnob;
  25. using DGL::ImageToggle;
  26. START_NAMESPACE_DISTRHO
  27. // -----------------------------------------------------------------------
  28. class ZaMultiCompUI : public UI,
  29. public ImageKnob::Callback,
  30. public ImageToggle::Callback
  31. {
  32. public:
  33. ZaMultiCompUI();
  34. protected:
  35. // -------------------------------------------------------------------
  36. // Information
  37. uint d_getWidth() const noexcept override
  38. {
  39. return ZaMultiCompArtwork::zamulticompWidth;
  40. }
  41. uint d_getHeight() const noexcept override
  42. {
  43. return ZaMultiCompArtwork::zamulticompHeight;
  44. }
  45. // -------------------------------------------------------------------
  46. // DSP Callbacks
  47. void d_parameterChanged(uint32_t index, float value) override;
  48. void d_programChanged(uint32_t index) override;
  49. // -------------------------------------------------------------------
  50. // Widget Callbacks
  51. void imageKnobDragStarted(ImageKnob* knob) override;
  52. void imageKnobDragFinished(ImageKnob* knob) override;
  53. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  54. void imageToggleClicked(ImageToggle* slider, int button) override;
  55. void onDisplay() override;
  56. private:
  57. Image fImgBackground;
  58. ScopedPointer<ImageKnob> fKnobAttack, fKnobRelease, fKnobThresh;
  59. ScopedPointer<ImageKnob> fKnobRatio, fKnobKnee, fKnobGlobalGain;
  60. ScopedPointer<ImageKnob> fKnobMakeup1, fKnobMakeup2, fKnobMakeup3;
  61. ScopedPointer<ImageKnob> fKnobXover1, fKnobXover2;
  62. ScopedPointer<ImageToggle> fToggleBypass1, fToggleBypass2, fToggleBypass3;
  63. ScopedPointer<ImageToggle> fToggleListen1, fToggleListen2, fToggleListen3;
  64. Image fLedRedImg;
  65. float fLedRedValue1;
  66. float fLedRedValue2;
  67. float fLedRedValue3;
  68. Image fLedYellowImg;
  69. float fLedYellowValue;
  70. };
  71. // -----------------------------------------------------------------------
  72. END_NAMESPACE_DISTRHO
  73. #endif // ZAMULTICOMPUI_HPP_INCLUDED