33 using SelectedNoteRow::SelectedNoteRow;
35 [[nodiscard]] int32_t getMaxValue()
const override {
return (kNumProbabilityValues | 127); }
36 [[nodiscard]] int32_t getMinValue()
const override {
return 1; }
44 char modelStackMemory[MODEL_STACK_MAX_SIZE];
48 if (modelStackWithNoteRow->getNoteRowAllowNull() !=
nullptr) {
49 NoteRow* noteRow = modelStackWithNoteRow->getNoteRowAllowNull();
50 this->setValue(noteRow->probabilityValue);
56 int32_t newValue = instrumentClipView.setNoteRowProbabilityWithOffset(offset);
58 this->setValue(newValue);
65 bool latching =
false;
67 intToString(getProbabilityValue(latching), buffer);
70 strcat(buffer,
" (L)");
73 OLED::main.drawStringCentred(buffer, 18 + OLED_MAIN_TOPMOST_PIXEL, kTextHugeSpacingX, kTextHugeSizeY);
78 bool latching =
false;
80 intToString(getProbabilityValue(latching), buffer);
81 strcat(buffer, latching ?
"L" :
"%");
83 OLED::main.drawStringCentered(buffer, slot.start_x, slot.start_y + kHorizontalMenuSlotYOffset, kTextSpacingX,
84 kTextSpacingY, slot.width);
87 void drawValue()
override {
89 bool latching =
false;
91 intToString(getProbabilityValue(latching), buffer);
93 display->setText(buffer,
true, latching ? 3 : 255);
97 bool latching =
false;
98 valueBuf.appendInt(getProbabilityValue(latching));
102 valueBuf.append(
" ltch");
106 void writeCurrentValue()
override { ; }
109 int32_t getProbabilityValue(
bool& latching) {
110 int32_t probability = this->getValue();
113 if (probability > kNumProbabilityValues) {
118 return probability * 5;