Deluge Firmware
1.3.0
Build date: 2026.08.29
Toggle main menu visibility
Loading...
Searching...
No Matches
arrangement.h
1
/*
2
* Copyright © 2018-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 "playback/mode/playback_mode.h"
22
23
class
ClipInstance
;
24
class
Output
;
25
class
Song
;
26
27
class
Arrangement final :
public
PlaybackMode {
28
public
:
29
Arrangement();
30
31
// PlaybackMode implementation
32
void
setupPlayback()
override
;
33
bool
endPlayback()
override
;
// Returns whether to do an instant song swap
34
void
doTickForward(int32_t posIncrement)
override
;
35
void
resetPlayPos(int32_t newPos,
bool
doingComplete =
true
, int32_t buttonPressLatency = 0)
override
;
36
void
resyncToSongTicks(
Song
* song)
override
;
37
void
reversionDone()
override
;
38
bool
isOutputAvailable(
Output
* output)
override
;
39
void
stopOutputRecordingAtLoopEnd()
override
;
40
int32_t getPosAtWhichClipWillCut(
ModelStackWithTimelineCounter
const
* modelStack)
override
;
41
bool
willClipContinuePlayingAtEnd(
ModelStackWithTimelineCounter
const
* modelStack)
override
;
42
bool
willClipLoopAtSomePoint(
ModelStackWithTimelineCounter
const
* modelStack)
override
;
43
void
reSyncClip(
ModelStackWithTimelineCounter
* modelStack,
bool
mustSetPosToSomething,
bool
mayResumeClip)
override
;
44
45
// Clips remain "active" even after playback has stopped, or after they've finished playing but the next Clip for
46
// the Instrument / row hasn't started yet. It'll also become active if the user starts editing one
47
void
resumeClipInstancePlayback(
ClipInstance
* clipInstance,
bool
doingComplete =
true
,
48
bool
mayActuallyResumeClip =
true
);
49
void
rowEdited(
Output
* output, int32_t startPos, int32_t endPos,
Clip
* clipRemoved,
50
ClipInstance
* clipInstanceAdded);
51
Error doUniqueCloneOnClipInstance(
ClipInstance
* clipInstance, int32_t newLength = -1,
52
bool
shouldCloneRepeats =
false
);
53
int32_t getLivePos(uint32_t* timeRemainder =
nullptr
);
54
void
endAnyLinearRecording();
55
56
int32_t lastProcessedPos;
57
int32_t playbackStartedAtPos;
58
};
59
60
extern
Arrangement
arrangement;
Arrangement
Definition
arrangement.h:27
ClipInstance
Definition
clip_instance.h:29
Clip
Definition
clip.h:46
ModelStackWithTimelineCounter
Definition
model_stack.h:129
Output
Definition
output.h:81
Song
Definition
song.h:103