34 using SelectedNote::SelectedNote;
36 [[nodiscard]] int32_t getMaxValue()
const override {
return (kNumProbabilityValues | 127); }
37 [[nodiscard]] int32_t getMinValue()
const override {
return 1; }
45 Note* leftMostNote = instrumentClipView.getLeftMostNotePressed();
48 this->setValue(leftMostNote->getProbability());
53 instrumentClipView.adjustNoteProbabilityWithOffset(offset);
59 bool latching =
false;
61 intToString(getProbabilityValue(latching), buffer);
64 strcat(buffer,
" (L)");
67 OLED::main.drawStringCentred(buffer, 18 + OLED_MAIN_TOPMOST_PIXEL, kTextHugeSpacingX, kTextHugeSizeY);
72 bool latching =
false;
74 intToString(getProbabilityValue(latching), buffer);
75 strcat(buffer, latching ?
"L" :
"%");
77 OLED::main.drawStringCentered(buffer, slot.start_x, slot.start_y + kHorizontalMenuSlotYOffset, kTextSpacingX,
78 kTextSpacingY, slot.width);
81 void drawValue()
override {
83 bool latching =
false;
85 intToString(getProbabilityValue(latching), buffer);
87 display->setText(buffer,
true, latching ? 3 : 255);
91 bool latching =
false;
92 valueBuf.appendInt(getProbabilityValue(latching));
96 valueBuf.append(
" ltch");
100 void writeCurrentValue()
override { ; }
103 int32_t getProbabilityValue(
bool& latching) {
104 int32_t probability = this->getValue();
107 if (probability > kNumProbabilityValues) {
112 return probability * 5;