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 void shiftAutomationHorizontally(int32_t offset, int32_t scroll_amount,
Action* action);
62 void shiftClipsHorizontally(int32_t offset, int32_t scroll_amount,
Action* action);
63 uint32_t getMaxLength()
override;
64 uint32_t getMaxZoom()
override;
65 void graphicsRoutine()
override;
66 [[nodiscard]] int32_t getNavSysId()
const override {
return NAVIGATION_ARRANGEMENT; }
67 void navigateThroughPresets(int32_t offset);
68 void notifyActiveClipChangedOnOutput(
Output* output);
69 ActionResult timerCallback()
override;
70 void reassessWhetherDoingAutoScroll(int32_t pos = -1);
71 void autoScrollOnPlaybackEnd();
72 bool initiateXScroll(int32_t newScrollPos);
73 [[nodiscard]]
bool supportsTriplets()
const override {
return false; }
74 bool putDraggedClipInstanceInNewPosition(
Output* output);
75 void tellMatrixDriverWhichRowsContainSomethingZoomable()
override;
76 void scrollFinished()
override;
77 void notifyPlaybackBegun()
override;
78 uint32_t getGreyedOutRowsNotRepresentingOutput(
Output* output)
override;
79 void playbackEnded()
override;
80 void clipNeedsReRendering(
Clip* clip)
override;
81 void exitSubModeWithoutAction(UI* ui =
nullptr);
82 bool transitionToArrangementEditor();
83 bool getGreyoutColsAndRows(uint32_t* cols, uint32_t* rows)
override;
85 ActionResult verticalScrollOneSquare(int32_t direction);
86 ActionResult horizontalScrollOneSquare(int32_t direction);
90 Output* outputsOnScreen[kDisplayHeight]{};
91 int8_t yPressedEffective{};
92 int8_t yPressedActual{};
94 bool actionOnDepress{};
96 int32_t desiredLength{};
97 int32_t originallyPressedClipActualLength{};
100 int32_t pressedClipInstanceIndex{};
101 Output* pressedClipInstanceOutput{};
102 int32_t pressedClipInstanceXScrollWhenLastInValidPosition{};
103 bool pressedClipInstanceIsInValidPosition{};
107 bool doingAutoScrollNow;
108 bool mustRedrawTickSquares{};
110 int32_t autoScrollNumSquaresBehind{};
112 int32_t lastInteractedOutputIndex;
113 int32_t lastInteractedPos;
114 uint8_t lastInteractedSection;
117 int32_t lastInteractedArrangementPos;
119 int32_t lastTickSquare{};
121 int32_t xScrollWhenPlaybackStarted{};
124 UIType
getUIType()
override {
return UIType::ARRANGER; }
127 Clip* getClipForSelection();
129 void requestRendering(
UI* ui, uint32_t whichMainRows = 0xFFFFFFFF, uint32_t whichSideRows = 0xFFFFFFFF);
132 void changeOutputType(OutputType newOutputType);
133 void moveClipToSession();
134 void auditionPadAction(
bool on, int32_t y,
UI* ui);
135 void beginAudition(
Output* output);
136 void endAudition(
Output* output,
bool evenIfPlaying =
false);
138 Drum* getDrumForAudition(
Kit* kit);
139 void drawAuditionSquare(int32_t yDisplay,
RGB thisImage[]);
141 void outputActivated(
Output* output);
142 void outputDeactivated(
Output* output);
145 bool clearingWholeArrangement =
false);
146 void clearArrangement();
147 void interactWithClipInstance(
Output* output, int32_t yDisplay,
ClipInstance* clipInstance);
148 void rememberInteractionWithClipInstance(int32_t yDisplay,
ClipInstance* clipInstance);
150 void auditionEnded();
152 void changeOutputToAudio();
153 bool renderRowForOutput(
ModelStack* modelStack,
Output* output, int32_t xScroll, uint32_t xZoom,
RGB* image,
154 uint8_t occupancyMask[], int32_t renderWidth, int32_t ignoreI);
155 Instrument* createNewInstrument(OutputType newOutputType,
bool* instrumentAlreadyInSong);
156 uint32_t doActualRender(int32_t xScroll, uint32_t xZoom, uint32_t whichRows,
RGB* image,
157 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth], int32_t renderWidth,