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.

106 lines
3.0KB

  1. /*
  2. * DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others.
  3. * Copyright (C) 2013 Filipe Coelho <falktx@falktx.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 GPL.txt file
  16. */
  17. #ifndef __DISTRHO_UI_3BANDEQ_HPP__
  18. #define __DISTRHO_UI_3BANDEQ_HPP__
  19. #include "DistrhoUIOpenGL.hpp"
  20. #include "dgl/ImageAboutWindow.hpp"
  21. #include "dgl/ImageButton.hpp"
  22. #include "dgl/ImageKnob.hpp"
  23. #include "dgl/ImageSlider.hpp"
  24. #include "DistrhoArtworkNekobi.hpp"
  25. #include "DistrhoPluginNekobi.hpp"
  26. #include "NekoWidget.hpp"
  27. START_NAMESPACE_DISTRHO
  28. // -------------------------------------------------
  29. class DistrhoUINekobi : public OpenGLUI,
  30. public ImageButton::Callback,
  31. public ImageKnob::Callback,
  32. public ImageSlider::Callback
  33. {
  34. public:
  35. DistrhoUINekobi();
  36. ~DistrhoUINekobi() override;
  37. protected:
  38. // ---------------------------------------------
  39. // Information
  40. unsigned int d_width() const override
  41. {
  42. return DistrhoArtworkNekobi::backgroundWidth;
  43. }
  44. unsigned int d_height() const override
  45. {
  46. return DistrhoArtworkNekobi::backgroundHeight;
  47. }
  48. // ---------------------------------------------
  49. // DSP Callbacks
  50. void d_parameterChanged(uint32_t index, float value) override;
  51. void d_programChanged(uint32_t index) override;
  52. void d_noteReceived(bool onOff, uint8_t channel, uint8_t note, uint8_t velocity) override;
  53. // ---------------------------------------------
  54. // UI Callbacks
  55. void d_uiIdle() override;
  56. // ---------------------------------------------
  57. // Widget Callbacks
  58. void imageButtonClicked(ImageButton* button, int) override;
  59. void imageKnobDragStarted(ImageKnob* knob) override;
  60. void imageKnobDragFinished(ImageKnob* knob) override;
  61. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  62. void imageSliderDragStarted(ImageSlider* slider) override;
  63. void imageSliderDragFinished(ImageSlider* slider) override;
  64. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  65. void onDisplay() override;
  66. private:
  67. Image fImgBackground;
  68. NekoWidget fNeko;
  69. ImageKnob* fKnobTuning;
  70. ImageKnob* fKnobCutoff;
  71. ImageKnob* fKnobResonance;
  72. ImageKnob* fKnobEnvMod;
  73. ImageKnob* fKnobDecay;
  74. ImageKnob* fKnobAccent;
  75. ImageKnob* fKnobVolume;
  76. ImageButton* fButtonAbout;
  77. ImageSlider* fSliderWaveform;
  78. ImageAboutWindow fAboutWindow;
  79. };
  80. // -------------------------------------------------
  81. END_NAMESPACE_DISTRHO
  82. #endif // __DISTRHO_UI_3BANDEQ_HPP__