Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
param_collection_summary.h
1/*
2 * Copyright © 2022-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
22class ParamCollection;
23
25public:
26 inline bool containsAutomation() {
27 if constexpr (kMaxNumUnsignedIntegerstoRepAllParams > 2) {
28 return (whichParamsAreAutomated[0] | whichParamsAreAutomated[1] | whichParamsAreAutomated[2]);
29 }
30 else {
31 return (whichParamsAreAutomated[0] | whichParamsAreAutomated[1]);
32 }
33 }
34
35 inline void resetInterpolationRecord(int32_t topUintToRepParams) {
36 for (int32_t i = topUintToRepParams; i >= 0; i--) {
37 whichParamsAreInterpolating[i] = 0;
38 }
39 }
40
41 inline void resetAutomationRecord(int32_t topUintToRepParams) {
42 for (int32_t i = topUintToRepParams; i >= 0; i--) {
43 whichParamsAreAutomated[i] = 0;
44 }
45 }
46
47 void cloneFlagsFrom(ParamCollectionSummary const* other) {
48 for (int32_t i = 0; i < kMaxNumUnsignedIntegerstoRepAllParams; i++) {
49 whichParamsAreAutomated[i] = other->whichParamsAreAutomated[i];
50 }
51
52 for (int32_t i = 0; i < kMaxNumUnsignedIntegerstoRepAllParams; i++) {
53 whichParamsAreInterpolating[i] = other->whichParamsAreInterpolating[i];
54 }
55 }
56
57 ParamCollection* paramCollection;
58 uint32_t whichParamsAreAutomated[kMaxNumUnsignedIntegerstoRepAllParams];
59 uint32_t whichParamsAreInterpolating[kMaxNumUnsignedIntegerstoRepAllParams];
60
61 // The list of these ParamCollectionSummarys, in ParamManager, must be terminated by one whose values are *all*
62 // zero. This helps because if we know this, we can check for stuff faster.
63};
Definition param_collection_summary.h:24
Definition param_collection.h:39