tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_AbletonLink.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11#if TRACKTION_ENABLE_ABLETON_LINK && JUCE_IOS
12 struct ABLLink;
13#endif
14
15namespace tracktion { inline namespace engine
16{
17
23{
24public:
30
33
35 #if TRACKTION_ENABLE_ABLETON_LINK && JUCE_IOS
36 ABLLink* getLinkInstanceForIOS();
37 #endif
38
43 void setEnabled (bool isEnabled);
44
46 bool isEnabled() const;
47
49 bool isConnected() const;
50
52 size_t getNumPeers() const;
53
55 bool isPlaying() const;
56
58 void enableStartStopSync (bool enable);
59
61 bool isStartStopSyncEnabled() const;
62
64 double getSessionTempo() const;
65
67 double getBeatsUntilNextCycle (double quantum) const;
68
70 void setCustomOffset (int offsetMs);
71
74 void setTempoConstraint (juce::Range<double> minMaxTempo);
75
77 double getBarPhase() const;
78
84 double getChaseProportion() const;
85
86 //==========================================================================
93
99 void requestTempoChange (double newBpm);
100
101 //==========================================================================
110 struct Listener
111 {
113 virtual ~Listener() = default;
114
119
123 virtual void linkRequestedTempoChange (double newBpm) = 0;
124
129 virtual void linkConnectionChanged() = 0;
130
138 virtual void linkRequestedPositionChange (BeatDuration adjustment) = 0;
139 };
140
142 void addListener (Listener*);
143
145 void removeListener (Listener*);
146
147 //==========================================================================
149 void syncronise (TimePosition);
150
151private:
152 struct ImplBase;
153 friend struct LinkImpl;
154 std::unique_ptr<ImplBase> implementation;
155};
156
157}} // namespace tracktion { inline namespace engine
Controls the transport of an Edit's playback.
Represents a duration in beats.
Represents a position in real-life time.