Deluge Firmware
Loading...
Searching...
No Matches
song.h
Go to the documentation of this file.
1/*
2 * Copyright © 2014-2023 Synthstrom Audible Limited
3 *
4 * This file is part of The Synthstrom Audible Deluge Firmware.
5 *
6 * The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software Foundation,
8 * either version 3 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with this program.
15 * If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef SONG_H
19#define SONG_H
20
21#include <ClipArray.h>
23#include <ParamManager.h>
24#include <TimelineCounter.h>
26#include "DString.h"
27#include "LearnedMIDI.h"
28
29class MidiCommand;
30class InstrumentClip;
31class Synth;
33class Instrument;
35class Drum;
36class SoundInstrument;
37class SoundDrum;
38class Action;
39class ArrangementRow;
42class Kit;
43class MIDIInstrument;
44class NoteRow;
45class Output;
46class AudioOutput;
47class ModelStack;
49
50
51class Section {
52public:
55
58 }
59};
60
61
62
67};
68
69
70
71class Song final : public TimelineCounter
72{
73public:
74 Song();
75 ~Song();
76 bool mayDoubleTempo();
78 void transposeAllScaleModeClips(int offset);
79 bool anyScaleModeClips();
80 void setRootNote(int newRootNote, InstrumentClip* clipToAvoidAdjustingScrollFor = NULL);
81 void addModeNote(uint8_t modeNote);
82 void addMajorDependentModeNotes(uint8_t i, bool preferHigher, bool notesWithinOctavePresent[]);
83 bool yNoteIsYVisualWithinOctave(int yNote, int yVisualWithinOctave);
84 uint8_t getYNoteWithinOctaveFromYNote(int yNote);
85 void changeMusicalMode(uint8_t yVisualWithinOctave, int8_t change);
86 int getYVisualFromYNote(int yNote, bool inKeyMode);
87 int getYNoteFromYVisual(int yVisual, bool inKeyMode);
88 bool mayMoveModeNote(int16_t yVisualWithinOctave, int8_t newOffset);
89 bool modeContainsYNote(int yNote);
90 ParamManagerForTimeline* findParamManagerForDrum(Kit* kit, Drum* drum, Clip* stopTraversalAtClip = NULL);
98 void setTempoFromNumSamples(double newTempoSamples, bool shouldLogAction);
99 void setupDefault();
100 void setBPM(float tempoBPM, bool shouldLogAction);
101 void setTempoFromParams(int32_t magnitude, int8_t whichValue, bool shouldLogAction);
103 void deleteClipObject(Clip* clip, bool songBeingDestroyedToo = false, int instrumentRemovalInstruction = INSTRUMENT_REMOVAL_DELETE_OR_HIBERNATE_IF_UNUSED);
104 int getMaxMIDIChannelSuffix(int channel);
105 void addOutput(Output* output, bool atStart = true);
106 void deleteOutputThatIsInMainList(Output* output, bool stopAnyAuditioningFirst = true);
108 Instrument* getInstrumentFromPresetSlot(int instrumentType, int presetNumber, int presetSubSlotNumber, char const* name, char const* dirPath, bool searchHibernatingToo = true, bool searchNonHibernating = true);
111 void replaceInstrument(Instrument* oldInstrument, Instrument* newInstrument, bool keepNoteRowsWithMIDIInput = true);
113 void stopAllAuditioning();
114 void deleteOrHibernateOutput(Output* output);
115 uint32_t getLivePos();
116 int32_t getLoopLength();
117 Instrument* getNonAudioInstrumentToSwitchTo(int newInstrumentType, int availabilityRequirement, int16_t newSlot, int8_t newSubSlot, bool* instrumentWasAlreadyInSong);
118 void removeSessionClipLowLevel(Clip* clip, int clipIndex);
119 void changeSwingInterval(int newValue);
122
124
127
129 Instrument* firstHibernatingInstrument; // All Instruments have inValidState set to false when they're added to this list
130
132
134
135 uint32_t xZoom[2]; // Set default zoom at max zoom-out;
136 int32_t xScroll[2]; // Leave this as signed
140 uint32_t tripletsLevel; // The number of ticks in one of the three triplets
141
144
145 // How many orders of magnitude faster internal ticks are going than input ticks. Used in combination with inputTickScale, which is usually 1,
146 // but is different if there's an inputTickScaleClip.
147 // So, e.g. if insideWorldTickMagnitude is 1, this means the inside world is spinning twice as fast as the external world, so MIDI sync coming in representing
148 // an 8th-note would be interpreted internally as a quarter-note (because two internal 8th-notes would have happened, twice as fast, making a quarter-note)
150
151 // Sometimes, we'll do weird stuff to insideWorldTickMagnitude for sync-scaling, which would make BPM values look weird. So, we keep insideWorldTickMagnitudeOffsetFromBPM
153
156
158
159 // Scales
160 uint8_t modeNotes[12];
162 int16_t rootNote;
163
164 uint16_t slot;
165 int8_t subSlot;
167
169
172
174
176 int32_t lastClipInstanceEnteredStartPos; // -1 means we are not "inside" an arrangement. While we're in the ArrangementEditor, it's 0
177
179
181
182 bool outputClipInstanceListIsCurrentlyInvalid; // Set to true during scenarios like replaceInstrument(), to warn other functions not to look at Output::clipInstances
183
185
186 bool inClipMinderViewOnLoad; // Temp variable only valid while loading Song
187
189
191
192
193 bool getAnyClipsSoloing();
194 uint32_t getInputTickScale();
196 void setInputTickScaleClip(Clip* clip);
197
198 void setClipLength(Clip* clip, uint32_t newLength, Action* action, bool mayReSyncClip = true);
199 void doubleClipLength(InstrumentClip *clip, Action* action = NULL);
200 Clip* getClipWithOutput(Output* output, bool mustBeActive = false, Clip* excludeClip = NULL);
201 int readFromFile();
202 void writeToFile();
203 void loadAllSamples(bool mayActuallyReadFiles = true);
204 bool modeContainsYNoteWithinOctave(uint8_t yNoteWithinOctave);
205 void renderAudio(StereoSample *outputBuffer, int numSamples, int32_t* reverbBuffer, int32_t sideChainHitPending);
206 bool isYNoteAllowed(int yNote, bool inKeyMode);
208 void setTimePerTimerTick(uint64_t newTimeBig, bool shouldLogAction = false);
209 bool hasAnySwing();
212 bool areAllClipsInSectionPlaying(int section);
213 void removeYNoteFromMode(int yNoteWithinOctave);
214 void turnSoloingIntoJustPlaying(bool getRidOfArmingToo = true);
218 int getNumOutputs();
219 Clip* getNextSessionClipWithOutput(int offset, Output* output, Clip* prevClip);
221
224 void backUpParamManager(ModControllableAudio* modControllable, Clip* clip, ParamManagerForTimeline* paramManager, bool shouldStealExpressionParamsToo = false);
229 bool doesNonAudioSlotHaveActiveClipInSession(int instrumentType, int slot, int subSlot = -1);
230 bool doesOutputHaveAnyClips(Output* output);
233 void deleteHibernatingInstrumentWithSlot(int instrumentType, char const* name);
235 Clip* getSessionClipWithOutput(Output* output, int requireSection = -1, Clip* excludeClip = NULL, int* clipIndex = NULL, bool excludePendingOverdubs = false);
239 void assertActiveness(ModelStackWithTimelineCounter* modelStack, int32_t endInstanceAtTime = -1);
240 bool isClipActive(Clip* clip);
241 void sendAllMIDIPGMs();
242 void sortOutWhichClipsAreActiveWithoutSendingPGMs(ModelStack* modelStack, int playbackWillStartInArrangerAtPos);
244 Clip* getLongestClip(bool includePlayDisabled, bool includeArrangementOnly);
245 Clip *getLongestActiveClipWithMultipleOrFactorLength(int32_t targetLength, bool revertToAnyActiveClipIfNone = true, Clip* excludeClip = NULL);
246 int getOutputIndex(Output* output);
247 void setHibernatingMIDIInstrument(MIDIInstrument* newInstrument);
249 MIDIInstrument* grabHibernatingMIDIInstrument(int newSlot, int newSubSlot);
250 NoteRow* findNoteRowForDrum(Kit* kit, Drum* drum, Clip* stopTraversalAtClip = NULL);
251
256 Output* getOutputFromIndex(int index);
257 void ensureAllInstrumentsHaveAClipOrBackedUpParamManager(char const* errorMessageNormal, char const* errorMessageHibernating);
258 int placeFirstInstancesOfActiveClips(int32_t pos);
259 void endInstancesOfActiveClips(int32_t pos, bool detachClipsToo = false);
260 void clearArrangementBeyondPos(int32_t pos, Action* action);
261 void deletingClipInstanceForClip(Output* output, Clip* clip, Action* action, bool shouldPickNewActiveClip);
268 void expectEvent();
270 int32_t getLastProcessedPos();
271 void setParamsInAutomationMode(bool newState);
272 bool canOldOutputBeReplaced(Clip* clip, int* availabilityRequirement = NULL);
273 void instrumentSwapped(Instrument* newInstrument);
274 Instrument* changeInstrumentType(Instrument* oldInstrument, int newInstrumentType);
276 AudioOutput* createNewAudioOutput(Output* replaceOutput = NULL);
277 void getNoteLengthName(char *text, uint32_t noteLength, bool clarifyPerColumn = false);
278 void replaceOutputLowLevel(Output* newOutput, Output* oldOutput);
279 void removeSessionClip(Clip* clip, int clipIndex, bool forceClipsAboveToMoveVertically = false);
280 bool deletePendingOverdubs(Output* onlyWithOutput = NULL, int* originalClipIndex = NULL, bool createConsequencesForOtherLinearlyRecordingClips = false);
283 Clip* createPendingNextOverdubBelowClip(Clip* clip, int clipIndex, int newOverdubNature);
285 Output* getNextAudioOutput(int offset, Output* oldOutput, int availabilityRequirement);
286 void deleteOutput(Output* output);
287 void cullAudioClipVoice();
289 int removeOutputFromMainList(Output* output, bool stopAnyAuditioningFirst = true);
290 void swapClips(Clip* newClip, Clip* oldClip, int clipIndex);
291 Clip* replaceInstrumentClipWithAudioClip(Clip* oldClip, int clipIndex);
292 void setDefaultVelocityForAllInstruments(uint8_t newDefaultVelocity);
293 void midiDeviceBendRangeUpdatedViaMessage(ModelStack* modelStack, MIDIDevice* device, int channelOrZone, int whichBendRange, int bendSemitones);
294 int addInstrumentsToFileItems(int instrumentType);
295
296 uint32_t getQuarterNoteLength();
297 uint32_t getBarLength();
301
302 // Reverb params to be stored here between loading and song being made the active one
306 int32_t reverbPan;
312
313private:
314 void inputTickScalePotentiallyJustChanged(uint32_t oldScale);
315 int readClipsFromFile(ClipArray* clipArray);
316 void addInstrumentToHibernationList(Instrument* instrument);
317 void deleteAllBackedUpParamManagers(bool shouldAlsoEmptyVector = true);
318 void deleteAllBackedUpParamManagersWithClips();
319 void deleteAllOutputs(Output** prevPointer);
320 void setupClipIndexesForSaving();
321
322};
323
324
325extern Song* currentSong;
326extern Song* preLoadedSong;
327
328#endif // SONG_H
Definition: Action.h:74
Definition: Arpeggiator.h:28
Definition: AudioOutput.h:27
Definition: ClipArray.h:25
Definition: Clip.h:41
Definition: drum.h:45
Definition: GlobalEffectableForSong.h:23
Definition: InstrumentClip.h:54
Definition: instrument.h:45
Definition: kit.h:35
Definition: LearnedMIDI.h:30
Definition: MIDIDevice.h:74
Definition: MIDIInstrument.h:35
Definition: ModControllableAudio.h:46
Definition: ModelStack.h:123
Definition: ModelStack.h:243
Definition: ModelStack.h:130
Definition: NoteRow.h:72
Definition: OrderedResizeableArrayWithMultiWordKey.h:26
Definition: Output.h:42
Definition: ParamManager.h:166
Definition: ParamManager.h:50
Definition: song.h:51
Section()
Definition: song.h:56
int16_t numRepetitions
Definition: song.h:54
LearnedMIDI launchMIDICommand
Definition: song.h:53
Definition: song.h:72
void setupDefault()
Definition: song.cpp:184
void setupPatchingForAllParamManagers()
Definition: song.cpp:2889
AudioOutput * getFirstAudioOutput()
Definition: song.cpp:3999
ParamManager * getBackedUpParamManagerForExactClip(ModControllableAudio *modControllable, Clip *clip, ParamManager *stealInto=NULL)
Definition: song.cpp:2917
void loadAllSamples(bool mayActuallyReadFiles=true)
Definition: song.cpp:1715
void setTimePerTimerTick(uint64_t newTimeBig, bool shouldLogAction=false)
Definition: song.cpp:1872
~Song()
Definition: song.cpp:141
void transposeAllScaleModeClips(int offset)
Definition: song.cpp:367
int getYNoteFromYVisual(int yVisual, bool inKeyMode)
Definition: song.cpp:616
int32_t xZoomForReturnToSongView
Definition: song.h:138
bool ensureAtLeastOneSessionClip()
Definition: song.cpp:288
Clip * getClipWithOutput(Output *output, bool mustBeActive=false, Clip *excludeClip=NULL)
Definition: song.cpp:824
void doubleClipLength(InstrumentClip *clip, Action *action=NULL)
Definition: song.cpp:803
int32_t lastClipInstanceEnteredStartPos
Definition: song.h:176
ModelStackWithThreeMainThings * addToModelStack(ModelStack *modelStack)
Definition: song.cpp:4708
ClipArray arrangementOnlyClips
Definition: song.h:126
bool modeContainsYNoteWithinOctave(uint8_t yNoteWithinOctave)
Definition: song.cpp:557
ParamManager * getBackedUpParamManagerPreferablyWithClip(ModControllableAudio *modControllable, Clip *clip, ParamManager *stealInto=NULL)
Definition: song.cpp:2943
int32_t reverbPan
Definition: song.h:306
Clip * getLongestClip(bool includePlayDisabled, bool includeArrangementOnly)
Definition: song.cpp:3453
float reverbWidth
Definition: song.h:305
bool canOldOutputBeReplaced(Clip *clip, int *availabilityRequirement=NULL)
Definition: song.cpp:3800
bool arrangementHasAnyClipInstances()
Definition: song.cpp:3758
int32_t getPosAtWhichPlaybackWillCut(ModelStackWithTimelineCounter const *modelStack)
Definition: song.cpp:4575
void deleteSoundsWhichWontSound()
Definition: song.cpp:1765
void ensureInaccessibleParamPresetValuesWithoutKnobsAreZero(Sound *sound)
Definition: song.cpp:2304
Song()
Definition: song.cpp:75
int getOutputIndex(Output *output)
Definition: song.cpp:2844
void removeInstrumentFromHibernationList(Instrument *instrument)
Definition: song.cpp:2722
String dirPath
Definition: song.h:190
void setInputTickScaleClip(Clip *clip)
Definition: song.cpp:715
GlobalEffectableForSong globalEffectable
Definition: song.h:123
void writeToFile()
Definition: song.cpp:894
void backUpParamManager(ModControllableAudio *modControllable, Clip *clip, ParamManagerForTimeline *paramManager, bool shouldStealExpressionParamsToo=false)
Definition: song.cpp:2981
uint8_t modeNotes[12]
Definition: song.h:160
bool isYNoteAllowed(int yNote, bool inKeyMode)
Definition: song.cpp:599
bool doesOutputHaveAnyClips(Output *output)
Definition: song.cpp:3188
Clip * getSessionClipWithOutput(Output *output, int requireSection=-1, Clip *excludeClip=NULL, int *clipIndex=NULL, bool excludePendingOverdubs=false)
Definition: song.cpp:853
void expectEvent()
Definition: song.cpp:4591
void setTempoFromParams(int32_t magnitude, int8_t whichValue, bool shouldLogAction)
Definition: song.cpp:2349
bool wasLastInArrangementEditor
Definition: song.h:175
AudioOutput * createNewAudioOutput(Output *replaceOutput=NULL)
Definition: song.cpp:4010
uint8_t getYNoteWithinOctaveFromYNote(int yNote)
Definition: song.cpp:546
bool isOutputActiveInArrangement(Output *output)
Definition: song.cpp:3507
uint32_t getLivePos()
Definition: song.cpp:4595
uint8_t numModeNotes
Definition: song.h:161
bool doesOutputHaveActiveClipInSession(Output *output)
Definition: song.cpp:3154
void replaceOutputLowLevel(Output *newOutput, Output *oldOutput)
Definition: song.cpp:4106
void renderAudio(StereoSample *outputBuffer, int numSamples, int32_t *reverbBuffer, int32_t sideChainHitPending)
Definition: song.cpp:1815
Clip * getClipWithOutputAboutToBeginLinearRecording(Output *output)
Definition: song.cpp:4365
bool modeContainsYNote(int yNote)
Definition: song.cpp:552
MIDIInstrument * hibernatingMIDIInstrument
Definition: song.h:180
void swapClips(Clip *newClip, Clip *oldClip, int clipIndex)
Definition: song.cpp:4443
void getActiveModControllable(ModelStackWithTimelineCounter *modelStack)
Definition: song.cpp:4580
ModelStackWithThreeMainThings * setupModelStackWithSongAsTimelineCounter(void *memory)
Definition: song.cpp:4700
void grabVelocityToLevelFromMIDIDeviceAndSetupPatchingForAllParamManagersForInstrument(MIDIDevice *device, SoundInstrument *instrument)
Definition: song.cpp:2063
int readFromFile()
Definition: song.cpp:1062
void deleteBackedUpParamManagersForClip(Clip *clip)
Definition: song.cpp:3031
int getYScrollSongViewWithoutPendingOverdubs()
Definition: song.cpp:4338
void sendAllMIDIPGMs()
Definition: song.cpp:3295
int32_t xScroll[2]
Definition: song.h:136
bool arrangerAutoScrollModeActive
Definition: song.h:178
uint8_t sectionToReturnToAfterSongEnd
Definition: song.h:173
int placeFirstInstancesOfActiveClips(int32_t pos)
Definition: song.cpp:3615
void setParamsInAutomationMode(bool newState)
Definition: song.cpp:3765
void sortOutWhichClipsAreActiveWithoutSendingPGMs(ModelStack *modelStack, int playbackWillStartInArrangerAtPos)
Definition: song.cpp:3304
void removeSessionClipLowLevel(Clip *clip, int clipIndex)
Definition: song.cpp:4298
void restoreClipStatesBeforeArrangementPlay()
Definition: song.cpp:3205
MIDIInstrument * grabHibernatingMIDIInstrument(int newSlot, int newSubSlot)
Definition: song.cpp:3526
int32_t divideByTimePerTimerTick
Definition: song.h:143
void stopAllAuditioning()
Definition: song.cpp:3560
void midiDeviceBendRangeUpdatedViaMessage(ModelStack *modelStack, MIDIDevice *device, int channelOrZone, int whichBendRange, int bendSemitones)
Definition: song.cpp:4655
void turnSoloingIntoJustPlaying(bool getRidOfArmingToo=true)
Definition: song.cpp:2431
void instrumentSwapped(Instrument *newInstrument)
Definition: song.cpp:3830
void setBPM(float tempoBPM, bool shouldLogAction)
Definition: song.cpp:2342
uint32_t getQuarterNoteLength()
Definition: song.cpp:4556
int32_t getLastProcessedPos()
Definition: song.cpp:4604
bool getAnyClipsSoloing()
Definition: song.cpp:2412
void setDefaultVelocityForAllInstruments(uint8_t newDefaultVelocity)
Definition: song.cpp:4621
void resumeClipsClonedForArrangementRecording()
Definition: song.cpp:3669
int8_t swingAmount
Definition: song.h:154
bool outputClipInstanceListIsCurrentlyInvalid
Definition: song.h:182
int32_t reverbCompressorVolume
Definition: song.h:307
uint16_t slot
Definition: song.h:164
Clip * getSyncScalingClip()
Definition: song.cpp:711
Clip * getNextSessionClipWithOutput(int offset, Output *output, Clip *prevClip)
Definition: song.cpp:872
OrderedResizeableArrayWithMultiWordKey backedUpParamManagers
Definition: song.h:133
uint32_t xZoom[2]
Definition: song.h:135
int16_t rootNote
Definition: song.h:162
int getNumOutputs()
Definition: song.cpp:2865
int cycleThroughScales()
Definition: song.cpp:2216
float reverbDamp
Definition: song.h:304
void cullAudioClipVoice()
Definition: song.cpp:4418
ParamManagerForTimeline * findParamManagerForDrum(Kit *kit, Drum *drum, Clip *stopTraversalAtClip=NULL)
Definition: song.cpp:1958
int32_t xScrollForReturnToSongView
Definition: song.h:137
Section sections[MAX_NUM_SECTIONS]
Definition: song.h:157
float getTimePerTimerTickFloat()
Definition: song.cpp:2464
void deleteOutput(Output *output)
Definition: song.cpp:2693
bool anyOutputsSoloingInArrangement
Definition: song.h:252
uint8_t reverbCompressorSync
Definition: song.h:311
bool anyScaleModeClips()
Definition: song.cpp:389
int addInstrumentsToFileItems(int instrumentType)
Definition: song.cpp:4663
bool isClipActive(Clip *clip)
Definition: song.cpp:3290
uint32_t tripletsLevel
Definition: song.h:140
Instrument * changeInstrumentType(Instrument *oldInstrument, int newInstrumentType)
Definition: song.cpp:3888
void setClipLength(Clip *clip, uint32_t newLength, Action *action, bool mayReSyncClip=true)
Definition: song.cpp:767
int getMaxMIDIChannelSuffix(int channel)
Definition: song.cpp:2380
Clip * replaceInstrumentClipWithAudioClip(Clip *oldClip, int clipIndex)
Definition: song.cpp:4459
bool mayMoveModeNote(int16_t yVisualWithinOctave, int8_t newOffset)
Definition: song.cpp:629
Clip * getPendingOverdubWithOutput(Output *output)
Definition: song.cpp:4353
void changeMusicalMode(uint8_t yVisualWithinOctave, int8_t change)
Definition: song.cpp:565
int32_t getLoopLength()
Definition: song.cpp:4613
uint32_t getBarLength()
Definition: song.cpp:4560
void moveInstrumentToHibernationList(Instrument *instrument)
Definition: song.cpp:2700
uint32_t getTimePerTimerTickRounded()
Definition: song.cpp:2468
Output * getOutputFromIndex(int index)
Definition: song.cpp:2854
int convertSyncLevelFromFileValueToInternalValue(int fileValue)
Definition: song.cpp:4634
AudioOutput * getAudioOutputFromName(String *name)
Definition: song.cpp:2786
void deleteClipObject(Clip *clip, bool songBeingDestroyedToo=false, int instrumentRemovalInstruction=INSTRUMENT_REMOVAL_DELETE_OR_HIBERNATE_IF_UNUSED)
Definition: song.cpp:2358
void setHibernatingMIDIInstrument(MIDIInstrument *newInstrument)
Definition: song.cpp:3511
void changeSwingInterval(int newValue)
Definition: song.cpp:4514
void grabVelocityToLevelFromMIDIDeviceAndSetupPatchingForAllParamManagersForDrum(MIDIDevice *device, SoundDrum *drum, Kit *kit)
Definition: song.cpp:2105
Instrument * firstHibernatingInstrument
Definition: song.h:129
Clip * getLongestActiveClipWithMultipleOrFactorLength(int32_t targetLength, bool revertToAnyActiveClipIfNone=true, Clip *excludeClip=NULL)
Definition: song.cpp:3474
void deletingClipInstanceForClip(Output *output, Clip *clip, Action *action, bool shouldPickNewActiveClip)
Definition: song.cpp:3727
Instrument * getInstrumentFromPresetSlot(int instrumentType, int presetNumber, int presetSubSlotNumber, char const *name, char const *dirPath, bool searchHibernatingToo=true, bool searchNonHibernating=true)
Definition: song.cpp:2799
void deleteHibernatingMIDIInstrument()
Definition: song.cpp:3517
bool isPlayingAutomationNow()
Definition: song.cpp:4567
void removeYNoteFromMode(int yNoteWithinOctave)
Definition: song.cpp:651
bool anyClipsSoloing
Definition: song.h:220
TimelineCounter * getTimelineCounterToRecordTo()
Definition: song.cpp:4617
uint8_t swingInterval
Definition: song.h:155
void loadCrucialSamplesOnly()
Definition: song.cpp:1743
void reassessWhetherAnyOutputsSoloingInArrangement()
Definition: song.cpp:2874
int insideWorldTickMagnitudeOffsetFromBPM
Definition: song.h:152
void replaceInstrument(Instrument *oldInstrument, Instrument *newInstrument, bool keepNoteRowsWithMIDIInput=true)
Definition: song.cpp:2570
void deleteHibernatingInstrumentWithSlot(int instrumentType, char const *name)
Definition: song.cpp:2748
void resyncLFOsAndArpeggiators()
Definition: song.cpp:1913
bool tripletsOn
Definition: song.h:139
bool yNoteIsYVisualWithinOctave(int yNote, int yVisualWithinOctave)
Definition: song.cpp:541
void assertActiveness(ModelStackWithTimelineCounter *modelStack, int32_t endInstanceAtTime=-1)
Definition: song.cpp:3241
void endInstancesOfActiveClips(int32_t pos, bool detachClipsToo=false)
Definition: song.cpp:3638
int getLowestSectionWithNoSessionClipForOutput(Output *output)
Definition: song.cpp:3222
int songViewYScroll
Definition: song.h:170
bool paramsInAutomationMode
Definition: song.h:184
int getCurrentPresetScale()
Definition: song.cpp:2286
int32_t reverbCompressorAttack
Definition: song.h:309
void grabVelocityToLevelFromMIDIDeviceAndSetupPatchingForEverything(MIDIDevice *device)
Definition: song.cpp:2153
void markAllInstrumentsAsEdited()
Definition: song.cpp:2776
int insideWorldTickMagnitude
Definition: song.h:149
void getNoteLengthName(char *text, uint32_t noteLength, bool clarifyPerColumn=false)
Definition: song.cpp:4139
int convertSyncLevelFromInternalValueToFileValue(int internalValue)
Definition: song.cpp:4646
void setRootNote(int newRootNote, InstrumentClip *clipToAvoidAdjustingScrollFor=NULL)
Definition: song.cpp:406
bool getAnyOutputsSoloingInArrangement()
Definition: song.cpp:2884
bool doesNonAudioSlotHaveActiveClipInSession(int instrumentType, int slot, int subSlot=-1)
Definition: song.cpp:3167
float reverbRoomSize
Definition: song.h:303
void deleteOrAddToHibernationListOutput(Output *output)
Definition: song.cpp:2662
uint32_t getInputTickScale()
Definition: song.cpp:704
int8_t subSlot
Definition: song.h:165
bool areAllClipsInSectionPlaying(int section)
Definition: song.cpp:689
bool backtrackingCouldLoopBackToEnd()
Definition: song.cpp:4571
void stopAllMIDIAndGateNotesPlaying()
Definition: song.cpp:3539
void deleteOrHibernateOutputIfNoClips(Output *output)
Definition: song.cpp:2734
void ensureAllInstrumentsHaveAClipOrBackedUpParamManager(char const *errorMessageNormal, char const *errorMessageHibernating)
Definition: song.cpp:3570
Clip * createPendingNextOverdubBelowClip(Clip *clip, int clipIndex, int newOverdubNature)
Definition: song.cpp:4380
void setupPatchingForAllParamManagersForInstrument(SoundInstrument *sound)
Definition: song.cpp:2029
bool hasAnySwing()
Definition: song.cpp:1909
NoteRow * findNoteRowForDrum(Kit *kit, Drum *drum, Clip *stopTraversalAtClip=NULL)
Definition: song.cpp:1921
void setupPatchingForAllParamManagersForDrum(SoundDrum *drum)
Definition: song.cpp:1964
void clearArrangementBeyondPos(int32_t pos, Action *action)
Definition: song.cpp:3692
bool mayDoubleTempo()
Definition: song.cpp:281
void reassessWhetherAnyClipsSoloing()
Definition: song.cpp:2416
bool hasAnyPendingNextOverdubs()
Definition: song.cpp:4405
ClipArray sessionClips
Definition: song.h:125
Instrument * getNonAudioInstrumentToSwitchTo(int newInstrumentType, int availabilityRequirement, int16_t newSlot, int8_t newSubSlot, bool *instrumentWasAlreadyInSong)
Definition: song.cpp:4154
int32_t reverbCompressorShape
Definition: song.h:308
int32_t unautomatedParamValues[MAX_NUM_UNPATCHED_PARAMS]
Definition: song.h:188
void removeSessionClip(Clip *clip, int clipIndex, bool forceClipsAboveToMoveVertically=false)
Definition: song.cpp:4206
void deleteBackedUpParamManagersForModControllable(ModControllableAudio *modControllable)
Definition: song.cpp:3136
bool affectEntire
Definition: song.h:168
void addMajorDependentModeNotes(uint8_t i, bool preferHigher, bool notesWithinOctavePresent[])
Definition: song.cpp:521
int arrangementYScroll
Definition: song.h:171
uint64_t timePerTimerTickBig
Definition: song.h:142
Clip * currentClip
Definition: song.h:131
void deleteOutputThatIsInMainList(Output *output, bool stopAnyAuditioningFirst=true)
Definition: song.cpp:2496
void deactivateAnyArrangementOnlyClips()
Definition: song.cpp:3442
void deleteOrHibernateOutput(Output *output)
Definition: song.cpp:2677
bool inClipMinderViewOnLoad
Definition: song.h:186
void setTempoFromNumSamples(double newTempoSamples, bool shouldLogAction)
Definition: song.cpp:2325
void addModeNote(uint8_t modeNote)
Definition: song.cpp:515
ModelStackWithTimelineCounter * setupModelStackWithCurrentClip(void *memory)
Definition: song.cpp:4704
int removeOutputFromMainList(Output *output, bool stopAnyAuditioningFirst=true)
Definition: song.cpp:2507
int getYVisualFromYNote(int yNote, bool inKeyMode)
Definition: song.cpp:604
bool deletePendingOverdubs(Output *onlyWithOutput=NULL, int *originalClipIndex=NULL, bool createConsequencesForOtherLinearlyRecordingClips=false)
Definition: song.cpp:4310
String name
Definition: song.h:166
int32_t reverbCompressorRelease
Definition: song.h:310
Output * getNextAudioOutput(int offset, Output *oldOutput, int availabilityRequirement)
Definition: song.cpp:4074
Clip * syncScalingClip
Definition: song.h:207
void addOutput(Output *output, bool atStart=true)
Definition: song.cpp:2473
Output * firstOutput
Definition: song.h:128
Definition: sounddrum.h:29
Definition: sound.h:66
Definition: soundinstrument.h:31
Definition: AudioSample.h:25
Definition: DString.h:25
Definition: TimelineCounter.h:29
ParamManagerForTimeline paramManager
Definition: TimelineCounter.h:47
#define MAX_NUM_SECTIONS
Definition: definitions.h:542
#define MAX_NUM_UNPATCHED_PARAMS
Definition: definitions.h:477
#define INSTRUMENT_REMOVAL_DELETE_OR_HIBERNATE_IF_UNUSED
Definition: definitions.h:732
Song * preLoadedSong
Definition: Deluge.cpp:124
Song * currentSong
Definition: Deluge.cpp:123
Definition: song.h:63
ModControllableAudio * modControllable
Definition: song.h:64
Clip * clip
Definition: song.h:65
ParamManager paramManager
Definition: song.h:66