20#include "hid/display/display.h"
21#include "modulation/params/param.h"
22#include "modulation/params/param_manager.h"
145 inline bool timelineCounterIsSet()
const {
return timelineCounter; }
148#if ALPHA_OR_BETA_VERSION
149 if (!timelineCounter) {
150 FREEZE_WITH_ERROR(
"E369");
153 return timelineCounter;
156 inline TimelineCounter* getTimelineCounterAllowNull()
const {
return timelineCounter; }
158 inline void setTimelineCounter(
TimelineCounter* newTimelineCounter) { timelineCounter = newTimelineCounter; }
173 inline TimelineCounter* getTimelineCounter()
const {
return toWithTimelineCounter()->getTimelineCounter(); }
176 return toWithTimelineCounter()->getTimelineCounterAllowNull();
180 toWithTimelineCounter()->setTimelineCounter(newTimelineCounter);
183 inline bool timelineCounterIsSet()
const {
return toWithTimelineCounter()->timelineCounterIsSet(); }
191 inline void setNoteRow(
NoteRow* newNoteRow, int32_t newNoteRowId) {
192 noteRow = newNoteRow;
193 noteRowId = newNoteRowId;
196 inline NoteRow* getNoteRow()
const {
197#if ALPHA_OR_BETA_VERSION
199 FREEZE_WITH_ERROR(
"E379");
205 inline NoteRow* getNoteRowAllowNull()
const {
return noteRow; }
207 inline void setNoteRow(
NoteRow* newNoteRow) { noteRow = newNoteRow; }
214 int32_t getLoopLength()
const;
215 int32_t getRepeatCount()
const;
216 int32_t getLastProcessedPos()
const;
217 int32_t getLivePos()
const;
218 bool isCurrentlyPlayingReversed()
const;
219 int32_t getPosAtWhichPlaybackWillCut()
const;
241 int32_t newParamId,
AutoParam* newAutoParam)
const;
276#define SOUND_FLAG_SOURCE_0_ACTIVE_DISREGARDING_MISSING_SAMPLE 0
277#define SOUND_FLAG_SOURCE_1_ACTIVE_DISREGARDING_MISSING_SAMPLE 1
278#define SOUND_FLAG_SOURCE_0_ACTIVE 2
279#define SOUND_FLAG_SOURCE_1_ACTIVE 3
280#define NUM_SOUND_FLAGS 4
285#define FLAG_SHOULDNT_BE_NEEDED 3
289 uint8_t soundFlags[NUM_SOUND_FLAGS];
291 bool checkSourceEverActiveDisregardingMissingSample(int32_t s);
292 bool checkSourceEverActive(int32_t s);
295#define MODEL_STACK_MAX_SIZE sizeof(ModelStackWithAutoParam)
299inline ModelStack* setupModelStackWithSong(
void* memory,
Song* newSong) {
301 modelStack->song = newSong;
309 modelStack->song = newSong;
310 modelStack->setTimelineCounter(newTimelineCounter);
319 return setupModelStackWithSong(memory, newSong)
320 ->addTimelineCounter(newTimelineCounter)
321 ->addNoteRow(0,
nullptr)
322 ->addModControllable(newModControllable);
326setupModelStackWithThreeMainThingsButNoNoteRow(
void* memory,
Song* newSong,
ModControllable* newModControllable,
329 return setupModelStackWithSong(memory, newSong)
330 ->addTimelineCounter(newTimelineCounter)
331 ->addNoteRow(0,
nullptr)
339 return setupModelStackWithSong(memory, newSong)
340 ->addTimelineCounter(newTimelineCounter)
341 ->addNoteRow(noteRowId, noteRow)
346 ModelStackWithTimelineCounter* toReturn = (ModelStackWithTimelineCounter*)
this;
347 toReturn->setTimelineCounter(newTimelineCounter);
352 ModelStackWithNoteRowId* toReturn = (ModelStackWithNoteRowId*)
this;
353 toReturn->noteRowId = noteRowId;
358 ModelStackWithNoteRow* toReturn = (ModelStackWithNoteRow*)
this;
359 toReturn->noteRowId = noteRowId;
360 toReturn->setNoteRow(noteRow);
365ModelStackWithTimelineCounter::addModControllableButNoNoteRow(
ModControllable* newModControllable)
const {
366 return addNoteRow(0,
nullptr)->addModControllable(newModControllable);
370ModelStackWithTimelineCounter::addOtherTwoThingsButNoNoteRow(
ModControllable* newModControllable,
372 return addNoteRow(0,
nullptr)->
addOtherTwoThings(newModControllable, newParamManager);
376ModelStackWithNoteRow::addModControllable(
ModControllable* newModControllable)
const {
377 ModelStackWithModControllable* toReturn = (ModelStackWithModControllable*)
this;
378 toReturn->modControllable = newModControllable;
388 toReturn->modControllable = newModControllable;
389 toReturn->paramManager = newParamManager;
396 toReturn->paramManager = newParamManager;
403ModelStackWithThreeMainThings::addParamCollection(
ParamCollection* newParamCollection,
405 ModelStackWithParamCollection* toReturn = (ModelStackWithParamCollection*)
this;
406 toReturn->paramCollection = newParamCollection;
407 toReturn->summary = newSummary;
414 ModelStackWithParamCollection* toReturn = (ModelStackWithParamCollection*)
this;
415 toReturn->summary = newSummary;
416 toReturn->paramCollection = newSummary->paramCollection;
421ModelStackWithThreeMainThings::addParamCollectionAndId(
ParamCollection* newParamCollection,
423 ModelStackWithParamId* toReturn = (ModelStackWithParamId*)
this;
424 toReturn->paramCollection = newParamCollection;
425 toReturn->summary = newSummary;
426 toReturn->paramId = newParamId;
434 ModelStackWithAutoParam* toReturn = (ModelStackWithAutoParam*)
this;
435 toReturn->paramCollection = newParamCollection;
436 toReturn->summary = newSummary;
437 toReturn->paramId = newParamId;
443 ModelStackWithParamId* toReturn = (ModelStackWithParamId*)
this;
444 toReturn->paramId = newParamId;
450 ModelStackWithAutoParam* toReturn = (ModelStackWithAutoParam*)
this;
451 toReturn->paramId = newParamId;
457 ModelStackWithAutoParam* toReturn = (ModelStackWithAutoParam*)
this;
463 ModelStackWithSoundFlags* toReturn = (ModelStackWithSoundFlags*)
this;
464 for (int32_t i = 0; i < NUM_SOUND_FLAGS; i++) {
465 toReturn->soundFlags[i] = FLAG_TBD;
471 ModelStackWithSoundFlags* toReturn = (ModelStackWithSoundFlags*)
this;
472#if ALPHA_OR_BETA_VERSION
473 for (int32_t i = i; i < NUM_SOUND_FLAGS; i++) {
474 toReturn->soundFlags[i] = FLAG_SHOULDNT_BE_NEEDED;
480void copyModelStack(
void* newMemory,
void const* oldMemory, int32_t size);
Definition auto_param.h:44
Definition mod_controllable.h:40
Definition model_stack.h:269
AutoParam * autoParam
Definition model_stack.h:273
Definition model_stack.h:225
Definition model_stack.h:164
Definition model_stack.h:189
ModelStackWithThreeMainThings * addOtherTwoThings(ModControllable *newModControllable, ParamManager *newParamManager) const
Definition model_stack.h:385
Definition model_stack.h:251
Definition model_stack.h:260
Definition model_stack.h:287
Definition model_stack.h:231
Definition model_stack.h:129
Definition model_stack.h:123
Definition param_collection_summary.h:24
Definition param_collection.h:39
Definition param_manager.h:174
Definition param_manager.h:45
Definition sound_drum.h:28
Definition timeline_counter.h:28
uint8_t ParamType
Definition param.h:65
Kind
Definition param.h:42