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;
165 int16_t colourOffset;
169 bool soloingInSessionMode;
172 bool activeIfNoSoloBeforeStemExport;
174 bool wasActiveBefore;
177 bool isPendingOverdub;
178 bool isUnfinishedAutoOverdub;
179 bool wasWantingToDoLinearRecordingBeforeCountIn;
180 OverDubType overdubNature;
184#if HAVE_SEQUENCE_STEP_CONTROL
185 bool currentlyPlayingReversed;
186 SequenceDirection sequenceDirectionMode;
192 int32_t originalLength;
194 int32_t lastProcessedPos;
196 Clip* beingRecordedFromClip;
200 uint32_t indexForSaving;
202 LaunchStyle launchStyle;
203 int64_t fillEventAtTickCount;
204 bool overdubsShouldCloneOutput;
207 bool onAutomationClipView;
213 int32_t lastSelectedParamShortcutX;
214 int32_t lastSelectedParamShortcutY;
215 int32_t lastSelectedParamArrayPosition;
216 OutputType lastSelectedOutputType;
217 PatchSource lastSelectedPatchSource;
220 virtual bool isEmpty(
bool displayPopup =
true) = 0;
222 virtual bool renderSidebar(uint32_t whichRows = 0,
RGB image[][kDisplayWidth + kSideBarWidth] =
nullptr,
223 uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth] =
nullptr) = 0;
232 Error solicitParamManager(
Song* song,
ParamManager* newParamManager =
nullptr,
233 Clip* favourClipForCloningParamManager =
nullptr);