|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Manages an Ableton Link session connecting an Edit with a number of networked peers, syncronising their tempos, bar phases and start/stop statuses. More...
#include "tracktion_AbletonLink.h"
Classes | |
| struct | ImplBase |
| struct | Listener |
| When Link is on, you shouldn't set the tempo directly. More... | |
Public Member Functions | |
| AbletonLink (TransportControl &) | |
| Creates an Ableton Link connection for an Edit. | |
| ~AbletonLink () | |
| Destructor. | |
| void | setEnabled (bool isEnabled) |
| On iOS you need this to instantiate an ABLLinkSettingsViewController. | |
| bool | isEnabled () const |
| Is Link enabled? It may not be connected to any peers even if it is. | |
| bool | isConnected () const |
| Is Link connected to any other peers? | |
| size_t | getNumPeers () const |
| Returns the number of connected peers. | |
| bool | isPlaying () const |
| Returns whether the Link transport is currently playing. | |
| void | enableStartStopSync (bool enable) |
| Sets whether start/stop is syncronsied. | |
| bool | isStartStopSyncEnabled () const |
| Returns whether start/stop is syncronsied. | |
| double | getSessionTempo () const |
| Get the current session tempo. | |
| double | getBeatsUntilNextCycle (double quantum) const |
| Number of beats until the next bar (quantum) - e.g. | |
| void | setCustomOffset (int offsetMs) |
| Use to offset the calculations by some amount (on top of device latency). | |
| void | setTempoConstraint (juce::Range< double > minMaxTempo) |
| Once set, tempos chnages from link are transparently divided or multiplied by 2 to stay within this range (if possible). | |
| double | getBarPhase () const |
| Returns how far though the current bar the Link clock is. | |
| double | getChaseProportion () const |
| Returns how much chasing playback is doing. | |
| void | requestStartStopChange (bool isPlaying) |
| Request the Link session to start or stop playing. | |
| void | requestTempoChange (double newBpm) |
| Request the Link session to change tempo. | |
| void | addListener (Listener *) |
| Adds a listener. | |
| void | removeListener (Listener *) |
| Removes a previously added listener. | |
| void | syncronise (TimePosition) |
Friends | |
| struct | LinkImpl |
Manages an Ableton Link session connecting an Edit with a number of networked peers, syncronising their tempos, bar phases and start/stop statuses.
Definition at line 22 of file tracktion_AbletonLink.h.
| tracktion::engine::AbletonLink::AbletonLink | ( | TransportControl & | t | ) |
Creates an Ableton Link connection for an Edit.
Don't create one of these manually, get the one contained in the Edit with Edit::getAbletonLink().
Definition at line 470 of file tracktion_AbletonLink.cpp.
| tracktion::engine::AbletonLink::~AbletonLink | ( | ) |
Destructor.
Definition at line 479 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::addListener | ( | Listener * | l | ) |
Adds a listener.
Definition at line 578 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::enableStartStopSync | ( | bool | enable | ) |
Sets whether start/stop is syncronsied.
Definition at line 511 of file tracktion_AbletonLink.cpp.
| double tracktion::engine::AbletonLink::getBarPhase | ( | ) | const |
Returns how far though the current bar the Link clock is.
Definition at line 548 of file tracktion_AbletonLink.cpp.
Number of beats until the next bar (quantum) - e.g.
supply 4.0 for 4/4 cycles.
Definition at line 522 of file tracktion_AbletonLink.cpp.
| double tracktion::engine::AbletonLink::getChaseProportion | ( | ) | const |
Returns how much chasing playback is doing.
0 means perfectly in sync 1 means playback is speeding up as much as it can -1 means playback is slowing down as much as it can
Definition at line 553 of file tracktion_AbletonLink.cpp.
| size_t tracktion::engine::AbletonLink::getNumPeers | ( | ) | const |
Returns the number of connected peers.
Definition at line 501 of file tracktion_AbletonLink.cpp.
| double tracktion::engine::AbletonLink::getSessionTempo | ( | ) | const |
Get the current session tempo.
If you're not connected, this may not make sense.
Definition at line 558 of file tracktion_AbletonLink.cpp.
| bool tracktion::engine::AbletonLink::isConnected | ( | ) | const |
Is Link connected to any other peers?
Definition at line 496 of file tracktion_AbletonLink.cpp.
| bool tracktion::engine::AbletonLink::isEnabled | ( | ) | const |
Is Link enabled? It may not be connected to any peers even if it is.
Definition at line 491 of file tracktion_AbletonLink.cpp.
| bool tracktion::engine::AbletonLink::isPlaying | ( | ) | const |
Returns whether the Link transport is currently playing.
Definition at line 506 of file tracktion_AbletonLink.cpp.
| bool tracktion::engine::AbletonLink::isStartStopSyncEnabled | ( | ) | const |
Returns whether start/stop is syncronsied.
If you're not connected, this may not make sense.
Definition at line 517 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::removeListener | ( | Listener * | l | ) |
Removes a previously added listener.
Definition at line 584 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::requestStartStopChange | ( | bool | isPlaying | ) |
Request the Link session to start or stop playing.
This will in turn trigger a callback to linkRequestedStartStopChange which should be used to actually start the transport. [[ message_thread ]]
Definition at line 530 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::requestTempoChange | ( | double | newBpm | ) |
Request the Link session to change tempo.
This will in turn trigger a callback to linkRequestedTempoChange which should be used to actually change the tempo. [[ message_thread ]]
Definition at line 536 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::setCustomOffset | ( | int | offsetMs | ) |
Use to offset the calculations by some amount (on top of device latency).
Definition at line 566 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::setEnabled | ( | bool | isEnabled | ) |
On iOS you need this to instantiate an ABLLinkSettingsViewController.
Enable Link. On platforms other than iOS, Link connects automatically once this is set. On iOS the user must additionally switch Link on using the ABLLinkSettingsViewController. Off by default on desktop, on by default on iOS.
Definition at line 485 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::setTempoConstraint | ( | juce::Range< double > | minMaxTempo | ) |
Once set, tempos chnages from link are transparently divided or multiplied by 2 to stay within this range (if possible).
Definition at line 542 of file tracktion_AbletonLink.cpp.
| void tracktion::engine::AbletonLink::syncronise | ( | TimePosition | pos | ) |
Definition at line 572 of file tracktion_AbletonLink.cpp.
|
friend |
Definition at line 153 of file tracktion_AbletonLink.h.