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.

SegmentJuiceUI.hpp 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Segment Juice Plugin
  3. * Copyright (C) 2014 Andre Sklenar <andre.sklenar@gmail.com>, www.juicelab.cz
  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 WOBBLEJUICEUI_HPP_INCLUDED
  18. #define WOBBLEJUICEUI_HPP_INCLUDED
  19. #include "DistrhoUI.hpp"
  20. #include "ImageAboutWindow.hpp"
  21. #include "ImageButton.hpp"
  22. #include "ImageKnob.hpp"
  23. #include "ImageSlider.hpp"
  24. #include "SegmentJuiceArtwork.hpp"
  25. #include "SegmentJuicePlugin.hpp"
  26. #include <iostream>
  27. #include "Synth.hxx"
  28. using DGL::Image;
  29. using DGL::ImageAboutWindow;
  30. using DGL::ImageButton;
  31. using DGL::ImageKnob;
  32. START_NAMESPACE_DISTRHO
  33. // -----------------------------------------------------------------------
  34. class SegmentJuiceUI : public UI,
  35. public ImageButton::Callback,
  36. public ImageKnob::Callback
  37. {
  38. public:
  39. SegmentJuiceUI();
  40. void updateSynth();
  41. protected:
  42. // -------------------------------------------------------------------
  43. // Information
  44. uint d_getWidth() const noexcept override
  45. {
  46. return SegmentJuiceArtwork::backgroundWidth;
  47. }
  48. uint d_getHeight() const noexcept override
  49. {
  50. return SegmentJuiceArtwork::backgroundHeight;
  51. }
  52. // -------------------------------------------------------------------
  53. // DSP Callbacks
  54. void d_parameterChanged(uint32_t index, float value) override;
  55. void d_programChanged(uint32_t index) 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 onDisplay() override;
  63. private:
  64. Image fImgBackground;
  65. ImageAboutWindow fAboutWindow;
  66. ScopedPointer<ImageButton> fButtonAbout;
  67. ScopedPointer<ImageKnob> fKnobWave1, fKnobWave2, fKnobWave3, fKnobWave4, fKnobWave5, fKnobWave6;
  68. ScopedPointer<ImageKnob> fKnobFM1, fKnobFM2, fKnobFM3, fKnobFM4, fKnobFM5, fKnobFM6;
  69. ScopedPointer<ImageKnob> fKnobPan1, fKnobPan2, fKnobPan3, fKnobPan4, fKnobPan5, fKnobPan6;
  70. ScopedPointer<ImageKnob> fKnobAmp1, fKnobAmp2, fKnobAmp3, fKnobAmp4, fKnobAmp5, fKnobAmp6;
  71. ScopedPointer<ImageKnob> fKnobAttack, fKnobDecay, fKnobSustain, fKnobRelease;
  72. ScopedPointer<ImageKnob> fKnobStereo, fKnobTune, fKnobVolume, fKnobGlide;
  73. CSynth synthL, synthR;
  74. };
  75. // -----------------------------------------------------------------------
  76. END_NAMESPACE_DISTRHO
  77. #endif // WOBBLEJUICEUI_HPP_INCLUDED