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.

113 lines
1.8KB

  1. #include "rack.hpp"
  2. using namespace rack;
  3. #ifdef USE_VST2
  4. #define plugin "Bogaudio"
  5. #else
  6. extern Plugin *plugin;
  7. #endif // USE_VST2
  8. namespace bogaudio {
  9. struct Button18 : SVGSwitch, MomentarySwitch {
  10. Button18();
  11. };
  12. struct BGKnob : RoundKnob {
  13. BGKnob(const char* svg, int dim);
  14. };
  15. struct Knob16 : BGKnob {
  16. Knob16();
  17. };
  18. struct Knob19 : BGKnob {
  19. Knob19();
  20. };
  21. struct Knob26 : BGKnob {
  22. Knob26();
  23. };
  24. struct Knob29 : BGKnob {
  25. Knob29();
  26. };
  27. struct Knob38 : BGKnob {
  28. Knob38();
  29. };
  30. struct Knob45 : BGKnob {
  31. Knob45();
  32. };
  33. struct Knob68 : BGKnob {
  34. Knob68();
  35. };
  36. struct Port24 : SVGPort {
  37. Port24();
  38. };
  39. struct BlankPort24 : Port24 {
  40. BlankPort24();
  41. };
  42. struct SliderSwitch : SVGSwitch, ToggleSwitch {
  43. CircularShadow* shadow = NULL;
  44. SliderSwitch();
  45. };
  46. struct SliderSwitch2State14 : SliderSwitch {
  47. SliderSwitch2State14();
  48. };
  49. struct StatefulButton : ParamWidget, FramebufferWidget {
  50. std::vector<std::shared_ptr<SVG>> _frames;
  51. SVGWidget* _svgWidget; // deleted elsewhere.
  52. CircularShadow* shadow = NULL;
  53. StatefulButton(const char* offSVGPath, const char* onSVGPath);
  54. void step() override;
  55. void onDragStart(EventDragStart& e) override;
  56. void onDragEnd(EventDragEnd& e) override;
  57. };
  58. struct StatefulButton9 : StatefulButton {
  59. StatefulButton9();
  60. };
  61. struct StatefulButton18 : StatefulButton {
  62. StatefulButton18();
  63. };
  64. struct ToggleButton : SVGSwitch, ToggleSwitch {
  65. };
  66. struct ToggleButton18 : ToggleButton {
  67. ToggleButton18();
  68. };
  69. NVGcolor decibelsToColor(float db);
  70. struct VUSlider : Knob {
  71. const float slideHeight = 13.0f;
  72. float* _vuLevel = NULL;
  73. VUSlider(float height = 183.0f) {
  74. box.size = Vec(18.0f, height);
  75. }
  76. void setVULevel(float* vuLevel) {
  77. _vuLevel = vuLevel;
  78. }
  79. void draw(NVGcontext* vg) override;
  80. };
  81. struct VUSlider151 : VUSlider {
  82. VUSlider151() : VUSlider(151.0f) {}
  83. };
  84. } // namespace bogaudio