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.

52 lines
812B

  1. #include "common.hpp"
  2. ////////////////////
  3. // module widgets
  4. ////////////////////
  5. using namespace rack;
  6. #define plugin "TheXOR"
  7. #define NUM_ATTENUATORS (6)
  8. namespace rack_plugin_TheXOR {
  9. struct Attenuator;
  10. struct AttenuatorWidget : ModuleWidget
  11. {
  12. AttenuatorWidget(Attenuator * module);
  13. private:
  14. float yncscape(float y, float height)
  15. {
  16. return RACK_GRID_HEIGHT - mm2px(y + height);
  17. }
  18. };
  19. struct Attenuator : Module
  20. {
  21. enum ParamIds
  22. {
  23. ATT_1,
  24. NUM_PARAMS = ATT_1 + NUM_ATTENUATORS
  25. };
  26. enum InputIds
  27. {
  28. IN_1,
  29. NUM_INPUTS = IN_1 + NUM_ATTENUATORS
  30. };
  31. enum OutputIds
  32. {
  33. OUT_1,
  34. NUM_OUTPUTS = OUT_1 + NUM_ATTENUATORS
  35. };
  36. enum LightIds
  37. {
  38. NUM_LIGHTS
  39. };
  40. Attenuator() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS)
  41. {
  42. }
  43. void step() override;
  44. };
  45. } // namespace rack_plugin_TheXOR