settings.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #pragma once
  2. //========================================================================================================================
  3. //========================================================================================================================
  4. // Settings
  5. //========================================================================================================================
  6. //========================================================================================================================
  7. enum Type {
  8. TypeDisabled,
  9. TypePiezo,
  10. };
  11. enum Curve {
  12. Normal,
  13. Exp,
  14. Log,
  15. Sigma,
  16. Flat,
  17. eXTRA,
  18. };
  19. struct ChannelSettings {
  20. Type type;
  21. uint8_t note;
  22. uint8_t thresold;
  23. qint64 scanTime;
  24. qint64 maskTime;
  25. Curve curveType;
  26. int curveValue;
  27. ChannelSettings()
  28. : type(TypeDisabled)
  29. , note(35)
  30. , thresold(70)
  31. , scanTime(2)
  32. , maskTime(5)
  33. , curveType(Normal)
  34. , curveValue(127)
  35. {}
  36. };
  37. struct Settings {
  38. uint8_t midiChannel;
  39. byte prescaler;
  40. byte throttle;
  41. ChannelSettings channelSettings[PORT_CNT* CHAN_CNT];
  42. Settings()
  43. : prescaler(2)
  44. , throttle(1)
  45. , midiChannel(1)
  46. {
  47. }
  48. };