Deluge Firmware 1.3.0
Build date: 2025.06.05
Loading...
Searching...
No Matches
timeline_counter.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 "modulation/params/param_manager.h"
21#include <cstdint>
22
23class Song;
24class Sound;
25class ModControllable;
27
28class TimelineCounter {
29public:
30 TimelineCounter();
31 virtual ~TimelineCounter();
32
34 [[nodiscard]] virtual int32_t getLastProcessedPos() const = 0;
36 [[nodiscard]] virtual uint32_t getLivePos() const = 0;
37 [[nodiscard]] virtual int32_t getLoopLength() const = 0;
38 [[nodiscard]] virtual bool isPlayingAutomationNow() const = 0;
39 [[nodiscard]] virtual bool backtrackingCouldLoopBackToEnd() const = 0;
40 [[nodiscard]] virtual int32_t
41 getPosAtWhichPlaybackWillCut(ModelStackWithTimelineCounter const* modelStack) const = 0;
42 virtual bool possiblyCloneForArrangementRecording(ModelStackWithTimelineCounter* modelStack) {
43 return false;
44 } // Returns whether any change.
45
46 virtual void getActiveModControllable(ModelStackWithTimelineCounter* modelStack) = 0;
47 virtual void expectEvent() = 0;
48 virtual TimelineCounter* getTimelineCounterToRecordTo() = 0;
49 virtual void instrumentBeenEdited() {}
50
51 ParamManagerForTimeline paramManager;
52 bool armedForRecording{true};
53};
Definition mod_controllable.h:40
Definition model_stack.h:129
Definition song.h:104
Definition sound.h:71
Definition timeline_counter.h:28
virtual uint32_t getLivePos() const =0
Get the current tick of this timeline counter relative to the playback handler.
virtual int32_t getLastProcessedPos() const =0
Get the tick at which this timeline counter last did anything.