81 Output(OutputType newType);
83 virtual bool matchesPreset(OutputType otherType, int32_t channel, int32_t channelSuffix,
char const* otherName,
84 char const* dirPath) = 0;
87 [[nodiscard]]
Clip* getActiveClip()
const;
93 const OutputType type;
94 bool mutedInArrangementMode;
95 bool mutedInArrangementModeBeforeStemExport;
97 bool soloingInArrangementMode;
99 bool wasCreatedForAutoOverdub;
100 bool armedForRecording;
106 bool alreadyGotItsNewClip;
107 bool isGettingSoloingClip;
109 bool nextClipFoundShouldGetArmed;
113 virtual void renderOutput(
ModelStack* modelStack, deluge::dsp::StereoBuffer<q31_t> outputBuffer,
114 int32_t* reverbBuffer, int32_t reverbAmountAdjust, int32_t sideChainHitPending,
115 bool shouldLimitDelayFeedback,
bool isClipActive) = 0;
117 virtual void setupWithoutActiveClip(
ModelStack* modelStack);
118 virtual bool setActiveClip(
120 PgmChangeSend maySendMIDIPGMs = PgmChangeSend::ONCE);
121 void pickAnActiveClipForArrangementPos(
ModelStack* modelStack, int32_t arrangementPos,
122 PgmChangeSend maySendMIDIPGMs);
123 void pickAnActiveClipIfPossible(
ModelStack* modelStack,
bool searchSessionClipsIfNeeded =
true,
124 PgmChangeSend maySendMIDIPGMs = PgmChangeSend::ONCE,
125 bool setupWithoutActiveClipIfNeeded =
true);
126 void detachActiveClip(
Song* currentSong);
129 virtual bool isSkippingRendering() {
return true; }
130 bool clipHasInstance(
Clip* clip);
131 bool isEmpty(
bool displayPopup =
true);
132 void clipLengthChanged(
Clip* clip, int32_t oldLength);
133 virtual void cutAllSound() {}
134 virtual void getThingWithMostReverb(
Sound** soundWithMostReverb,
ParamManager** paramManagerWithMostReverb,
136 int32_t* highestReverbAmountFound) {}
145 virtual void offerReceivedCCToLearnedParams(
MIDICable& cable, uint8_t channel, uint8_t ccNumber, uint8_t value,
148 virtual int32_t doTickForwardForArp(ModelStack* modelStack, int32_t currentPos) {
return 2147483647; }
149 void endAnyArrangementRecording(Song* song, int32_t actualEndPos, uint32_t timeRemainder);
150 virtual bool wantsToBeginArrangementRecording() {
return armedForRecording; }
153 virtual Error readFromFile(Deserializer& reader, Song* song, Clip* clip, int32_t readAutomationUpToPos);
155 virtual bool readTagFromFile(Deserializer& reader,
char const* tagName);
156 void writeToFile(Clip* clipForSavingOutputOnly, Song* song);
157 virtual bool writeDataToFile(Serializer& writer, Clip* clipForSavingOutputOnly,
160 virtual Error loadAllAudioFiles(
bool mayActuallyReadFiles) {
return Error::NONE; }
161 virtual void loadCrucialAudioFilesOnly() {}
164 virtual void resyncLFOs() {};
166 virtual void sendMIDIPGM() {};
167 virtual void deleteBackedUpParamManagers(Song* song) {}
168 virtual void prepareForHibernationOrDeletion() {}
170 virtual char const* getXMLTag() = 0;
171 virtual ParamManager* getParamManager(Song* song);
173 virtual char const* getNameXMLTag() {
return "name"; }
175 virtual void offerReceivedNote(ModelStackWithTimelineCounter* modelStackWithTimelineCounter, MIDICable& cable,
176 bool on, int32_t channel, int32_t note, int32_t velocity,
bool shouldRecordNotes,
177 bool* doingMidiThru) {}
178 virtual void offerReceivedPitchBend(ModelStackWithTimelineCounter* modelStackWithTimelineCounter, MIDICable& cable,
179 uint8_t channel, uint8_t data1, uint8_t data2,
bool* doingMidiThru) {}
180 virtual void offerReceivedCC(ModelStackWithTimelineCounter* modelStackWithTimelineCounter, MIDICable& cable,
181 uint8_t channel, uint8_t ccNumber, uint8_t value,
bool* doingMidiThru) {}
182 virtual void offerReceivedAftertouch(ModelStackWithTimelineCounter* modelStackWithTimelineCounter, MIDICable& cable,
183 int32_t channel, int32_t value, int32_t noteCode,
bool* doingMidiThru) {}
185 virtual void stopAnyAuditioning(ModelStack* modelStack) {}
186 virtual void offerBendRangeUpdate(ModelStack* modelStack, MIDICable& cable, int32_t channelOrZone,
187 int32_t whichBendRange, int32_t bendSemitones) {}
190 Error possiblyBeginArrangementRecording(Song* song, int32_t newPos);
191 void endArrangementPlayback(Song* song, int32_t actualEndPos, uint32_t timeRemainder);
192 bool recordingInArrangement;
194 virtual ModelStackWithAutoParam* getModelStackWithParam(ModelStackWithTimelineCounter* modelStack, Clip* clip,
196 bool affectEntire,
bool useMenuStack) = 0;
197 virtual bool needsEarlyPlayback()
const {
return false; }
198 bool hasRecorder() {
return recorder; }
199 bool shouldRenderInSong() {
return !(recorderIsEchoing); }
203 recorderIsEchoing = monitoring;
204 outputRecordingThisOutput = output;
210 recorder = newRecorder;
214 bool removeRecorder() {
216 recorder->removeFromOutput();
222 Output* getOutputRecordingThis() {
return outputRecordingThisOutput; }
225 virtual Clip* createNewClipForArrangementRecording(ModelStack* modelStack) = 0;
226 bool recorderIsEchoing{
false};
228 Output* outputRecordingThisOutput{
nullptr};
230 virtual void clearRecordingFrom() {}
231 Clip* activeClip{
nullptr};
232 SampleRecorder* recorder{
nullptr};