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.

27 lines
431B

  1. #pragma once
  2. #include <stdint.h>
  3. #include "CV.hpp"
  4. #define CLOCK_LIMIT 1024
  5. #define CLK_ERROR_TOO_MANY 1
  6. namespace SynthDevKit {
  7. class Clock {
  8. public:
  9. Clock (uint16_t, float);
  10. bool *update (float);
  11. void reset ( );
  12. private:
  13. CV *cv;
  14. uint16_t triggerCount;
  15. bool ready;
  16. uint64_t current;
  17. uint16_t step;
  18. float triggerThreshold;
  19. bool states[CLOCK_LIMIT];
  20. };
  21. }