37class ArrangerView final :
public TimelineView {
40 bool opened()
override;
41 void focusRegained()
override;
42 ActionResult padAction(int32_t x, int32_t y, int32_t velocity)
override;
43 ActionResult handleEditPadAction(int32_t x, int32_t y, int32_t velocity);
44 ActionResult handleStatusPadAction(int32_t y, int32_t velocity, UI* ui);
45 ActionResult handleAuditionPadAction(int32_t y, int32_t velocity, UI* ui);
46 ActionResult buttonAction(deluge::hid::Button b,
bool on,
bool inCardRoutine)
override;
47 ActionResult verticalEncoderAction(int32_t offset,
bool inCardRoutine)
override;
48 void selectEncoderAction(int8_t offset)
override;
49 void modEncoderAction(int32_t whichModEncoder, int32_t offset)
override;
51 void repopulateOutputsOnScreen(
bool doRender =
true);
52 bool renderSidebar(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth],
53 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth])
override;
54 void drawMuteSquare(int32_t yDisplay,
RGB thisImage[]);
55 bool renderMainPads(uint32_t whichRows,
RGB image[][kDisplayWidth + kSideBarWidth],
56 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth],
bool drawUndefinedArea =
true)
override;
57 bool renderRow(
ModelStack* modelStack, int32_t yDisplay, int32_t xScroll, uint32_t xZoom,
RGB* thisImage,
58 uint8_t thisOccupancyMask[], int32_t renderWidth);
59 void editPadAction(int32_t x, int32_t y,
bool on);
60 ActionResult horizontalEncoderAction(int32_t offset)
override;
61 uint32_t getMaxLength()
override;
62 uint32_t getMaxZoom()
override;
63 void graphicsRoutine()
override;
64 [[nodiscard]] int32_t getNavSysId()
const override {
return NAVIGATION_ARRANGEMENT; }
65 void navigateThroughPresets(int32_t offset);
66 void notifyActiveClipChangedOnOutput(
Output* output);
67 ActionResult timerCallback()
override;
68 void reassessWhetherDoingAutoScroll(int32_t pos = -1);
69 void autoScrollOnPlaybackEnd();
70 bool initiateXScroll(int32_t newScrollPos);
71 [[nodiscard]]
bool supportsTriplets()
const override {
return false; }
72 bool putDraggedClipInstanceInNewPosition(
Output* output);
73 void tellMatrixDriverWhichRowsContainSomethingZoomable()
override;
74 void scrollFinished()
override;
75 void notifyPlaybackBegun()
override;
76 uint32_t getGreyedOutRowsNotRepresentingOutput(
Output* output)
override;
77 void playbackEnded()
override;
78 void clipNeedsReRendering(
Clip* clip)
override;
79 void exitSubModeWithoutAction(UI* ui =
nullptr);
80 bool transitionToArrangementEditor();
81 bool getGreyoutColsAndRows(uint32_t* cols, uint32_t* rows)
override;
83 ActionResult verticalScrollOneSquare(int32_t direction);
84 ActionResult horizontalScrollOneSquare(int32_t direction);
88 Output* outputsOnScreen[kDisplayHeight]{};
89 int8_t yPressedEffective{};
90 int8_t yPressedActual{};
92 bool actionOnDepress{};
94 int32_t desiredLength{};
95 int32_t originallyPressedClipActualLength{};
98 int32_t pressedClipInstanceIndex{};
99 Output* pressedClipInstanceOutput{};
100 int32_t pressedClipInstanceXScrollWhenLastInValidPosition{};
101 bool pressedClipInstanceIsInValidPosition{};
105 bool doingAutoScrollNow;
106 bool mustRedrawTickSquares{};
108 int32_t autoScrollNumSquaresBehind{};
110 int32_t lastInteractedOutputIndex;
111 int32_t lastInteractedPos;
112 uint8_t lastInteractedSection;
115 int32_t lastInteractedArrangementPos;
117 int32_t lastTickSquare{};
119 int32_t xScrollWhenPlaybackStarted{};
122 UIType getUIType()
override {
return UIType::ARRANGER; }
124 Clip* getClipForSelection();
126 void requestRendering(UI* ui, uint32_t whichMainRows = 0xFFFFFFFF, uint32_t whichSideRows = 0xFFFFFFFF);
129 void changeOutputType(OutputType newOutputType);
130 void moveClipToSession();
131 void auditionPadAction(
bool on, int32_t y, UI* ui);
132 void beginAudition(
Output* output);
133 void endAudition(
Output* output,
bool evenIfPlaying =
false);
135 Drum* getDrumForAudition(
Kit* kit);
136 void drawAuditionSquare(int32_t yDisplay,
RGB thisImage[]);
138 void outputActivated(
Output* output);
139 void outputDeactivated(
Output* output);
142 bool clearingWholeArrangement =
false);
143 void clearArrangement();
144 void interactWithClipInstance(
Output* output, int32_t yDisplay,
ClipInstance* clipInstance);
145 void rememberInteractionWithClipInstance(int32_t yDisplay,
ClipInstance* clipInstance);
147 void auditionEnded();
149 void changeOutputToAudio();
150 bool renderRowForOutput(
ModelStack* modelStack,
Output* output, int32_t xScroll, uint32_t xZoom,
RGB* image,
151 uint8_t occupancyMask[], int32_t renderWidth, int32_t ignoreI);
152 Instrument* createNewInstrument(OutputType newOutputType,
bool* instrumentAlreadyInSong);
153 uint32_t doActualRender(int32_t xScroll, uint32_t xZoom, uint32_t whichRows,
RGB* image,
154 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth], int32_t renderWidth,