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.

49 lines
652B

  1. #pragma once
  2. #include "bogaudio.hpp"
  3. #include "dsp/signal.hpp"
  4. using namespace bogaudio::dsp;
  5. extern Model* modelFollow;
  6. namespace bogaudio {
  7. struct Follow : Module {
  8. enum ParamsIds {
  9. RESPONSE_PARAM,
  10. SCALE_PARAM,
  11. NUM_PARAMS
  12. };
  13. enum InputsIds {
  14. RESPONSE_INPUT,
  15. SCALE_INPUT,
  16. IN_INPUT,
  17. NUM_INPUTS
  18. };
  19. enum OutputsIds {
  20. OUT_OUTPUT,
  21. NUM_OUTPUTS
  22. };
  23. enum LightsIds {
  24. NUM_LIGHTS
  25. };
  26. RootMeanSquare _rms;
  27. Follow()
  28. : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS)
  29. , _rms(1000.0f, 1.0f, 500.0f)
  30. {
  31. onSampleRateChange();
  32. }
  33. void onSampleRateChange() override;
  34. void step() override;
  35. };
  36. } // namespace bogaudio