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.

102 lines
2.9KB

  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/ImageButton.hpp"
  21. #include "dgl/ImageKnob.hpp"
  22. #include "dgl/ImageSlider.hpp"
  23. #include "DistrhoArtworkNekobi.hpp"
  24. #include "DistrhoPluginNekobi.hpp"
  25. #include "NekoWidget.hpp"
  26. START_NAMESPACE_DISTRHO
  27. // -------------------------------------------------
  28. class DistrhoUINekobi : public OpenGLUI,
  29. public ImageButton::Callback,
  30. public ImageKnob::Callback,
  31. public ImageSlider::Callback
  32. {
  33. public:
  34. DistrhoUINekobi();
  35. ~DistrhoUINekobi() override;
  36. protected:
  37. // ---------------------------------------------
  38. // Information
  39. unsigned int d_width() const override
  40. {
  41. return DistrhoArtworkNekobi::backgroundWidth;
  42. }
  43. unsigned int d_height() const override
  44. {
  45. return DistrhoArtworkNekobi::backgroundHeight;
  46. }
  47. // ---------------------------------------------
  48. // DSP Callbacks
  49. void d_parameterChanged(uint32_t index, float value) override;
  50. void d_programChanged(uint32_t index) override;
  51. void d_noteReceived(bool onOff, uint8_t channel, uint8_t note, uint8_t velocity) override;
  52. // ---------------------------------------------
  53. // UI Callbacks
  54. void d_uiIdle() override;
  55. // ---------------------------------------------
  56. // Widget Callbacks
  57. void imageButtonClicked(ImageButton* button, int) override;
  58. void imageKnobDragStarted(ImageKnob* knob) override;
  59. void imageKnobDragFinished(ImageKnob* knob) override;
  60. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  61. void imageSliderDragStarted(ImageSlider* slider) override;
  62. void imageSliderDragFinished(ImageSlider* slider) override;
  63. void imageSliderValueChanged(ImageSlider* slider, float value) override;
  64. void onDisplay() override;
  65. private:
  66. Image fImgBackground;
  67. NekoWidget fNeko;
  68. ImageKnob* fKnobTuning;
  69. ImageKnob* fKnobCutoff;
  70. ImageKnob* fKnobResonance;
  71. ImageKnob* fKnobEnvMod;
  72. ImageKnob* fKnobDecay;
  73. ImageKnob* fKnobAccent;
  74. ImageKnob* fKnobVolume;
  75. ImageSlider* fSliderWaveform;
  76. };
  77. // -------------------------------------------------
  78. END_NAMESPACE_DISTRHO
  79. #endif // __DISTRHO_UI_3BANDEQ_HPP__