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.

132 lines
3.4KB

  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. ~SegmentJuiceUI() override;
  41. void updateSynth();
  42. protected:
  43. // -------------------------------------------------------------------
  44. // Information
  45. unsigned int d_getWidth() const noexcept override
  46. {
  47. return SegmentJuiceArtwork::backgroundWidth;
  48. }
  49. unsigned int d_getHeight() const noexcept override
  50. {
  51. return SegmentJuiceArtwork::backgroundHeight;
  52. }
  53. // -------------------------------------------------------------------
  54. // DSP Callbacks
  55. void d_parameterChanged(uint32_t index, float value) override;
  56. void d_programChanged(uint32_t index) override;
  57. // -------------------------------------------------------------------
  58. // Widget Callbacks
  59. void imageButtonClicked(ImageButton* button, int) override;
  60. void imageKnobDragStarted(ImageKnob* knob) override;
  61. void imageKnobDragFinished(ImageKnob* knob) override;
  62. void imageKnobValueChanged(ImageKnob* knob, float value) override;
  63. void onDisplay() override;
  64. private:
  65. Image fImgBackground;
  66. ImageAboutWindow fAboutWindow;
  67. ImageKnob* fKnobWave1;
  68. ImageKnob* fKnobWave2;
  69. ImageKnob* fKnobWave3;
  70. ImageKnob* fKnobWave4;
  71. ImageKnob* fKnobWave5;
  72. ImageKnob* fKnobWave6;
  73. ImageKnob* fKnobFM1;
  74. ImageKnob* fKnobFM2;
  75. ImageKnob* fKnobFM3;
  76. ImageKnob* fKnobFM4;
  77. ImageKnob* fKnobFM5;
  78. ImageKnob* fKnobFM6;
  79. ImageKnob* fKnobPan1;
  80. ImageKnob* fKnobPan2;
  81. ImageKnob* fKnobPan3;
  82. ImageKnob* fKnobPan4;
  83. ImageKnob* fKnobPan5;
  84. ImageKnob* fKnobPan6;
  85. ImageKnob* fKnobAmp1;
  86. ImageKnob* fKnobAmp2;
  87. ImageKnob* fKnobAmp3;
  88. ImageKnob* fKnobAmp4;
  89. ImageKnob* fKnobAmp5;
  90. ImageKnob* fKnobAmp6;
  91. ImageKnob* fKnobAttack;
  92. ImageKnob* fKnobDecay;
  93. ImageKnob* fKnobSustain;
  94. ImageKnob* fKnobRelease;
  95. ImageKnob* fKnobStereo;
  96. ImageKnob* fKnobTune;
  97. ImageKnob* fKnobVolume;
  98. ImageKnob* fKnobGlide;
  99. ImageButton* fButtonAbout;
  100. CSynth synthL, synthR;
  101. };
  102. // -----------------------------------------------------------------------
  103. END_NAMESPACE_DISTRHO
  104. #endif // WOBBLEJUICEUI_HPP_INCLUDED