46class Clip :
public TimelineCounter {
49 Clip(ClipType newType);
51 bool cancelAnyArming();
53 virtual int32_t getMaxLength();
55 void cloneFrom(Clip
const* other);
56 void beginInstance(
Song* song, int32_t arrangementRecordPos);
57 void endInstance(int32_t arrangementRecordPos,
bool evenIfOtherClip =
false);
59 bool useActualPosForParamManagers =
true);
61 virtual void expectNoFurtherTicks(
Song* song,
bool actuallySoundChange =
true) = 0;
66 InstrumentRemoval instrumentRemovalInstruction);
67 uint32_t getActualCurrentPosAsIfPlayingInForwardDirection();
68 int32_t getCurrentPosAsIfPlayingInForwardDirection();
69 Clip* getClipBeingRecordedFrom();
70 Clip* getClipToRecordTo();
71 [[nodiscard]]
bool isArrangementOnlyClip()
const;
72 bool isActiveOnOutput();
73 virtual bool deleteSoundsWhichWontSound(
Song* song);
83 IndependentNoteRowLengthIncrease independentNoteRowInstruction,
84 bool completelyRenderOutIterationDependence =
false,
85 Action* action =
nullptr) {
94 bool shouldDeleteEmptyNoteRowsAtEndOfList =
false,
95 bool shouldRetainLinksToSounds =
false,
bool keepNoteRowsWithMIDIInput =
true,
96 bool shouldGrabMidiCommands =
false,
bool shouldBackUpExpressionParamsToo =
true) = 0;
100 int32_t xScroll, uint32_t xZoom,
RGB* image, uint8_t occupancyMask[],
101 bool addUndefinedArea =
true, int32_t noteRowIndexStart = 0,
102 int32_t noteRowIndexEnd = 2147483647, int32_t xStart = 0,
103 int32_t xEnd = kDisplayWidth,
bool allowBlur =
true,
bool drawRepeats =
false);
108 int32_t buttonLatencyForTempolessRecord = 0) = 0;
110 void drawUndefinedArea(int32_t localScroll, uint32_t, int32_t lengthToDisplay,
RGB* image, uint8_t[],
111 int32_t imageWidth,
TimelineView* editorScreen,
bool tripletsOnHere);
113 int32_t buttonPressLatency);
121 void setupOverdubInPlace(OverDubType type);
122 virtual bool getCurrentlyRecordingLinearly() = 0;
123 virtual bool currentlyScrollableAndZoomable() = 0;
125 bool clearSequenceAndMPE);
130 virtual char const* getXMLTag() = 0;
132 void readTagFromFile(
Deserializer& reader,
char const* tagName,
Song* song, int32_t* readAutomationUpToPos);
134 virtual void copyBasicsFrom(
Clip const* otherClip);
135 void setupForRecordingAsAutoOverdub(
Clip* existingClip,
Song* song, OverDubType newOverdubNature);
137 virtual bool isAbandonedOverdub() = 0;
138 virtual bool wantsToBeginLinearRecording(
Song* song);
140 uint32_t timeRemainder, int32_t suggestedLength,
141 int32_t alternativeLongerLength) = 0;
142 virtual void abortRecording() = 0;
143 virtual void stopAllNotesPlaying(
Song* song,
bool actuallySoundChange =
true) {}
144 virtual bool willCloneOutputForOverdub() {
return false; }
145 void setSequenceDirectionMode(ModelStackWithTimelineCounter* modelStack, SequenceDirection newSequenceDirection);
146 virtual void incrementPos(ModelStackWithTimelineCounter* modelStack, int32_t numTicks);
149 bool shiftSequenceAndMPE) = 0;
152 [[nodiscard]] uint32_t
getLivePos()
const override;
153 [[nodiscard]] int32_t getLoopLength()
const override;
154 [[nodiscard]]
bool isPlayingAutomationNow()
const override;
155 [[nodiscard]]
bool backtrackingCouldLoopBackToEnd()
const override;
159 TimelineCounter* getTimelineCounterToRecordTo()
override;
161 void expectEvent()
override;
166 Clip* beingRecordedFromClip;
167 bool soloingInSessionMode;
170 int16_t colourOffset;
175 bool activeIfNoSoloBeforeStemExport;
177 bool wasActiveBefore;
180 bool isPendingOverdub;
181 bool isUnfinishedAutoOverdub;
182 bool wasWantingToDoLinearRecordingBeforeCountIn;
183 OverDubType overdubNature;
190 int32_t originalLength;
192 int32_t lastProcessedPos;
196 uint32_t indexForSaving;
198 LaunchStyle launchStyle;
199 int64_t fillEventAtTickCount;
200 bool overdubsShouldCloneOutput;
203 bool onAutomationClipView;
209 int32_t lastSelectedParamShortcutX;
210 int32_t lastSelectedParamShortcutY;
211 int32_t lastSelectedParamArrayPosition;
212 OutputType lastSelectedOutputType;
213 PatchSource lastSelectedPatchSource;
216 virtual bool isEmpty(
bool displayPopup =
true) = 0;
218 virtual bool renderSidebar(uint32_t whichRows = 0,
RGB image[][kDisplayWidth + kSideBarWidth] =
nullptr,
219 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth] =
nullptr) = 0;
228 Error solicitParamManager(
Song* song,
ParamManager* newParamManager =
nullptr,
229 Clip* favourClipForCloningParamManager =
nullptr);