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.

36 lines
862B

  1. #pragma once
  2. #include "ui/Quantity.hpp"
  3. #include "engine/Module.hpp"
  4. #include "engine/Param.hpp"
  5. namespace rack {
  6. /** A Quantity that wraps an engine Param */
  7. struct ParamQuantity : Quantity {
  8. Module *module = NULL;
  9. int paramId = 0;
  10. Param *getParam();
  11. /** Request to the engine to smoothly set the value */
  12. void setSmoothValue(float smoothValue);
  13. float getSmoothValue();
  14. void setValue(float value) override;
  15. float getValue() override;
  16. float getMinValue() override;
  17. float getMaxValue() override;
  18. float getDefaultValue() override;
  19. float getDisplayValue() override;
  20. void setDisplayValue(float displayValue) override;
  21. std::string getDisplayValueString() override;
  22. void setDisplayValueString(std::string s) override;
  23. int getDisplayPrecision() override;
  24. std::string getLabel() override;
  25. std::string getUnit() override;
  26. };
  27. } // namespace rack