TracktionEngine
|
The Tracktion Edit class! More...
#include <tracktion_Edit.h>
Classes | |
struct | GlobalMacros |
Holds the global Macros for the Edit. More... | |
struct | LoadContext |
A context passed to the Options struct which will get updated about load process and can be signaled to stop loading the Edit. More... | |
struct | LoadFinishedCallback |
Calls an editFinishedLoading method on OwnerType once after the Edit has finished loading. More... | |
struct | Metadata |
Metadata for the Edit. More... | |
struct | Options |
Determines how the Edit will be created. More... | |
struct | ScopedRenderStatus |
Temporarily removes an Edit from the device manager, optionally re-adding it on destruction. More... | |
struct | UndoTransactionInhibitor |
Disables the creation of a new transaction. More... | |
struct | WastedMidiMessagesListener |
Interface for classes that need to know about unused MIDI messages. More... | |
Public Types | |
enum | EditRole { playDisabled = 1 , proxiesDisabled = 2 , pluginsDisabled = 4 , forEditing = 0 , forRendering = playDisabled , forExporting = playDisabled + proxiesDisabled + pluginsDisabled , forExamining = playDisabled + proxiesDisabled + pluginsDisabled } |
Enum used to determine what an Edit is being used for. More... | |
enum class | CountIn { none = 0 , oneBar = 1 , twoBar = 2 , twoBeat = 3 , oneBeat = 4 } |
An enum to determine the duration of the count in. More... | |
using | EditFileRetriever = std::function< juce::File()> |
using | FilePathResolver = std::function< juce::File(const juce::String &)> |
![]() | |
using | WeakRef = juce::WeakReference< Selectable > |
Public Member Functions | |
Edit (Options) | |
Creates an Edit from a set of Options. | |
Edit (Engine &, EditRole) | |
Creates a new, empty Edit with default options for a given role. | |
~Edit () override | |
Destructor. | |
juce::String | getName () |
Returns the name of the Edit if a ProjectItem can be found for it. | |
void | setProjectItemID (ProjectItemID) |
Sets the ProjectItemID of the Edit, this is also stored in the state. | |
ProjectItemID | getProjectItemID () const noexcept |
Returns the ProjectItemID of the Edit. | |
EditRole | getEditRole () const noexcept |
Returns the EditRole. | |
bool | shouldPlay () const noexcept |
Returns true if this Edit should be played back (or false if it was just opened for inspection). | |
bool | canRenderProxies () const noexcept |
Returns true if this Edit can render proxy files. | |
bool | shouldLoadPlugins () const noexcept |
Returns true if this Edit can load Plugin[s]. | |
bool | getIsPreviewEdit () const noexcept |
Returns true if this Edit is a temporary Edit for previewing files/clips etc. | |
void | flushState () |
Saves the plugin, automap and ARA states to the state ValueTree. | |
void | flushPluginStateIfNeeded (Plugin &) |
Saves the specified plugin state to the state ValueTree. | |
juce::Time | getTimeOfLastChange () const |
Returns the time the last change occurred. | |
void | resetChangedStatus () |
Resets the changed status so hasChangedSinceSaved returns false. | |
bool | hasChangedSinceSaved () const |
Returns true if the Edit has changed since it was last saved. | |
bool | isLoading () const |
Returns true if the Edit's not yet fully loaded. | |
EditInputDevices & | getEditInputDevices () noexcept |
Returns the EditInputDevices for the Edit. | |
InputDeviceInstance * | getCurrentInstanceForInputDevice (InputDevice *) const |
Returns an InputDeviceInstance for a global InputDevice. | |
juce::Array< InputDeviceInstance * > | getAllInputDevices () const |
Returns all the active InputDeviceInstance[s] in the Edit. | |
TransportControl & | getTransport () const noexcept |
Returns the TransportControl which is used to stop/stop/position playback and recording. | |
EditPlaybackContext * | getCurrentPlaybackContext () const |
Returns the active EditPlaybackContext which is what is attached to the DeviceManager. | |
ParameterChangeHandler & | getParameterChangeHandler () noexcept |
Returns the ParameterChangeHandler for the Edit. | |
ParameterControlMappings & | getParameterControlMappings () noexcept |
Returns the ParameterControlMappings for the Edit. | |
AutomationRecordManager & | getAutomationRecordManager () noexcept |
Returns the AutomationRecordManager for the Edit. | |
AbletonLink & | getAbletonLink () const noexcept |
Returns the AbletonLink object. | |
bool | isRendering () const noexcept |
Returns true if the Edit is currently being rendered. | |
void | initialiseAllPlugins () |
Initialises all the plugins. | |
juce::String | getSelectableDescription () override |
Retuns the description of this Selectable. | |
juce::UndoManager & | getUndoManager () noexcept |
Returns the juce::UndoManager used for this Edit. | |
void | undo () |
Undoes the most recent changes made. | |
void | redo () |
Redoes the changes undone by the last undo. | |
void | restartPlayback () |
Use this to tell the play engine to rebuild the audio graph if the toplogy has changed. | |
TrackList & | getTrackList () |
Returns the TrackList for the Edit which contains all the top level tracks. | |
void | visitAllTracksRecursive (std::function< bool(Track &)>) const |
Visits all tracks in the Edit with the given function. | |
void | visitAllTopLevelTracks (std::function< bool(Track &)>) const |
Visits all top-level tracks (i.e. | |
void | visitAllTracks (std::function< bool(Track &)>, bool recursive) const |
Visits all tracks in the Edit with the given function. | |
juce::ReferenceCountedObjectPtr< AudioTrack > | insertNewAudioTrack (TrackInsertPoint, SelectionManager *, bool addDefaultPlugins=true) |
Inserts a new AudioTrack in the Edit. | |
juce::ReferenceCountedObjectPtr< FolderTrack > | insertNewFolderTrack (TrackInsertPoint, SelectionManager *, bool asSubmix) |
Inserts a new FolderTrack in the Edit, optionally as a submix. | |
juce::ReferenceCountedObjectPtr< AutomationTrack > | insertNewAutomationTrack (TrackInsertPoint, SelectionManager *) |
Inserts a new AutomationTrack in the Edit. | |
Track::Ptr | insertNewTrack (TrackInsertPoint, const juce::Identifier &xmlType, SelectionManager *) |
Inserts a new Track with the given type in the Edit. | |
Track::Ptr | insertTrack (TrackInsertPoint, juce::ValueTree, SelectionManager *) |
Inserts a new Track with the given state in the Edit. | |
Track::Ptr | insertTrack (juce::ValueTree, juce::ValueTree parent, juce::ValueTree preceeding, SelectionManager *) |
Inserts a new Track with the given state in the Edit. | |
void | moveTrack (Track::Ptr, TrackInsertPoint) |
Moves a track to a new position. | |
Track::Ptr | copyTrack (Track::Ptr, TrackInsertPoint) |
Copies a track to a new position. | |
void | deleteTrack (Track *) |
Deletes a Track. | |
void | ensureNumberOfAudioTracks (int minimumNumTracks) |
Creates new tracks to ensure the minimum number. | |
void | ensureArrangerTrack () |
Creates an ArrangerTrack if there isn't currently one. | |
void | ensureTempoTrack () |
Creates a TempoTrack if there isn't currently one. | |
void | ensureMarkerTrack () |
Creates a MarkerTrack if there isn't currently one. | |
void | ensureChordTrack () |
Creates a ChordTrack if there isn't currently one. | |
void | ensureMasterTrack () |
Creates a MasterTrack if there isn't currently one. | |
ArrangerTrack * | getArrangerTrack () const |
Returns the global ArrangerTrack. | |
MarkerTrack * | getMarkerTrack () const |
Returns the global MarkerTrack. | |
TempoTrack * | getTempoTrack () const |
Returns the global TempoTrack. | |
ChordTrack * | getChordTrack () const |
Returns the global ChordTrack. | |
MasterTrack * | getMasterTrack () const |
Returns the global MasterTrack. | |
bool | areAnyTracksMuted () const |
Returns true if any tracks are muted. | |
bool | areAnyTracksSolo () const |
Returns true if any tracks are soloed. | |
bool | areAnyTracksSoloIsolate () const |
Returns true if any tracks are solo isolated. | |
void | updateMuteSoloStatuses () |
Updates all the tracks and external controller mute/solo statuses. | |
LaunchQuantisation & | getLaunchQuantisation () |
Returns the global launch quantisation. | |
SceneList & | getSceneList () |
Returns a list of Scenes in the Edit. | |
EditItemID | createNewItemID () const |
Returns a new EditItemID to use for a new EditItem. | |
EditItemID | createNewItemID (const std::vector< EditItemID > &idsToAvoid) const |
Returns a new EditItemID to use for a new EditItem, avoiding some IDs. | |
juce::Array< Clip * > | findClipsInLinkGroup (juce::String linkGroupID) const |
Returns and Clip[s] with the given linkGroupID. | |
void | updateMirroredPlugin (Plugin &) |
Adds this plugin to a list so mirrored Plugin[s] are updated asyncronously. | |
void | sendMirrorUpdateToAllPlugins (Plugin &) const |
Syncronously updates all Plugins[s] mirroring this one. | |
void | sendStartStopMessageToPlugins () |
Calls Plugin::playStartedOrStopped to handle automation reacording. | |
PluginList & | getMasterPluginList () const noexcept |
Returns the master PluginList. | |
void | addModifierTimer (ModifierTimer &) |
Adds a ModifierTimer to be updated each block. | |
void | removeModifierTimer (ModifierTimer &) |
Removes a ModifierTimer previously added. | |
void | updateModifierTimers (TimePosition editTime, int numSamples) const |
Updates all the ModifierTimers with a given edit time and number of samples. | |
MacroParameterElement & | getGlobalMacros () const |
Returns global MacroParameterElement. | |
void | setLowLatencyMonitoring (bool enabled, const juce::Array< EditItemID > &plugins) |
Toggles low latency monitoring for a set of plugins. | |
bool | getLowLatencyMonitoring () const noexcept |
Returns true if in low latency monitoring mode. | |
void | setLowLatencyDisabledPlugins (const juce::Array< EditItemID > &plugins) |
First enables all currently disabled latency plugins and then disables the new set. | |
juce::Array< EditItemID > | getLowLatencyDisabledPlugins () |
Returns the current set of diabled plugins. | |
RackTypeList & | getRackList () const noexcept |
Returns the RackTypeList which contains all the RackTypes for the Edit. | |
TrackCompManager & | getTrackCompManager () const noexcept |
Returns the TrackCompManager for the Edit. | |
juce::String | getAuxBusName (int bus) const |
Returns the name of an aux bus. | |
void | setAuxBusName (int bus, const juce::String &name) |
Sets the name of an aux bus. | |
juce::Array< AutomatableParameter * > | getAllAutomatableParams (bool includeTrackParams) const |
Returns all automatable parameters in an Edit. | |
void | visitAllAutomatableParams (bool includeTrackParams, const std::function< void(AutomatableParameter &)> &) const |
Returns all automatable parameters in an Edit. | |
juce::File | getVideoFile () const |
Returns the currently set video file. | |
void | setVideoFile (const juce::File &, juce::String importDesc) |
Sets a video file to display. | |
TimePosition | getNextTimeOfInterest (TimePosition afterThisTime) |
Finds the next marker or start/end of a clip after a certain time. | |
TimePosition | getPreviousTimeOfInterest (TimePosition beforeThisTime) |
Finds the previous marker or start/end of a clip after a certain time. | |
PluginCache & | getPluginCache () noexcept |
Returns the PluginCache which manages all active Plugin[s] for this Edit. | |
TimePosition | getFirstClipTime () const |
Returns the time of first clip. | |
TimeDuration | getLength () const |
Returns the end time of last clip. | |
VolumeAndPanPlugin::Ptr | getMasterVolumePlugin () const |
Returns the master VolumeAndPanPlugin. | |
AutomatableParameter::Ptr | getMasterSliderPosParameter () const |
Returns the master volume AutomatableParameter. | |
AutomatableParameter::Ptr | getMasterPanParameter () const |
Returns the master pan AutomatableParameter. | |
void | setMasterVolumeSliderPos (float) |
Sets the master volume level. | |
void | setMasterPanPos (float) |
Returns the master pan position. | |
void | pluginChanged (Plugin &) noexcept |
Plugins should call this when one of their parameters or state changes to mark the edit as unsaved. | |
TimecodeDisplayFormat | getTimecodeFormat () const |
Returns the current TimecodeDisplayFormat. | |
void | setTimecodeFormat (TimecodeDisplayFormat) |
Sets the TimecodeDisplayFormat to use. | |
void | toggleTimecodeMode () |
Toggles the TimecodeDisplayFormat through the available TimecodeType[s]. | |
void | sendTempoOrPitchSequenceChangedUpdates () |
Sends a message to all the clips to let them know the tempo or pitch sequence has changed. | |
std::shared_ptr< MidiInputDevice > | getCurrentMidiTimecodeSource () const |
Returns the MidiInputDevice being used as the MIDI timecode source. | |
void | setCurrentMidiTimecodeSource (std::shared_ptr< MidiInputDevice >) |
Sets the MidiInputDevice being to be used as the MIDI timecode source. | |
void | enableTimecodeSync (bool) |
Toggles syncing to MIDI timecode. | |
bool | isTimecodeSyncEnabled () const noexcept |
Returns true if syncing to MIDI timecode is enabled. | |
TimeDuration | getTimecodeOffset () const noexcept |
Returns the offset to apply to MIDI timecode. | |
void | setTimecodeOffset (TimeDuration newOffset) |
Sets the offset to apply to MIDI timecode. | |
bool | isMidiTimecodeIgnoringHours () const |
Returns true if hours are ignored when syncing to MIDI timecode. | |
void | setMidiTimecodeIgnoringHours (bool shouldIgnore) |
Sets whether hours are ignored when syncing to MIDI timecode. | |
std::shared_ptr< MidiInputDevice > | getCurrentMidiMachineControlSource () const |
Returns the MidiInputDevice being used as an MMC source. | |
void | setCurrentMidiMachineControlSource (std::shared_ptr< MidiInputDevice >) |
Sets the MidiInputDevice to be used as an MMC source. | |
MidiOutputDevice * | getCurrentMidiMachineControlDest () const |
Returns the MidiInputDevice being used as an MMC destination. | |
void | setCurrentMidiMachineControlDest (MidiOutputDevice *) |
Sets the MidiInputDevice to be used as an MMC destination. | |
void | updateMidiTimecodeDevices () |
Updates the MIDI timecode/MMC devices. | |
void | setClickTrackRange (TimeRange) noexcept |
Sets a range for the click track to be audible within. | |
TimeRange | getClickTrackRange () const noexcept |
Returns the range the click track will be audible within. | |
float | getClickTrackVolume () const noexcept |
Returns the click track volume. | |
juce::String | getClickTrackDevice () const |
Returns the name of the device being used as the click track output. | |
bool | isClickTrackDevice (OutputDevice &) const |
Returns true if the given OutputDevice is being used as the click track output. | |
void | setClickTrackOutput (const juce::String &deviceName) |
Sets the device to use as the click track output. | |
void | setClickTrackVolume (float gain) |
Sets the volume of the click track. | |
void | setCountInMode (CountIn) |
Sets the duration of the count in. | |
CountIn | getCountInMode () const |
Returns the duration of the count in. | |
int | getNumCountInBeats () const |
Returns the number of beats of the count in. | |
void | sendSourceFileUpdate () |
Sends a 'sourceMediaChanged' call to all the clips. | |
void | markAsChanged () |
Marks the edit as being significantly changed and should therefore be saved. | |
void | invalidateStoredLength () noexcept |
Invalidates the stored length so the next call to getLength will update form the Edit contents. | |
void | dispatchPendingUpdatesSynchronously () |
If there's a change to send out to the listeners, do it now rather than waiting for the next timer message. | |
bool | areAnyClipsUsingFile (const AudioFile &) |
Returns true if any clips are using this file. | |
void | cancelAllProxyGeneratorJobs () const |
Stops all proxy generator jobs clips may be performing. | |
juce::File | getTempDirectory (bool createIfNonExistent) const |
Returns the temp directory the Edit it using. | |
void | setTempDirectory (const juce::File &) |
Sets the temp directory for the Edit to use. | |
Metadata | getEditMetadata () |
Returns the current Metadata for the Edit. | |
void | setEditMetadata (Metadata) |
Sets the Metadata for the Edit. | |
juce::ValueTree | getAutomapState () |
Returns the ValueTree used as the Auotmap state. | |
MarkerManager & | getMarkerManager () const noexcept |
Returns the MarkerManager. | |
ARADocumentHolder & | getARADocument () |
Returns the ARA document handler. | |
void | addWastedMidiMessagesListener (WastedMidiMessagesListener *) |
Add a WastedMidiMessagesListener to be notified of wasted MIDI messages. | |
void | removeWastedMidiMessagesListener (WastedMidiMessagesListener *) |
Removes a previously added WastedMidiMessagesListener. | |
void | warnOfWastedMidiMessages (InputDevice *, Track *) |
Triggers a callback to any registered WastedMidiMessagesListener[s]. | |
SharedLevelMeasurer::Ptr | getPreviewLevelMeasurer () |
Returns a previously set SharedLevelMeasurer. | |
void | setPreviewLevelMeasurer (SharedLevelMeasurer::Ptr p) |
Sets a SharedLevelMeasurer to use. | |
![]() | |
Selectable () | |
virtual | ~Selectable () |
virtual void | selectionStatusChanged (bool isNowSelected) |
Can be overridden to tell this object that it has just been selected or deselected. | |
virtual void | changed () |
This should be called to send a change notification to any SelectableListeners that are registered with this object. | |
virtual void | selectableAboutToBeDeleted () |
Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. | |
void | addListener (SelectableListener *) |
void | removeListener (SelectableListener *) |
void | addSelectableListener (SelectableListener *) |
void | removeSelectableListener (SelectableListener *) |
void | cancelAnyPendingUpdates () |
If changed() has been called, this will cancel any pending async change notificaions. | |
void | deselect () |
void | propertiesChanged () |
void | notifyListenersOfDeletion () |
WeakRef | getWeakRef () |
Static Public Member Functions | |
static TimeDuration | getMaximumLength () |
Returns the maximum length an Edit can be. | |
static TimeRange | getMaximumEditTimeRange () |
Returns the maximum length an Edit can be. | |
static TimePosition | getMaximumEditEnd () |
static std::unique_ptr< Edit > | createEdit (Options) |
Creates an Edit for the given options. | |
static std::unique_ptr< Edit > | createEditForPreviewingFile (Engine &, const juce::File &, const Edit *editToMatch, bool tryToMatchTempo, bool tryToMatchPitch, bool *couldMatchTempo, juce::ValueTree midiPreviewPlugin, juce::ValueTree midiDrumPreviewPlugin={}, bool forceMidiToDrums=false, std::unique_ptr< Edit > editToUpdate={}) |
Creates an Edit for previewing a file. | |
static std::unique_ptr< Edit > | createEditForPreviewingPreset (Engine &engine, juce::ValueTree, const Edit *editToMatch, bool tryToMatchTempo, bool *couldMatchTempo, juce::ValueTree midiPreviewPlugin, juce::ValueTree midiDrumPreviewPlugin={}, bool forceMidiToDrums=false, std::unique_ptr< Edit > editToUpdate={}) |
Creates an Edit for previewing a preset. | |
static std::unique_ptr< Edit > | createEditForPreviewingClip (Clip &) |
Creates an Edit for previewing a Clip. | |
static std::unique_ptr< Edit > | createSingleTrackEdit (Engine &, EditRole role=EditRole::forEditing) |
Creates an Edit with a single AudioTrack. | |
static std::unique_ptr< Edit > | createEditForExamining (Engine &, juce::ValueTree, EditRole role=EditRole::forExamining, LoadContext *=nullptr) |
Creates an Edit that loads a state, using the role Edit::forExamining. | |
static int | getDefaultNumUndoLevels () noexcept |
Returns the default number of undo levels that should be used. | |
![]() | |
static void | initialise () |
static bool | isSelectableValid (const Selectable *) noexcept |
checks whether this object has been deleted. | |
Public Attributes | |
Engine & | engine |
A reference to the Engine. | |
EditFileRetriever | editFileRetriever |
This callback can be set to return the file for this Edit. | |
FilePathResolver | filePathResolver |
This callback can be set to resolve file paths. | |
EditItemCache< Track > | trackCache |
Quick way to find and iterate all Track[s] in the Edit. | |
EditItemCache< ClipSlot > | clipSlotCache |
Quick way to find and iterate all ClipSlot[s] in the Edit. | |
EditItemCache< Clip > | clipCache |
Quick way to find and iterate all Clip[s] in the Edit. | |
TempoSequence | tempoSequence |
The global TempoSequence of this Edit. | |
PitchSequence | pitchSequence |
The global PitchSequence of this Edit. | |
juce::CachedValue< juce::String > | lastSignificantChange |
The last time a change was made to the Edit. | |
juce::CachedValue< TimeDuration > | masterFadeIn |
The duration in seconds of the fade in. | |
juce::CachedValue< TimeDuration > | masterFadeOut |
The duration in seconds of the fade out. | |
juce::CachedValue< TimeDuration > | timecodeOffset |
The duration in seconds of the timecode offset. | |
juce::CachedValue< TimeDuration > | videoOffset |
The duration in seconds of the video offset. | |
juce::CachedValue< AudioFadeCurve::Type > | masterFadeInType |
The curve type of the fade in. | |
juce::CachedValue< AudioFadeCurve::Type > | masterFadeOutType |
The curve type of the fade out. | |
juce::CachedValue< bool > | midiTimecodeSourceDeviceEnabled |
Whether a MIDI timecode source is enabled. | |
juce::CachedValue< bool > | midiTimecodeIgnoringHours |
Whether the MIDI timecode source ignores hours. | |
juce::CachedValue< bool > | videoMuted |
Whether the video source is muted. | |
juce::CachedValue< bool > | clickTrackEnabled |
Whether the click track is enabled. | |
juce::CachedValue< bool > | clickTrackEmphasiseBars |
Whether the click track should emphasise bars. | |
juce::CachedValue< bool > | clickTrackRecordingOnly |
Whether the click track should be audible only when recording. | |
juce::CachedValue< bool > | recordingPunchInOut |
Whether recoridng only happens within the in/out markers. | |
juce::CachedValue< bool > | playInStopEnabled |
Whether the audio engine should run when playback is stopped. | |
juce::CachedValue< float > | clickTrackGain |
The gain of the click track. | |
juce::CachedValue< ProjectItemID > | videoSource |
The ProjectItemID of the video source. | |
juce::ValueTree | state { IDs::EDIT } |
The ValueTree of the Edit state. | |
juce::ValueTree | inputDeviceState |
The ValueTree of the input device states. | |
![]() | |
WeakRef::Master | masterReference |
Static Public Attributes | |
static constexpr double | maximumLength = 48.0 * 60.0 * 60.0 |
The maximum length an Edit can be. | |
static const int | ticksPerQuarterNote = 960 |
The number of ticks per quarter note. | |
The Tracktion Edit class!
An Edit represents an arrangement that can be played, rendered, modified, etc.
It contains all the per-session objects such as tracks, tempo sequences, pitches, input devices, Racks, master plugins etc. and any per-Edit management objects such as UndoManager, PluginCache etc.
Most sub-objects such as Tracks, Clips etc. will all know which Edit they belong to by having a reference to this Edit.
To create an Edit to you need construct one with an Edit::Options instance supplying at least the Engine to use, the ValueTree state and a ProjectItemID to uniquely identify this Edit, or use some of the static helper methods that return a std::unique_ptr<Edit>
.
N.B. Constructing an Edit can throw an exception if it can't complete for some reason e.g. if it's being constructed on the message thread which is blocked. It's generally safer to use Edit::createEdit as this will catch the exception and just return a nullptr.
This is a high level overview of the Edit structure and the relevant objects. Note that this isn't an exhaustive list but should help you find the most relevant classes.
using tracktion::engine::Edit::EditFileRetriever = std::function<juce::File()> |
using tracktion::engine::Edit::FilePathResolver = std::function<juce::File(const juce::String&)> |
Enum used to determine what an Edit is being used for.
Enumerator | |
---|---|
playDisabled | Determines if an EditPlaybackContext is created. |
proxiesDisabled | Determines if clips and create proxies. |
pluginsDisabled | Determines if plugins should be loaded. |
forEditing | Creates an Edit for normal use. |
forRendering | Creates an Edit for rendering, not output device playback. |
forExporting | Creates an Edit for exporting/archiving, not playback/rendering. |
forExamining | Creates an Edit for examining (listing source files etc). |
|
strong |
tracktion::engine::Edit::Edit | ( | Options | ) |
Creates a new, empty Edit with default options for a given role.
|
override |
Destructor.
juce::String tracktion::engine::Edit::getName | ( | ) |
Returns the name of the Edit if a ProjectItem can be found for it.
Referenced by getSelectableDescription().
void tracktion::engine::Edit::setProjectItemID | ( | ProjectItemID | ) |
Sets the ProjectItemID of the Edit, this is also stored in the state.
|
noexcept |
Returns the ProjectItemID of the Edit.
|
noexcept |
Returns the EditRole.
|
noexcept |
Returns true if this Edit should be played back (or false if it was just opened for inspection).
References playDisabled.
|
noexcept |
Returns true if this Edit can render proxy files.
References proxiesDisabled.
|
noexcept |
Returns true if this Edit can load Plugin[s].
References pluginsDisabled.
|
noexcept |
|
static |
Returns the maximum length an Edit can be.
References maximumLength.
|
static |
Returns the maximum length an Edit can be.
References maximumLength.
Referenced by getMaximumEditEnd().
|
static |
References getMaximumEditTimeRange().
Referenced by tracktion::engine::Clip::getMaximumLength().
void tracktion::engine::Edit::flushState | ( | ) |
Saves the plugin, automap and ARA states to the state ValueTree.
void tracktion::engine::Edit::flushPluginStateIfNeeded | ( | Plugin & | ) |
Saves the specified plugin state to the state ValueTree.
juce::Time tracktion::engine::Edit::getTimeOfLastChange | ( | ) | const |
Returns the time the last change occurred.
If no modifications occurred since this object was initialised, this returns the Time the Edit was last saved.
void tracktion::engine::Edit::resetChangedStatus | ( | ) |
Resets the changed status so hasChangedSinceSaved returns false.
bool tracktion::engine::Edit::hasChangedSinceSaved | ( | ) | const |
Returns true if the Edit has changed since it was last saved.
bool tracktion::engine::Edit::isLoading | ( | ) | const |
Returns true if the Edit's not yet fully loaded.
Referenced by tracktion::engine::Edit::LoadFinishedCallback< OwnerType >::timerCallback().
Creates an Edit for the given options.
Referenced by tracktion::engine::benchmark_utilities::loadEditFromValueTree().
|
static |
Creates an Edit for previewing a file.
|
static |
Creates an Edit for previewing a preset.
|
static |
Creates an Edit with a single AudioTrack.
|
static |
Creates an Edit that loads a state, using the role Edit::forExamining.
|
noexcept |
Returns the EditInputDevices for the Edit.
InputDeviceInstance * tracktion::engine::Edit::getCurrentInstanceForInputDevice | ( | InputDevice * | ) | const |
Returns an InputDeviceInstance for a global InputDevice.
juce::Array< InputDeviceInstance * > tracktion::engine::Edit::getAllInputDevices | ( | ) | const |
Returns all the active InputDeviceInstance[s] in the Edit.
|
noexcept |
Returns the TransportControl which is used to stop/stop/position playback and recording.
EditPlaybackContext * tracktion::engine::Edit::getCurrentPlaybackContext | ( | ) | const |
Returns the active EditPlaybackContext which is what is attached to the DeviceManager.
|
noexcept |
Returns the ParameterChangeHandler for the Edit.
|
noexcept |
Returns the ParameterControlMappings for the Edit.
|
noexcept |
Returns the AutomationRecordManager for the Edit.
Used to change automation read/write modes and start/stop automation recording.
|
noexcept |
Returns the AbletonLink object.
Used to sync an Edit's playback with an AbletonLink session.
|
noexcept |
Returns true if the Edit is currently being rendered.
void tracktion::engine::Edit::initialiseAllPlugins | ( | ) |
Initialises all the plugins.
Usually you'd call this once after loading an Edit.
|
overridevirtual |
Retuns the description of this Selectable.
Implements tracktion::engine::Selectable.
References getName().
|
noexcept |
Returns the juce::UndoManager used for this Edit.
void tracktion::engine::Edit::undo | ( | ) |
Undoes the most recent changes made.
void tracktion::engine::Edit::redo | ( | ) |
Redoes the changes undone by the last undo.
|
staticnoexcept |
Returns the default number of undo levels that should be used.
Referenced by tracktion::engine::benchmark_utilities::loadEditFromValueTree().
void tracktion::engine::Edit::restartPlayback | ( | ) |
Use this to tell the play engine to rebuild the audio graph if the toplogy has changed.
You shouldn't normally need to use this as it's called automatically as track/clips/plugins etc. are added/removed/changed.
TrackList & tracktion::engine::Edit::getTrackList | ( | ) |
void tracktion::engine::Edit::visitAllTracksRecursive | ( | std::function< bool(Track &)> | ) | const |
Visits all tracks in the Edit with the given function.
Return false to stop the traversal.
void tracktion::engine::Edit::visitAllTopLevelTracks | ( | std::function< bool(Track &)> | ) | const |
Visits all top-level tracks (i.e.
non-recursively) in the Edit with the given function.
void tracktion::engine::Edit::visitAllTracks | ( | std::function< bool(Track &)> | , |
bool | recursive | ||
) | const |
Visits all tracks in the Edit with the given function.
recursive | Whether to visit nested tracks or just top level tracks. |
juce::ReferenceCountedObjectPtr< AudioTrack > tracktion::engine::Edit::insertNewAudioTrack | ( | TrackInsertPoint | , |
SelectionManager * | , | ||
bool | addDefaultPlugins = true |
||
) |
Inserts a new AudioTrack in the Edit.
juce::ReferenceCountedObjectPtr< FolderTrack > tracktion::engine::Edit::insertNewFolderTrack | ( | TrackInsertPoint | , |
SelectionManager * | , | ||
bool | asSubmix | ||
) |
Inserts a new FolderTrack in the Edit, optionally as a submix.
juce::ReferenceCountedObjectPtr< AutomationTrack > tracktion::engine::Edit::insertNewAutomationTrack | ( | TrackInsertPoint | , |
SelectionManager * | |||
) |
Inserts a new AutomationTrack in the Edit.
Track::Ptr tracktion::engine::Edit::insertNewTrack | ( | TrackInsertPoint | , |
const juce::Identifier & | xmlType, | ||
SelectionManager * | |||
) |
Track::Ptr tracktion::engine::Edit::insertTrack | ( | TrackInsertPoint | , |
juce::ValueTree | , | ||
SelectionManager * | |||
) |
Track::Ptr tracktion::engine::Edit::insertTrack | ( | juce::ValueTree | , |
juce::ValueTree | parent, | ||
juce::ValueTree | preceeding, | ||
SelectionManager * | |||
) |
void tracktion::engine::Edit::moveTrack | ( | Track::Ptr | , |
TrackInsertPoint | |||
) |
Moves a track to a new position.
Track::Ptr tracktion::engine::Edit::copyTrack | ( | Track::Ptr | , |
TrackInsertPoint | |||
) |
Copies a track to a new position.
void tracktion::engine::Edit::ensureNumberOfAudioTracks | ( | int | minimumNumTracks | ) |
Creates new tracks to ensure the minimum number.
void tracktion::engine::Edit::ensureArrangerTrack | ( | ) |
Creates an ArrangerTrack if there isn't currently one.
void tracktion::engine::Edit::ensureTempoTrack | ( | ) |
Creates a TempoTrack if there isn't currently one.
void tracktion::engine::Edit::ensureMarkerTrack | ( | ) |
Creates a MarkerTrack if there isn't currently one.
void tracktion::engine::Edit::ensureChordTrack | ( | ) |
Creates a ChordTrack if there isn't currently one.
void tracktion::engine::Edit::ensureMasterTrack | ( | ) |
Creates a MasterTrack if there isn't currently one.
ArrangerTrack * tracktion::engine::Edit::getArrangerTrack | ( | ) | const |
Returns the global ArrangerTrack.
MarkerTrack * tracktion::engine::Edit::getMarkerTrack | ( | ) | const |
Returns the global MarkerTrack.
TempoTrack * tracktion::engine::Edit::getTempoTrack | ( | ) | const |
Returns the global TempoTrack.
ChordTrack * tracktion::engine::Edit::getChordTrack | ( | ) | const |
Returns the global ChordTrack.
MasterTrack * tracktion::engine::Edit::getMasterTrack | ( | ) | const |
Returns the global MasterTrack.
bool tracktion::engine::Edit::areAnyTracksMuted | ( | ) | const |
Returns true if any tracks are muted.
bool tracktion::engine::Edit::areAnyTracksSolo | ( | ) | const |
Returns true if any tracks are soloed.
bool tracktion::engine::Edit::areAnyTracksSoloIsolate | ( | ) | const |
Returns true if any tracks are solo isolated.
void tracktion::engine::Edit::updateMuteSoloStatuses | ( | ) |
Updates all the tracks and external controller mute/solo statuses.
You shouldn't normally need to call this, it's internally updated when solo/mute properties change.
LaunchQuantisation & tracktion::engine::Edit::getLaunchQuantisation | ( | ) |
Returns the global launch quantisation.
EditItemID tracktion::engine::Edit::createNewItemID | ( | ) | const |
Returns a new EditItemID to use for a new EditItem.
EditItemID tracktion::engine::Edit::createNewItemID | ( | const std::vector< EditItemID > & | idsToAvoid | ) | const |
Returns a new EditItemID to use for a new EditItem, avoiding some IDs.
juce::Array< Clip * > tracktion::engine::Edit::findClipsInLinkGroup | ( | juce::String | linkGroupID | ) | const |
Returns and Clip[s] with the given linkGroupID.
void tracktion::engine::Edit::updateMirroredPlugin | ( | Plugin & | ) |
Adds this plugin to a list so mirrored Plugin[s] are updated asyncronously.
void tracktion::engine::Edit::sendMirrorUpdateToAllPlugins | ( | Plugin & | ) | const |
Syncronously updates all Plugins[s] mirroring this one.
void tracktion::engine::Edit::sendStartStopMessageToPlugins | ( | ) |
Calls Plugin::playStartedOrStopped to handle automation reacording.
Not intended for public use as it will be called automatically by the TransportControl.
|
noexcept |
Returns the master PluginList.
void tracktion::engine::Edit::addModifierTimer | ( | ModifierTimer & | ) |
Adds a ModifierTimer to be updated each block.
void tracktion::engine::Edit::removeModifierTimer | ( | ModifierTimer & | ) |
Removes a ModifierTimer previously added.
void tracktion::engine::Edit::updateModifierTimers | ( | TimePosition | editTime, |
int | numSamples | ||
) | const |
Updates all the ModifierTimers with a given edit time and number of samples.
MacroParameterElement & tracktion::engine::Edit::getGlobalMacros | ( | ) | const |
Returns global MacroParameterElement.
void tracktion::engine::Edit::setLowLatencyMonitoring | ( | bool | enabled, |
const juce::Array< EditItemID > & | plugins | ||
) |
Toggles low latency monitoring for a set of plugins.
|
noexcept |
Returns true if in low latency monitoring mode.
void tracktion::engine::Edit::setLowLatencyDisabledPlugins | ( | const juce::Array< EditItemID > & | plugins | ) |
First enables all currently disabled latency plugins and then disables the new set.
Don't call directly, use setLowLatencyMonitoring as you might be in low latency mode but not actually have to disable any plugins.
juce::Array< EditItemID > tracktion::engine::Edit::getLowLatencyDisabledPlugins | ( | ) |
Returns the current set of diabled plugins.
|
noexcept |
Returns the RackTypeList which contains all the RackTypes for the Edit.
|
noexcept |
Returns the TrackCompManager for the Edit.
juce::String tracktion::engine::Edit::getAuxBusName | ( | int | bus | ) | const |
Returns the name of an aux bus.
void tracktion::engine::Edit::setAuxBusName | ( | int | bus, |
const juce::String & | name | ||
) |
Sets the name of an aux bus.
juce::Array< AutomatableParameter * > tracktion::engine::Edit::getAllAutomatableParams | ( | bool | includeTrackParams | ) | const |
Returns all automatable parameters in an Edit.
includeTrackParams | Whether to include plugins on tracks and clips |
void tracktion::engine::Edit::visitAllAutomatableParams | ( | bool | includeTrackParams, |
const std::function< void(AutomatableParameter &)> & | |||
) | const |
Returns all automatable parameters in an Edit.
includeTrackParams | Whether to include plugins on tracks and clips |
juce::File tracktion::engine::Edit::getVideoFile | ( | ) | const |
Returns the currently set video file.
void tracktion::engine::Edit::setVideoFile | ( | const juce::File & | , |
juce::String | importDesc | ||
) |
Sets a video file to display.
TimePosition tracktion::engine::Edit::getNextTimeOfInterest | ( | TimePosition | afterThisTime | ) |
Finds the next marker or start/end of a clip after a certain time.
TimePosition tracktion::engine::Edit::getPreviousTimeOfInterest | ( | TimePosition | beforeThisTime | ) |
Finds the previous marker or start/end of a clip after a certain time.
|
noexcept |
Returns the PluginCache which manages all active Plugin[s] for this Edit.
TimePosition tracktion::engine::Edit::getFirstClipTime | ( | ) | const |
Returns the time of first clip.
TimeDuration tracktion::engine::Edit::getLength | ( | ) | const |
Returns the end time of last clip.
Referenced by tracktion::engine::benchmark_utilities::renderEdit().
VolumeAndPanPlugin::Ptr tracktion::engine::Edit::getMasterVolumePlugin | ( | ) | const |
Returns the master VolumeAndPanPlugin.
AutomatableParameter::Ptr tracktion::engine::Edit::getMasterSliderPosParameter | ( | ) | const |
Returns the master volume AutomatableParameter.
N.B. this is in slider position, not dB
AutomatableParameter::Ptr tracktion::engine::Edit::getMasterPanParameter | ( | ) | const |
Returns the master pan AutomatableParameter.
void tracktion::engine::Edit::setMasterVolumeSliderPos | ( | float | ) |
Sets the master volume level.
N.B. this is in slider position, not dB
void tracktion::engine::Edit::setMasterPanPos | ( | float | ) |
Returns the master pan position.
|
noexcept |
Plugins should call this when one of their parameters or state changes to mark the edit as unsaved.
Referenced by tracktion::engine::AirWindowsAutomatableParameter::markAsChanged().
TimecodeDisplayFormat tracktion::engine::Edit::getTimecodeFormat | ( | ) | const |
Returns the current TimecodeDisplayFormat.
void tracktion::engine::Edit::setTimecodeFormat | ( | TimecodeDisplayFormat | ) |
Sets the TimecodeDisplayFormat to use.
void tracktion::engine::Edit::toggleTimecodeMode | ( | ) |
Toggles the TimecodeDisplayFormat through the available TimecodeType[s].
void tracktion::engine::Edit::sendTempoOrPitchSequenceChangedUpdates | ( | ) |
Sends a message to all the clips to let them know the tempo or pitch sequence has changed.
std::shared_ptr< MidiInputDevice > tracktion::engine::Edit::getCurrentMidiTimecodeSource | ( | ) | const |
Returns the MidiInputDevice being used as the MIDI timecode source.
void tracktion::engine::Edit::setCurrentMidiTimecodeSource | ( | std::shared_ptr< MidiInputDevice > | ) |
Sets the MidiInputDevice being to be used as the MIDI timecode source.
void tracktion::engine::Edit::enableTimecodeSync | ( | bool | ) |
Toggles syncing to MIDI timecode.
|
noexcept |
Returns true if syncing to MIDI timecode is enabled.
References midiTimecodeSourceDeviceEnabled.
|
noexcept |
Returns the offset to apply to MIDI timecode.
References timecodeOffset.
void tracktion::engine::Edit::setTimecodeOffset | ( | TimeDuration | newOffset | ) |
Sets the offset to apply to MIDI timecode.
bool tracktion::engine::Edit::isMidiTimecodeIgnoringHours | ( | ) | const |
Returns true if hours are ignored when syncing to MIDI timecode.
References midiTimecodeIgnoringHours.
void tracktion::engine::Edit::setMidiTimecodeIgnoringHours | ( | bool | shouldIgnore | ) |
Sets whether hours are ignored when syncing to MIDI timecode.
std::shared_ptr< MidiInputDevice > tracktion::engine::Edit::getCurrentMidiMachineControlSource | ( | ) | const |
Returns the MidiInputDevice being used as an MMC source.
void tracktion::engine::Edit::setCurrentMidiMachineControlSource | ( | std::shared_ptr< MidiInputDevice > | ) |
Sets the MidiInputDevice to be used as an MMC source.
MidiOutputDevice * tracktion::engine::Edit::getCurrentMidiMachineControlDest | ( | ) | const |
Returns the MidiInputDevice being used as an MMC destination.
void tracktion::engine::Edit::setCurrentMidiMachineControlDest | ( | MidiOutputDevice * | ) |
Sets the MidiInputDevice to be used as an MMC destination.
void tracktion::engine::Edit::updateMidiTimecodeDevices | ( | ) |
Updates the MIDI timecode/MMC devices.
You shouldn't normally need to call this as it will be called automatically when one of the setter methods are called.
|
noexcept |
Sets a range for the click track to be audible within.
|
noexcept |
Returns the range the click track will be audible within.
|
noexcept |
Returns the click track volume.
References clickTrackGain.
juce::String tracktion::engine::Edit::getClickTrackDevice | ( | ) | const |
Returns the name of the device being used as the click track output.
bool tracktion::engine::Edit::isClickTrackDevice | ( | OutputDevice & | ) | const |
Returns true if the given OutputDevice is being used as the click track output.
void tracktion::engine::Edit::setClickTrackOutput | ( | const juce::String & | deviceName | ) |
Sets the device to use as the click track output.
void tracktion::engine::Edit::setClickTrackVolume | ( | float | gain | ) |
Sets the volume of the click track.
void tracktion::engine::Edit::setCountInMode | ( | CountIn | ) |
Sets the duration of the count in.
CountIn tracktion::engine::Edit::getCountInMode | ( | ) | const |
Returns the duration of the count in.
int tracktion::engine::Edit::getNumCountInBeats | ( | ) | const |
Returns the number of beats of the count in.
void tracktion::engine::Edit::sendSourceFileUpdate | ( | ) |
Sends a 'sourceMediaChanged' call to all the clips.
void tracktion::engine::Edit::markAsChanged | ( | ) |
Marks the edit as being significantly changed and should therefore be saved.
|
noexcept |
Invalidates the stored length so the next call to getLength will update form the Edit contents.
You shouldn't normally need to call this as it will happen automatically as clips are added/removed.
void tracktion::engine::Edit::dispatchPendingUpdatesSynchronously | ( | ) |
If there's a change to send out to the listeners, do it now rather than waiting for the next timer message.
bool tracktion::engine::Edit::areAnyClipsUsingFile | ( | const AudioFile & | ) |
Returns true if any clips are using this file.
void tracktion::engine::Edit::cancelAllProxyGeneratorJobs | ( | ) | const |
Stops all proxy generator jobs clips may be performing.
juce::File tracktion::engine::Edit::getTempDirectory | ( | bool | createIfNonExistent | ) | const |
Returns the temp directory the Edit it using.
void tracktion::engine::Edit::setTempDirectory | ( | const juce::File & | ) |
Sets the temp directory for the Edit to use.
juce::ValueTree tracktion::engine::Edit::getAutomapState | ( | ) |
Returns the ValueTree used as the Auotmap state.
You shouldn't normally need this as it's only called by the Automap system.
|
noexcept |
Returns the MarkerManager.
ARADocumentHolder & tracktion::engine::Edit::getARADocument | ( | ) |
Returns the ARA document handler.
void tracktion::engine::Edit::addWastedMidiMessagesListener | ( | WastedMidiMessagesListener * | ) |
Add a WastedMidiMessagesListener to be notified of wasted MIDI messages.
void tracktion::engine::Edit::removeWastedMidiMessagesListener | ( | WastedMidiMessagesListener * | ) |
Removes a previously added WastedMidiMessagesListener.
void tracktion::engine::Edit::warnOfWastedMidiMessages | ( | InputDevice * | , |
Track * | |||
) |
Triggers a callback to any registered WastedMidiMessagesListener[s].
SharedLevelMeasurer::Ptr tracktion::engine::Edit::getPreviewLevelMeasurer | ( | ) |
Returns a previously set SharedLevelMeasurer.
void tracktion::engine::Edit::setPreviewLevelMeasurer | ( | SharedLevelMeasurer::Ptr | p | ) |
Sets a SharedLevelMeasurer to use.
Engine& tracktion::engine::Edit::engine |
A reference to the Engine.
Referenced by tracktion::engine::WarpTimeRenderJob::getOrCreateRenderJob(), and tracktion::engine::AudioTrack::processAudioNodesWhileMuted().
EditFileRetriever tracktion::engine::Edit::editFileRetriever |
This callback can be set to return the file for this Edit.
By default this uses ProjectManager to find a matching file for the Edit's ProjectItemID but this can be overriden for custom behaviour.
FilePathResolver tracktion::engine::Edit::filePathResolver |
This callback can be set to resolve file paths.
By default:
You can set a custom resolver here in case the Edit is in memory or the files directory is different to the Edit file's location.
|
staticconstexpr |
The maximum length an Edit can be.
Referenced by getMaximumEditTimeRange(), and getMaximumLength().
|
static |
The number of ticks per quarter note.
EditItemCache<Track> tracktion::engine::Edit::trackCache |
EditItemCache<ClipSlot> tracktion::engine::Edit::clipSlotCache |
EditItemCache<Clip> tracktion::engine::Edit::clipCache |
TempoSequence tracktion::engine::Edit::tempoSequence |
The global TempoSequence of this Edit.
Referenced by tracktion::engine::benchmark_utilities::renderEdit().
PitchSequence tracktion::engine::Edit::pitchSequence |
The global PitchSequence of this Edit.
juce::CachedValue<juce::String> tracktion::engine::Edit::lastSignificantChange |
The last time a change was made to the Edit.
juce::CachedValue<TimeDuration> tracktion::engine::Edit::masterFadeIn |
The duration in seconds of the fade in.
juce::CachedValue<TimeDuration> tracktion::engine::Edit::masterFadeOut |
The duration in seconds of the fade out.
juce::CachedValue<TimeDuration> tracktion::engine::Edit::timecodeOffset |
The duration in seconds of the timecode offset.
Referenced by getTimecodeOffset().
juce::CachedValue<TimeDuration> tracktion::engine::Edit::videoOffset |
The duration in seconds of the video offset.
juce::CachedValue<AudioFadeCurve::Type> tracktion::engine::Edit::masterFadeInType |
The curve type of the fade in.
juce::CachedValue<AudioFadeCurve::Type> tracktion::engine::Edit::masterFadeOutType |
The curve type of the fade out.
juce::CachedValue<bool> tracktion::engine::Edit::midiTimecodeSourceDeviceEnabled |
Whether a MIDI timecode source is enabled.
Referenced by isTimecodeSyncEnabled().
juce::CachedValue<bool> tracktion::engine::Edit::midiTimecodeIgnoringHours |
Whether the MIDI timecode source ignores hours.
Referenced by isMidiTimecodeIgnoringHours().
juce::CachedValue<bool> tracktion::engine::Edit::videoMuted |
Whether the video source is muted.
juce::CachedValue<bool> tracktion::engine::Edit::clickTrackEnabled |
Whether the click track is enabled.
juce::CachedValue<bool> tracktion::engine::Edit::clickTrackEmphasiseBars |
Whether the click track should emphasise bars.
juce::CachedValue<bool> tracktion::engine::Edit::clickTrackRecordingOnly |
Whether the click track should be audible only when recording.
juce::CachedValue<bool> tracktion::engine::Edit::recordingPunchInOut |
Whether recoridng only happens within the in/out markers.
juce::CachedValue<bool> tracktion::engine::Edit::playInStopEnabled |
Whether the audio engine should run when playback is stopped.
juce::CachedValue<float> tracktion::engine::Edit::clickTrackGain |
The gain of the click track.
Referenced by getClickTrackVolume().
juce::CachedValue<ProjectItemID> tracktion::engine::Edit::videoSource |
The ProjectItemID of the video source.
juce::ValueTree tracktion::engine::Edit::state { IDs::EDIT } |
The ValueTree of the Edit state.
juce::ValueTree tracktion::engine::Edit::inputDeviceState |
The ValueTree of the input device states.