Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
param_collection.h
1/*
2 * Copyright © 2016-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#include <cstdint>
20
21#include "modulation/params/param.h"
22
24class Sound;
25class InstrumentClip;
26class Action;
27struct AutoParamState;
28class ParamNode;
29class AutoParam;
31class TimelineCounter;
32class Output;
33class Clip;
38
39class ParamCollection {
40public:
41 ParamCollection(int32_t newObjectSize, ParamCollectionSummary* summary);
42 virtual ~ParamCollection();
43
44 virtual void beenCloned(bool copyAutomation, int32_t reverseDirectionWithLength = 0) = 0;
45
47 virtual void tickSamples(int32_t numSamples, ModelStackWithParamCollection* modelStack) = 0;
48
50 virtual void tickTicks(int32_t numSamples, ModelStackWithParamCollection* modelStack) = 0;
51 virtual void setPlayPos(uint32_t pos, ModelStackWithParamCollection* modelStack, bool reversed);
52 virtual void playbackHasEnded(ModelStackWithParamCollection* modelStack) = 0;
53 virtual void grabValuesFromPos(uint32_t pos, ModelStackWithParamCollection* modelStack) = 0;
54 virtual void generateRepeats(ModelStackWithParamCollection* modelStack, uint32_t oldLength, uint32_t newLength,
55 bool shouldPingpong) = 0;
56 virtual void appendParamCollection(ModelStackWithParamCollection* modelStack,
57 ModelStackWithParamCollection* otherModelStack, int32_t oldLength,
58 int32_t reverseThisRepeatWithLength, bool pingpongingGenerally) = 0;
59 virtual void trimToLength(uint32_t newLength, ModelStackWithParamCollection* modelStack, Action* action,
60 bool maySetupPatching) = 0;
61 virtual void shiftHorizontally(ModelStackWithParamCollection* modelStack, int32_t amount,
62 int32_t effectiveLength) = 0;
63 virtual void processCurrentPos(ModelStackWithParamCollection* modelStack, int32_t ticksSinceLast, bool reversed,
64 bool didPingpong, bool mayInterpolate) = 0;
65 virtual void remotelySwapParamState(AutoParamState* state, ModelStackWithParamId* modelStack) = 0;
66 virtual void deleteAllAutomation(Action* action, ModelStackWithParamCollection* modelStack) = 0;
67 virtual void nudgeNonInterpolatingNodesAtPos(int32_t pos, int32_t offset, int32_t lengthBeforeLoop, Action* action,
68 ModelStackWithParamCollection* modelStack) = 0;
69 virtual void
70 notifyParamModifiedInSomeWay(ModelStackWithAutoParam const* modelStack, int32_t oldValue, bool automationChanged,
71 bool automatedBefore,
72 bool automatedNow); // Watch the heck out! This might delete the AutoParam in question.
73 virtual ModelStackWithAutoParam* getAutoParamFromId(
74 ModelStackWithParamId* modelStack,
75 bool allowCreation = false) = 0; // You must not pass this any child class of ModelStackWithThreeMoreThings
76 // (wait why again?). May return NULL
77
78 virtual bool mayParamInterpolate(int32_t paramId);
79 virtual bool shouldParamIndicateMiddleValue(ModelStackWithParamId const* modelStack) { return false; }
80 virtual bool doesParamIdAllowAutomation(ModelStackWithParamId const* modelStack) { return true; }
81 virtual int32_t paramValueToKnobPos(int32_t paramValue, ModelStackWithAutoParam* modelStack);
82 virtual int32_t knobPosToParamValue(int32_t knobPos, ModelStackWithAutoParam* modelStack);
83 virtual void notifyPingpongOccurred(ModelStackWithParamCollection* modelStack);
84 virtual deluge::modulation::params::Kind getParamKind() = 0;
85
86 const int32_t objectSize;
87 int32_t ticksTilNextEvent;
88};
Definition action.h:75
Definition auto_param.h:36
Definition auto_param.h:44
Definition clip.h:46
Definition copied_param_automation.h:28
Definition instrument_clip.h:48
Definition model_stack.h:269
Definition model_stack.h:251
Definition model_stack.h:260
Definition output.h:81
Definition param_collection_summary.h:24
virtual void tickSamples(int32_t numSamples, ModelStackWithParamCollection *modelStack)=0
tick interpolation by a number of ticks
virtual void tickTicks(int32_t numSamples, ModelStackWithParamCollection *modelStack)=0
tick interpolation by a number of ticks
Definition param_manager.h:174
Definition param_node.h:23
Definition sound.h:71
Definition timeline_counter.h:28
Kind
Definition param.h:42