31class MicVelocityCalibration final :
public UI {
33 MicVelocityCalibration() { oledShowsUIUnderneath =
false; }
35 bool opened()
override;
36 void focusRegained()
override;
37 ActionResult padAction(int32_t x, int32_t y, int32_t velocity)
override;
38 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
39 void modEncoderAction(int32_t whichModEncoder, int32_t offset)
override {}
40 void modButtonAction(uint8_t whichButton,
bool on)
override {}
42 bool renderMainPads(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth],
43 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth],
bool drawUndefinedArea)
override;
44 bool renderSidebar(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth],
45 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth])
override;
47 UIType
getUIType()
override {
return UIType::MIC_VELOCITY; }
50 [[nodiscard]]
bool measuresPad(int32_t x, int32_t y)
const {
return x < kDisplayWidth; }
53 static constexpr int32_t kTapsPerStrength = 2;
58 [[nodiscard]]
bool tappingSoft()
const {
return tap_ < kTapsPerStrength; }
63 std::array<float, kTapsPerStrength> soft_{};
64 std::array<float, kTapsPerStrength> hard_{};
65 deluge::dsp::mic_velocity::Calibration::PointLevels softDb_{};
66 deluge::dsp::mic_velocity::Calibration::PointLevels hardDb_{};
67 deluge::dsp::mic_velocity::Calibration candidate_{};
72 uint8_t tryVelocity_ = 0;
bool measuresPad(int32_t x, int32_t y) const
Whether a press on (x, y) should be measured: every main pad, while this is open.
Definition mic_velocity_calibration.h:50