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.

53 lines
773B

  1. #pragma once
  2. #include "bogaudio.hpp"
  3. #include "dsp/pitch.hpp"
  4. using namespace bogaudio::dsp;
  5. extern Model* modelStack;
  6. namespace bogaudio {
  7. struct Stack : Module {
  8. enum ParamsIds {
  9. SEMIS_PARAM,
  10. OCTAVE_PARAM,
  11. FINE_PARAM,
  12. QUANTIZE_PARAM,
  13. NUM_PARAMS
  14. };
  15. enum InputsIds {
  16. CV_INPUT,
  17. IN_INPUT,
  18. NUM_INPUTS
  19. };
  20. enum OutputsIds {
  21. THRU_OUTPUT,
  22. OUT_OUTPUT,
  23. NUM_OUTPUTS
  24. };
  25. enum LightsIds {
  26. QUANTIZE_LIGHT,
  27. NUM_LIGHTS
  28. };
  29. const float _minCVOut = semitoneToCV(24.0); // C1
  30. const float _maxCVOut = semitoneToCV(120.0); // C9
  31. float _semitones = -1000.0f;
  32. float _inCV = -1000.0f;
  33. float _fine = -1000.0f;
  34. float _outCV;
  35. Stack() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {
  36. }
  37. void step() override;
  38. };
  39. } // namespace bogaudio