Deluge Firmware 1.3.0
Build date: 2026.03.02
Loading...
Searching...
No Matches
song.h
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#pragma once
19
20#include "definitions_cxx.hpp"
21#include "gui/menu_item/reverb/model.h"
22#include "io/midi/learned_midi.h"
23#include "model/clip/clip.h"
24#include "model/clip/clip_array.h"
25#include "model/global_effectable/global_effectable_for_song.h"
26#include "model/instrument/instrument.h"
27#include "model/output.h"
28#include "model/scale/musical_key.h"
29#include "model/scale/note_set.h"
30#include "model/scale/preset_scales.h"
31#include "model/scale/scale_change.h"
32#include "model/scale/scale_mapper.h"
33#include "model/sync.h"
34#include "model/timeline_counter.h"
35#include "modulation/params/param.h"
36#include "modulation/params/param_manager.h"
37#include "storage/flash_storage.h"
38#include "util/container/array/ordered_resizeable_array_with_multi_word_key.h"
39#include "util/d_string.h"
40
41class MidiCommand;
42class Clip;
43class AudioClip;
44class Instrument;
45class InstrumentClip;
46class Synth;
48class Instrument;
50class Drum;
51class SoundInstrument;
52class SoundDrum;
53class Action;
54class ArrangementRow;
57class Kit;
58class MIDIInstrument;
59class NoteRow;
60class Output;
61class AudioOutput;
62class ModelStack;
64Clip* getCurrentClip();
65InstrumentClip* getCurrentInstrumentClip();
66AudioClip* getCurrentAudioClip();
67Output* getCurrentOutput();
68Kit* getCurrentKit();
69Instrument* getCurrentInstrument();
70OutputType getCurrentOutputType();
71
72class Section {
73public:
74 LearnedMIDI launchMIDICommand;
75 int16_t numRepetitions;
76
77 Section() { numRepetitions = 0; }
78};
79
81 ModControllableAudio* modControllable;
82 Clip* clip;
83 ParamManager paramManager;
84};
85
86#define MAX_NOTES_CHORD_MEM 10
87
88enum SessionMacroKind : int8_t {
89 NO_MACRO = 0,
90 CLIP_LAUNCH,
91 OUTPUT_CYCLE,
92 SECTION,
93 NUM_KINDS,
94};
95
97 SessionMacroKind kind{NO_MACRO};
98 Clip* clip{nullptr};
99 Output* output{nullptr};
100 uint8_t section{0};
101};
102
103class Song final : public TimelineCounter {
104public:
105 Song();
106 ~Song() override;
107 bool mayDoubleTempo();
108 bool ensureAtLeastOneSessionClip();
109 void transposeAllScaleModeClips(int32_t interval);
110 void transposeAllScaleModeClips(int32_t offset, bool chromatic);
111 bool anyScaleModeClips();
112 void changeMusicalMode(uint8_t yVisualWithinOctave, int8_t change);
113 void rotateMusicalMode(int8_t change);
114 void replaceMusicalMode(const ScaleChange& changes, bool affectMIDITranspose);
115 int32_t getYVisualFromYNote(int32_t yNote, bool inKeyMode);
116 int32_t getYVisualFromYNote(int32_t yNote, bool inKeyMode, const MusicalKey& key);
117 int32_t getYNoteFromYVisual(int32_t yVisual, bool inKeyMode);
118 int32_t getYNoteFromYVisual(int32_t yVisual, bool inKeyMode, const MusicalKey& key);
119 bool mayMoveModeNote(int16_t yVisualWithinOctave, int8_t newOffset);
120 ParamManagerForTimeline* findParamManagerForDrum(Kit* kit, Drum* drum, Clip* stopTraversalAtClip = nullptr);
121 void setupPatchingForAllParamManagersForDrum(SoundDrum* drum);
122 void setupPatchingForAllParamManagersForInstrument(SoundInstrument* sound);
123 void grabVelocityToLevelFromMIDICableAndSetupPatchingForAllParamManagersForInstrument(MIDICable& cable,
124 SoundInstrument* instrument);
125 void grabVelocityToLevelFromMIDICableAndSetupPatchingForAllParamManagersForDrum(MIDICable& cable, SoundDrum* drum,
126 Kit* kit);
127 void grabVelocityToLevelFromMIDICableAndSetupPatchingForEverything(MIDICable& cable);
128 void getCurrentRootNoteAndScaleName(StringBuf& buffer);
129 void displayCurrentRootNoteAndScaleName();
130
131 // Scale-related methods
132
134 Scale cycleThroughScales();
136 Scale getCurrentScale();
139 Scale setScale(Scale newScale);
142 bool setScaleNotes(NoteSet newScale);
146 bool hasUserScale();
149 void setRootNote(int32_t newRootNote, InstrumentClip* clipToAvoidAdjustingScrollFor = nullptr);
152
153 void setTempoFromNumSamples(double newTempoSamples, bool shouldLogAction);
154 void setupDefault();
155 void setBPM(float tempoBPM, bool shouldLogAction);
156 void setTempoFromParams(int32_t magnitude, int8_t whichValue, bool shouldLogAction);
157 void deleteSoundsWhichWontSound();
158 void writeTemplateSong(const char* templateSong);
159 void
160 deleteClipObject(Clip* clip, bool songBeingDestroyedToo = false,
161 InstrumentRemoval instrumentRemovalInstruction = InstrumentRemoval::DELETE_OR_HIBERNATE_IF_UNUSED);
162 int32_t getMaxMIDIChannelSuffix(int32_t channel);
163 void addOutput(Output* output, bool atStart = true);
164 void deleteOutputThatIsInMainList(Output* output, bool stopAnyAuditioningFirst = true);
165 void markAllInstrumentsAsEdited();
166 Instrument* getInstrumentFromPresetSlot(OutputType outputType, int32_t presetNumber, int32_t presetSubSlotNumber,
167 char const* name, char const* dirPath, bool searchHibernatingToo = true,
168 bool searchNonHibernating = true);
169 AudioOutput* getAudioOutputFromName(String* name);
170 void setupPatchingForAllParamManagers();
171 void replaceInstrument(Instrument* oldInstrument, Instrument* newInstrument, bool keepNoteRowsWithMIDIInput = true);
172 void stopAllMIDIAndGateNotesPlaying();
173 void stopAllAuditioning();
174 void deleteOrHibernateOutput(Output* output);
175 Instrument* getNonAudioInstrumentToSwitchTo(OutputType newOutputType, Availability availabilityRequirement,
176 int16_t newSlot, int8_t newSubSlot, bool* instrumentWasAlreadyInSong);
177 void removeSessionClipLowLevel(Clip* clip, int32_t clipIndex);
178 void changeSwingInterval(int32_t newValue);
179 int32_t convertSyncLevelFromFileValueToInternalValue(int32_t fileValue);
180 int32_t convertSyncLevelFromInternalValueToFileValue(int32_t internalValue);
181 String getSongFullPath();
182 void setSongFullPath(const char* fullPath);
183 int32_t getInputTickMagnitude() const { return insideWorldTickMagnitude + insideWorldTickMagnitudeOffsetFromBPM; }
184
185 GlobalEffectableForSong globalEffectable;
186
187 ClipArray sessionClips;
188 ClipArray arrangementOnlyClips;
189
190 Output* firstOutput;
192 firstHibernatingInstrument; // All Instruments have inValidState set to false when they're added to this list
193
194 OrderedResizeableArrayWithMultiWordKey backedUpParamManagers;
195
196 uint32_t xZoom[2]; // Set default zoom at max zoom-out;
197 int32_t xScroll[2]; // Leave this as signed
198 int32_t xScrollForReturnToSongView;
199 int32_t xZoomForReturnToSongView;
200 bool tripletsOn;
201 uint32_t tripletsLevel; // The number of ticks in one of the three triplets
202
203 uint64_t timePerTimerTickBig;
204 int32_t divideByTimePerTimerTick;
205
206 // How many orders of magnitude faster internal ticks are going than input ticks. Used in combination with
207 // inputTickScale, which is usually 1, but is different if there's an inputTickScaleClip. So, e.g. if
208 // insideWorldTickMagnitude is 1, this means the inside world is spinning twice as fast as the external world, so
209 // MIDI sync coming in representing an 8th-note would be interpreted internally as a quarter-note (because two
210 // internal 8th-notes would have happened, twice as fast, making a quarter-note)
211 int32_t insideWorldTickMagnitude;
212
213 // Sometimes, we'll do weird stuff to insideWorldTickMagnitude for sync-scaling, which would make BPM values look
214 // weird. So, we keep insideWorldTickMagnitudeOffsetFromBPM
215 int32_t insideWorldTickMagnitudeOffsetFromBPM;
216
217 int8_t swingAmount;
218 uint8_t swingInterval;
219
220 Section sections[kMaxNumSections];
221
222 MusicalKey key;
223 std::bitset<NUM_PRESET_SCALES> disabledPresetScales;
224
225 uint16_t slot;
226 int8_t subSlot;
227 String name;
228
229 bool affectEntire;
230
231 SessionLayoutType sessionLayout = FlashStorage::defaultSessionLayout;
232 int32_t songGridScrollX = 0;
233 int32_t songGridScrollY = 0;
234 int32_t songViewYScroll;
235 int32_t arrangementYScroll;
236
237 uint8_t sectionToReturnToAfterSongEnd;
238
239 bool wasLastInArrangementEditor;
240 int32_t lastClipInstanceEnteredStartPos; // -1 means we are not "inside" an arrangement. While we're in the
241 // ArrangementEditor, it's 0
242
243 bool arrangerAutoScrollModeActive;
244
245 MIDIInstrument* hibernatingMIDIInstrument;
246
247 bool outputClipInstanceListIsCurrentlyInvalid; // Set to true during scenarios like replaceInstrument(), to warn
248 // other functions not to look at Output::clipInstances
249
250 bool paramsInAutomationMode;
251
252 bool inClipMinderViewOnLoad; // Temp variable only valid while loading Song
253
254 int32_t unautomatedParamValues[deluge::modulation::params::kMaxNumUnpatchedParams];
255
256 String dirPath;
257
258 std::array<SessionMacro, 8> sessionMacros{};
259
260 bool getAnyClipsSoloing() const;
261 Clip* getCurrentClip();
262 void setCurrentClip(Clip* clip) {
263 if (currentClip != nullptr) {
264 previousClip = currentClip;
265 }
266 currentClip = clip;
267 }
268 uint32_t getInputTickScale();
269 Clip* getSyncScalingClip();
270 void setInputTickScaleClip(Clip* clip);
271 inline bool isFillModeActive() { return fillModeActive; }
272 void changeFillMode(bool on);
273 void loadNextSong();
274 void setClipLength(Clip* clip, uint32_t newLength, Action* action, bool mayReSyncClip = true);
275 void doubleClipLength(InstrumentClip* clip, Action* action = nullptr);
276 Clip* getClipWithOutput(Output* output, bool mustBeActive = false, Clip* excludeClip = nullptr);
277 Error readFromFile(Deserializer& reader);
278 void writeToFile();
279 void loadAllSamples(bool mayActuallyReadFiles = true);
280 void renderAudio(std::span<StereoSample> outputBuffer, int32_t* reverbBuffer, int32_t sideChainHitPending);
281 bool isYNoteAllowed(int32_t yNote, bool inKeyMode);
282 Clip* syncScalingClip;
283 void setTimePerTimerTick(uint64_t newTimeBig, bool shouldLogAction = false);
284 bool hasAnySwing();
285 void resyncLFOs();
286 void ensureInaccessibleParamPresetValuesWithoutKnobsAreZero(Sound* sound);
287 bool areAllClipsInSectionPlaying(int32_t section);
288 void removeYNoteFromMode(int32_t yNoteWithinOctave);
289 void turnSoloingIntoJustPlaying(bool getRidOfArmingToo = true);
290 void reassessWhetherAnyClipsSoloing();
291 float getTimePerTimerTickFloat();
292 uint32_t getTimePerTimerTickRounded();
293 int32_t getNumOutputs();
294 Clip* getNextSessionClipWithOutput(int32_t offset, Output* output, Clip* prevClip);
295 bool anyClipsSoloing;
296
297 ParamManager* getBackedUpParamManagerForExactClip(ModControllableAudio* modControllable, Clip* clip,
298 ParamManager* stealInto = nullptr);
299 ParamManager* getBackedUpParamManagerPreferablyWithClip(ModControllableAudio* modControllable, Clip* clip,
300 ParamManager* stealInto = nullptr);
301 void backUpParamManager(ModControllableAudio* modControllable, Clip* clip, ParamManagerForTimeline* paramManager,
302 bool shouldStealExpressionParamsToo = false);
303 void moveInstrumentToHibernationList(Instrument* instrument);
304 void deleteOrHibernateOutputIfNoClips(Output* output);
305 void removeInstrumentFromHibernationList(Instrument* instrument);
306 bool doesOutputHaveActiveClipInSession(Output* output);
307 bool doesNonAudioSlotHaveActiveClipInSession(OutputType outputType, int32_t slot, int32_t subSlot = -1);
308 bool doesOutputHaveAnyClips(Output* output);
309 void deleteBackedUpParamManagersForClip(Clip* clip);
310 void deleteBackedUpParamManagersForModControllable(ModControllableAudio* modControllable);
311 void deleteHibernatingInstrumentWithSlot(OutputType outputType, char const* name);
312 void loadCrucialSamplesOnly();
313 Clip* getSessionClipWithOutput(Output* output, int32_t requireSection = -1, Clip* excludeClip = nullptr,
314 int32_t* clipIndex = nullptr, bool excludePendingOverdubs = false);
315 void restoreClipStatesBeforeArrangementPlay();
316 void deleteOrAddToHibernationListOutput(Output* output);
317 int32_t getLowestSectionWithNoSessionClipForOutput(Output* output);
318 void assertActiveness(ModelStackWithTimelineCounter* modelStack, int32_t endInstanceAtTime = -1);
319 [[nodiscard]] bool isClipActive(Clip const* clip) const;
320 void sendAllMIDIPGMs();
321 void sortOutWhichClipsAreActiveWithoutSendingPGMs(ModelStack* modelStack, int32_t playbackWillStartInArrangerAtPos);
322 void deactivateAnyArrangementOnlyClips();
323 Clip* getLongestClip(bool includePlayDisabled, bool includeArrangementOnly);
324 Clip* getLongestActiveClipWithMultipleOrFactorLength(int32_t targetLength, bool revertToAnyActiveClipIfNone = true,
325 Clip* excludeClip = nullptr);
326 int32_t getOutputIndex(Output* output);
327 void setHibernatingMIDIInstrument(MIDIInstrument* newInstrument);
328 void deleteHibernatingMIDIInstrument();
329 MIDIInstrument* grabHibernatingMIDIInstrument(int32_t newSlot, int32_t newSubSlot);
330 NoteRow* findNoteRowForDrum(Kit* kit, Drum* drum, Clip* stopTraversalAtClip = nullptr);
331
332 bool anyOutputsSoloingInArrangement;
333 bool getAnyOutputsSoloingInArrangement();
334 void reassessWhetherAnyOutputsSoloingInArrangement();
335 bool isOutputActiveInArrangement(Output* output);
336 Output* getOutputFromIndex(int32_t index);
337 void ensureAllInstrumentsHaveAClipOrBackedUpParamManager(char const* errorMessageNormal,
338 char const* errorMessageHibernating);
339 Error placeFirstInstancesOfActiveClips(int32_t pos);
340 void endInstancesOfActiveClips(int32_t pos, bool detachClipsToo = false);
341 void clearArrangementBeyondPos(int32_t pos, Action* action);
342 void deletingClipInstanceForClip(Output* output, Clip* clip, Action* action, bool shouldPickNewActiveClip);
343 bool arrangementHasAnyClipInstances();
344 void resumeClipsClonedForArrangementRecording();
345 void setParamsInAutomationMode(bool newState);
346 bool shouldOldOutputBeReplaced(Clip* clip, Availability* availabilityRequirement = nullptr);
347 Output* navigateThroughPresetsForInstrument(Output* output, int32_t offset);
348 void instrumentSwapped(Instrument* newInstrument);
349 Instrument* changeOutputType(Instrument* oldInstrument, OutputType newOutputType);
350 AudioOutput* getFirstAudioOutput();
351 AudioOutput* createNewAudioOutput(Output* replaceOutput = nullptr);
353 void getNoteLengthName(StringBuf& buffer, uint32_t noteLength, char const* notesString = "-notes",
354 bool clarifyPerColumn = false) const;
355 void replaceOutputLowLevel(Output* newOutput, Output* oldOutput);
356 void removeSessionClip(Clip* clip, int32_t clipIndex, bool forceClipsAboveToMoveVertically = false);
357 bool deletePendingOverdubs(Output* onlyWithOutput = nullptr, int32_t* originalClipIndex = nullptr,
358 bool createConsequencesForOtherLinearlyRecordingClips = false);
359 Clip* getPendingOverdubWithOutput(Output* output);
360 Clip* getClipWithOutputAboutToBeginLinearRecording(Output* output);
361 Clip* createPendingNextOverdubBelowClip(Clip* clip, int32_t clipIndex, OverDubType newOverdubNature);
362 bool hasAnyPendingNextOverdubs();
363 Output* getNextAudioOutput(int32_t offset, Output* oldOutput, Availability availabilityRequirement);
364 void deleteOutput(Output* output);
365 void cullAudioClipVoice();
366 int32_t getYScrollSongViewWithoutPendingOverdubs();
367 int32_t removeOutputFromMainList(Output* output, bool stopAnyAuditioningFirst = true);
368 void swapClips(Clip* newClip, Clip* oldClip, int32_t clipIndex);
369 Clip* replaceInstrumentClipWithAudioClip(Clip* oldClip, int32_t clipIndex);
370 void setDefaultVelocityForAllInstruments(uint8_t newDefaultVelocity);
371 void midiCableBendRangeUpdatedViaMessage(ModelStack* modelStack, MIDICable& cable, int32_t channelOrZone,
372 int32_t whichBendRange, int32_t bendSemitones);
373 Error addInstrumentsToFileItems(OutputType outputType);
374
375 uint32_t getQuarterNoteLength();
376 uint32_t getBarLength();
377 uint32_t getSixteenthNoteLength();
378 ModelStackWithThreeMainThings* setupModelStackWithSongAsTimelineCounter(void* memory);
379 ModelStackWithTimelineCounter* setupModelStackWithCurrentClip(void* memory);
380 ModelStackWithThreeMainThings* addToModelStack(ModelStack* modelStack);
383 ModelStackWithAutoParam* getModelStackWithParam(ModelStackWithThreeMainThings* modelStack, int32_t paramID);
384
385 // TimelineCounter implementation
386 [[nodiscard]] int32_t getLastProcessedPos() const override;
387 [[nodiscard]] uint32_t getLivePos() const override;
388 [[nodiscard]] int32_t getLoopLength() const override;
389 [[nodiscard]] bool isPlayingAutomationNow() const override;
390 [[nodiscard]] bool backtrackingCouldLoopBackToEnd() const override;
391 [[nodiscard]] int32_t getPosAtWhichPlaybackWillCut(ModelStackWithTimelineCounter const* modelStack) const override;
392 void getActiveModControllable(ModelStackWithTimelineCounter* modelStack) override;
393 void expectEvent() override;
394 TimelineCounter* getTimelineCounterToRecordTo() override;
395
396 // Reverb params to be stored here between loading and song being made the active one
397 dsp::Reverb::Model model;
398 float reverbRoomSize;
399 float reverbHPF;
400 float reverbLPF;
401 float reverbDamp;
402 float reverbWidth;
403 int32_t reverbPan;
404 int32_t reverbSidechainVolume;
405 int32_t reverbSidechainShape;
406 int32_t reverbSidechainAttack;
407 int32_t reverbSidechainRelease;
408 SyncLevel reverbSidechainSync;
409
410 // START ~ new Automation Arranger View Variables
411 int32_t lastSelectedParamID; // last selected Parameter to be edited in Automation Arranger View
413 lastSelectedParamKind; // 0 = patched, 1 = unpatched, 2 = global effectable, 3 = none
414 int32_t lastSelectedParamShortcutX;
415 int32_t lastSelectedParamShortcutY;
416 int32_t lastSelectedParamArrayPosition;
417 // END ~ new Automation Arranger View Variables
418
419 // Song level transpose control (encoder actions)
420 int32_t masterTransposeInterval;
421 void transpose(int32_t interval);
422 void adjustMasterTransposeInterval(int32_t interval);
423 void displayMasterTransposeInterval();
424
425 // MIDI controlled song transpose
426 bool hasBeenTransposed = 0;
427 int16_t transposeOffset = 0;
428
429 int32_t countAudioClips() const;
430
431 // Chord memory
432 uint8_t chordMemNoteCount[kDisplayHeight] = {0};
433 uint8_t chordMem[kDisplayHeight][MAX_NOTES_CHORD_MEM] = {0};
434
435 // Tempo automation
436 void clearTempoAutomation();
437 void updateBPMFromAutomation();
438
439 float calculateBPM() {
440 float timePerTimerTick = getTimePerTimerTickFloat();
441 return calculateBPM(timePerTimerTick);
442 }
443 float calculateBPM(float timePerTimerTick) {
444
445 if (insideWorldTickMagnitude > 0) {
446 timePerTimerTick *= ((uint32_t)1 << (insideWorldTickMagnitude));
447 }
448 float tempoBPM = (float)110250 / timePerTimerTick;
449 if (insideWorldTickMagnitude < 0) {
450 tempoBPM *= ((uint32_t)1 << (-insideWorldTickMagnitude));
451 }
452 return tempoBPM;
453 }
454
455 int8_t defaultAudioClipOverdubOutputCloning = -1; // -1 means no default set
456
457 // Threshold
458 void changeThresholdRecordingMode(int8_t offset);
459 void displayThresholdRecordingMode();
460 ThresholdRecordingMode thresholdRecordingMode;
461
462private:
463 ScaleMapper scaleMapper;
464 NoteSet userScaleNotes;
465 bool fillModeActive;
466 Clip* currentClip = nullptr;
467 Clip* previousClip = nullptr; // for future use, maybe finding an instrument clip or something
468 void inputTickScalePotentiallyJustChanged(uint32_t oldScale);
469 Error readClipsFromFile(Deserializer& reader, ClipArray* clipArray);
470 void addInstrumentToHibernationList(Instrument* instrument);
471 void deleteAllBackedUpParamManagers(bool shouldAlsoEmptyVector = true);
472 void deleteAllBackedUpParamManagersWithClips();
473 void deleteAllOutputs(Output** prevPointer);
474 void setupClipIndexesForSaving();
475 void setBPMInner(float tempoBPM, bool shouldLogAction);
476 void clearTempoAutomation(float tempoBPM);
477 int32_t intBPM{0};
478};
479
480extern Song* currentSong;
481extern Song* preLoadedSong;
Definition action.h:75
Definition arpeggiator.h:48
Definition audio_clip.h:35
Definition audio_output.h:37
Definition clip_array.h:25
Definition clip.h:46
Definition drum.h:44
Definition global_effectable_for_song.h:22
Definition instrument_clip.h:48
Definition instrument.h:45
Definition kit.h:34
Definition learned_midi.h:30
A MIDI cable connection. Stores all state specific to a given cable and its contained ports and chann...
Definition midi_device.h:96
Definition midi_instrument.h:37
Definition mod_controllable_audio.h:47
Definition model_stack.h:129
Definition model_stack.h:123
Definition musical_key.h:10
Definition note_row.h:99
Definition note_set.h:20
Definition ordered_resizeable_array_with_multi_word_key.h:25
Definition output.h:81
Definition param_manager.h:174
Definition param_manager.h:45
Definition scale_change.h:5
Definition song.h:72
Definition song.h:103
Scale getCurrentScale()
Returns current scale.
Definition song.cpp:2994
Scale setScale(Scale newScale)
Returns CUSTOM_SCALE_WITH_MORE_THAN_7_NOTES we can't use the newScale.
Definition song.cpp:2946
void learnScaleFromCurrentNotes()
Learns a user scale from notes in scale mode clips.
ModelStackWithAutoParam * getModelStackWithParam(ModelStackWithThreeMainThings *modelStack, int32_t paramID)
Definition song.cpp:5889
void setRootNote(int32_t newRootNote, InstrumentClip *clipToAvoidAdjustingScrollFor=nullptr)
Definition song.cpp:582
bool hasUserScale()
Returns true if the song has a user scale.
Definition song.cpp:2990
void getNoteLengthName(StringBuf &buffer, uint32_t noteLength, char const *notesString="-notes", bool clarifyPerColumn=false) const
buffer must have at least 5 characters on 7seg, or 30 for OLED
Definition song.cpp:5148
NoteSet notesInScaleModeClips()
Returns a NoteSet with all notes currently in used in scale mdoe clips.
Definition song.cpp:572
int32_t getLastProcessedPos() const override
Get the tick at which this timeline counter last did anything.
Definition song.cpp:5658
bool setScaleNotes(NoteSet newScale)
Definition song.cpp:2959
uint32_t getLivePos() const override
Get the current tick of this timeline counter relative to the playback handler.
Definition song.cpp:5646
Scale cycleThroughScales()
Changes to next applicable scale.
Definition song.cpp:2930
Definition sound_drum.h:28
Definition sound_instrument.h:30
Definition d_stringbuf.h:16
Definition d_string.h:41
Kind
Definition param.h:42
Definition song.h:80
Definition song.h:96