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.

64 lines
1.6KB

  1. #include "rack.hpp"
  2. using namespace rack;
  3. RACK_PLUGIN_DECLARE(com_soundchasing_stochasm);
  4. #ifdef USE_VST2
  5. #define plugin "com-soundchasing-stochasm"
  6. #endif // USE_VST2
  7. ////////////////////
  8. // module widgets
  9. ////////////////////
  10. namespace rack_plugin_com_soundchasing_stochasm {
  11. struct StochasmKnob : SVGKnob {
  12. StochasmKnob() {
  13. minAngle = float(-0.75*M_PI);
  14. maxAngle = float(0.75*M_PI);
  15. }
  16. };
  17. struct StochasmMintKnob : StochasmKnob {
  18. StochasmMintKnob() {
  19. setSVG(SVG::load(assetPlugin(plugin, "res/MintKnob.svg")));
  20. }
  21. };
  22. struct StochasmTangerineKnob : StochasmKnob {
  23. StochasmTangerineKnob() {
  24. setSVG(SVG::load(assetPlugin(plugin, "res/TangerineKnob.svg")));
  25. }
  26. };
  27. struct StochasmMintLargeKnob : StochasmKnob {
  28. StochasmMintLargeKnob() {
  29. setSVG(SVG::load(assetPlugin(plugin, "res/MintKnobLarge.svg")));
  30. }
  31. };
  32. struct StochasmTangerineLargeKnob : StochasmKnob {
  33. StochasmTangerineLargeKnob() {
  34. setSVG(SVG::load(assetPlugin(plugin, "res/TangerineKnobLarge.svg")));
  35. }
  36. };
  37. struct MintMomentarySwitch : SVGSwitch, MomentarySwitch {
  38. MintMomentarySwitch() {
  39. addFrame(SVG::load(assetPlugin(plugin, "res/MintMomentary0.svg")));
  40. addFrame(SVG::load(assetPlugin(plugin, "res/MintMomentary1.svg")));
  41. }
  42. };
  43. struct TangerineMomentarySwitch : SVGSwitch, MomentarySwitch {
  44. TangerineMomentarySwitch() {
  45. addFrame(SVG::load(assetPlugin(plugin, "res/TangerineMomentary0.svg")));
  46. addFrame(SVG::load(assetPlugin(plugin, "res/TangerineMomentary1.svg")));
  47. }
  48. };
  49. } // namespace rack_plugin_com_soundchasing_stochasm