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.

30 lines
491B

  1. #pragma once
  2. #include "common.hpp"
  3. #include <jansson.h>
  4. namespace rack {
  5. struct Param {
  6. float value = 0.f;
  7. float minValue = 0.f;
  8. float maxValue = 1.f;
  9. float defaultValue = 0.f;
  10. void config(float minValue, float maxValue, float defaultValue) {
  11. this->value = defaultValue;
  12. this->minValue = minValue;
  13. this->maxValue = maxValue;
  14. this->defaultValue = defaultValue;
  15. }
  16. json_t *toJson();
  17. void fromJson(json_t *rootJ);
  18. void reset();
  19. void randomize();
  20. };
  21. } // namespace rack