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

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
tracktion::engine::Edit Class Reference

The Tracktion Edit class! More...

#include "tracktion_Edit.h"

Inheritance diagram for tracktion::engine::Edit:
tracktion::engine::Selectable juce::Timer

Classes

struct  ChangedPluginsList
 
struct  EditChangeResetterTimer
 
struct  FrozenTrackCallback
 
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  MirroredPluginUpdateTimer
 
struct  Options
 Determines how the Edit will be created. More...
 
struct  PluginChangeTimer
 
struct  ScopedRenderStatus
 Temporarily removes an Edit from the device manager, optionally re-adding it on destruction. More...
 
struct  TreeWatcher
 
struct  UndoTransactionInhibitor
 Disables the creation of a new transaction. More...
 
struct  UndoTransactionTimer
 
struct  WastedMidiMessagesListener
 Interface for classes that need to know about unused MIDI messages. More...
 

Public Types

enum  EditRole {
  playDisabled , proxiesDisabled , pluginsDisabled , forEditing ,
  forRendering , forExporting , forExamining
}
 Enum used to determine what an Edit is being used for. More...
 
enum class  CountIn {
  none , oneBar , twoBar , twoBeat ,
  oneBeat
}
 An enum to determine the duration of the count in. More...
 
- Public Types inherited from tracktion::engine::Selectable
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.
 
EditInputDevicesgetEditInputDevices () noexcept
 Returns the EditInputDevices for the Edit.
 
InputDeviceInstancegetCurrentInstanceForInputDevice (InputDevice *) const
 Returns an InputDeviceInstance for a global InputDevice.
 
juce::Array< InputDeviceInstance * > getAllInputDevices () const
 Returns all the active InputDeviceInstance[s] in the Edit.
 
TransportControlgetTransport () const noexcept
 Returns the TransportControl which is used to stop/stop/position playback and recording.
 
EditPlaybackContextgetCurrentPlaybackContext () const
 Returns the active EditPlaybackContext which is what is attached to the DeviceManager.
 
ParameterChangeHandlergetParameterChangeHandler () noexcept
 Returns the ParameterChangeHandler for the Edit.
 
ParameterControlMappingsgetParameterControlMappings () noexcept
 Returns the ParameterControlMappings for the Edit.
 
AutomationRecordManagergetAutomationRecordManager () noexcept
 Returns the AutomationRecordManager for the Edit.
 
AbletonLinkgetAbletonLink () 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::UndoManagergetUndoManager () 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.
 
TrackListgetTrackList ()
 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< AudioTrackinsertNewAudioTrack (TrackInsertPoint, SelectionManager *)
 Inserts a new AudioTrack in the Edit.
 
juce::ReferenceCountedObjectPtr< FolderTrackinsertNewFolderTrack (TrackInsertPoint, SelectionManager *, bool asSubmix)
 Inserts a new FolderTrack in the Edit, optionally as a submix.
 
juce::ReferenceCountedObjectPtr< AutomationTrackinsertNewAutomationTrack (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.
 
void 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.
 
ArrangerTrackgetArrangerTrack () const
 Returns the global ArrangerTrack.
 
MarkerTrackgetMarkerTrack () const
 Returns the global MarkerTrack.
 
TempoTrackgetTempoTrack () const
 Returns the global TempoTrack.
 
ChordTrackgetChordTrack () const
 Returns the global ChordTrack.
 
MasterTrackgetMasterTrack () 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.
 
LaunchQuantisationgetLaunchQuantisation ()
 Returns the global launch quantisation.
 
SceneListgetSceneList ()
 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.
 
PluginListgetMasterPluginList () 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.
 
MacroParameterElementgetGlobalMacros () 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< EditItemIDgetLowLatencyDisabledPlugins ()
 Returns the current set of diabled plugins.
 
RackTypeListgetRackList () const noexcept
 Returns the RackTypeList which contains all the RackTypes for the Edit.
 
TrackCompManagergetTrackCompManager () 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.
 
PluginCachegetPluginCache () 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< MidiInputDevicegetCurrentMidiTimecodeSource () 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< MidiInputDevicegetCurrentMidiMachineControlSource () 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.
 
MidiOutputDevicegetCurrentMidiMachineControlDest () 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.
 
MarkerManagergetMarkerManager () const noexcept
 Returns the MarkerManager.
 
ARADocumentHoldergetARADocument ()
 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.
 
- Public Member Functions inherited from tracktion::engine::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< EditcreateEdit (Options)
 Creates an Edit for the given options.
 
static std::unique_ptr< EditcreateEditForPreviewingFile (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< EditcreateEditForPreviewingPreset (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< EditcreateEditForPreviewingClip (Clip &)
 Creates an Edit for previewing a Clip.
 
static std::unique_ptr< EditcreateSingleTrackEdit (Engine &, EditRole role=EditRole::forEditing)
 Creates an Edit with a single AudioTrack.
 
static std::unique_ptr< EditcreateEditForExamining (Engine &, juce::ValueTree, EditRole role=EditRole::forExamining)
 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 Public Member Functions inherited from tracktion::engine::Selectable
static void initialise ()
 
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted.
 

Public Attributes

Engineengine
 A reference to the Engine.
 
std::function< juce::File()> editFileRetriever
 This callback can be set to return the file for this Edit.
 
std::function< juce::File(const juce::String &)> filePathResolver
 This callback can be set to resolve file paths.
 
EditItemCache< TracktrackCache
 Quick way to find and iterate all Track[s] in the Edit.
 
EditItemCache< ClipSlotclipSlotCache
 Quick way to find and iterate all ClipSlot[s] in the Edit.
 
EditItemCache< ClipclipCache
 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::StringlastSignificantChange
 The last time a change was made to the Edit.
 
juce::CachedValue< TimeDurationmasterFadeIn
 The duration in seconds of the fade in.
 
juce::CachedValue< TimeDurationmasterFadeOut
 The duration in seconds of the fade out.
 
juce::CachedValue< TimeDurationtimecodeOffset
 The duration in seconds of the timecode offset.
 
juce::CachedValue< TimeDurationvideoOffset
 The duration in seconds of the video offset.
 
juce::CachedValue< AudioFadeCurve::TypemasterFadeInType
 The curve type of the fade in.
 
juce::CachedValue< AudioFadeCurve::TypemasterFadeOutType
 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< floatclickTrackGain
 The gain of the click track.
 
juce::CachedValue< ProjectItemIDvideoSource
 The ProjectItemID of the video source.
 
juce::ValueTree state
 The ValueTree of the Edit state.
 
juce::ValueTree inputDeviceState
 The ValueTree of the input device states.
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 

Static Public Attributes

static constexpr double maximumLength
 The maximum length an Edit can be.
 
static const int ticksPerQuarterNote
 The number of ticks per quarter note.
 

Friends

struct TrackList
 

Detailed Description

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>.

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.

See also
EditFileOperations, tracktion_EditUtilities.h

Definition at line 63 of file tracktion_Edit.h.


Class Documentation

◆ tracktion::engine::Edit::LoadContext

struct tracktion::engine::Edit::LoadContext

A context passed to the Options struct which will get updated about load process and can be signaled to stop loading the Edit.

Definition at line 85 of file tracktion_Edit.h.

Class Members
atomic< bool > completed Set to true once the Edit has loaded.
atomic< float > progress Progress will be updated as the Edit loads.
atomic< bool > shouldExit Can be set to true to cancel loading the Edit.

◆ tracktion::engine::Edit::Metadata

struct tracktion::engine::Edit::Metadata

Metadata for the Edit.

Definition at line 730 of file tracktion_Edit.h.

Class Members
String album
String artist
String comment
String date
String genre
String title
String trackNumber

◆ tracktion::engine::Edit::Options

struct tracktion::engine::Edit::Options

Determines how the Edit will be created.

Definition at line 94 of file tracktion_Edit.h.

Class Members
function< File()> editFileRetriever An optional editFileRetriever to use.
ProjectItemID editProjectItemID The editProjectItemID, must be valid.
ValueTree editState The Edit state.
See also
createEmptyEdit
Engine & engine The Engine to use.
function< File(const String &)> filePathResolver An optional filePathResolver to use.
LoadContext * loadContext An optional context to be monitor for loading status.
uint32_t numAudioTracks If non-zero, will ensure the edit has this many audio tracks.
int numUndoLevelsToStore The number of undo levels to use.
EditRole role An optional role to open the Edit with.

Member Enumeration Documentation

◆ CountIn

An enum to determine the duration of the count in.

Enumerator
none 

No count in, play starts immidiately.

oneBar 

One bar count in.

twoBar 

Two bars count in.

twoBeat 

Two beats count in.

oneBeat 

One beat count in.

Definition at line 679 of file tracktion_Edit.h.

◆ EditRole

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).

Definition at line 69 of file tracktion_Edit.h.

Constructor & Destructor Documentation

◆ Edit() [1/2]

tracktion::engine::Edit::Edit ( Options  options)

Creates an Edit from a set of Options.

Definition at line 569 of file tracktion_Edit.cpp.

◆ Edit() [2/2]

tracktion::engine::Edit::Edit ( Engine e,
EditRole  roleToUse 
)

Creates a new, empty Edit with default options for a given role.

Definition at line 665 of file tracktion_Edit.cpp.

◆ ~Edit()

tracktion::engine::Edit::~Edit ( )
override

Destructor.

Definition at line 671 of file tracktion_Edit.cpp.

Member Function Documentation

◆ addModifierTimer()

void tracktion::engine::Edit::addModifierTimer ( ModifierTimer mt)

Adds a ModifierTimer to be updated each block.

Definition at line 2202 of file tracktion_Edit.cpp.

◆ addWastedMidiMessagesListener()

void tracktion::engine::Edit::addWastedMidiMessagesListener ( WastedMidiMessagesListener l)

Add a WastedMidiMessagesListener to be notified of wasted MIDI messages.

Definition at line 1156 of file tracktion_Edit.cpp.

◆ areAnyClipsUsingFile()

bool tracktion::engine::Edit::areAnyClipsUsingFile ( const AudioFile af)

Returns true if any clips are using this file.

Definition at line 2552 of file tracktion_Edit.cpp.

◆ areAnyTracksMuted()

bool tracktion::engine::Edit::areAnyTracksMuted ( ) const

Returns true if any tracks are muted.

Definition at line 1365 of file tracktion_Edit.cpp.

◆ areAnyTracksSolo()

bool tracktion::engine::Edit::areAnyTracksSolo ( ) const

Returns true if any tracks are soloed.

Definition at line 1370 of file tracktion_Edit.cpp.

◆ areAnyTracksSoloIsolate()

bool tracktion::engine::Edit::areAnyTracksSoloIsolate ( ) const

Returns true if any tracks are solo isolated.

Definition at line 1375 of file tracktion_Edit.cpp.

◆ cancelAllProxyGeneratorJobs()

void tracktion::engine::Edit::cancelAllProxyGeneratorJobs ( ) const

Stops all proxy generator jobs clips may be performing.

Definition at line 2561 of file tracktion_Edit.cpp.

◆ canRenderProxies()

bool tracktion::engine::Edit::canRenderProxies ( ) const
noexcept

Returns true if this Edit can render proxy files.

Definition at line 157 of file tracktion_Edit.h.

◆ copyTrack()

void tracktion::engine::Edit::copyTrack ( Track::Ptr  t,
TrackInsertPoint  destination 
)

Copies a track to a new position.

Definition at line 1883 of file tracktion_Edit.cpp.

◆ createEdit()

std::unique_ptr< Edit > tracktion::engine::Edit::createEdit ( Options  options)
static

Creates an Edit for the given options.

Definition at line 2807 of file tracktion_Edit.cpp.

◆ createEditForExamining()

std::unique_ptr< Edit > tracktion::engine::Edit::createEditForExamining ( Engine e,
juce::ValueTree  editState,
EditRole  role = EditRole::forExamining 
)
static

Creates an Edit that loads a state, using the role Edit::forExamining.

Definition at line 3244 of file tracktion_Edit.cpp.

◆ createEditForPreviewingClip()

std::unique_ptr< Edit > tracktion::engine::Edit::createEditForPreviewingClip ( Clip clip)
static

Creates an Edit for previewing a Clip.

Definition at line 3200 of file tracktion_Edit.cpp.

◆ createEditForPreviewingFile()

std::unique_ptr< Edit > tracktion::engine::Edit::createEditForPreviewingFile ( Engine engine,
const juce::File file,
const Edit editToMatch,
bool  tryToMatchTempo,
bool  tryToMatchPitch,
bool *  couldMatchTempo,
juce::ValueTree  midiPreviewPlugin,
juce::ValueTree  midiDrumPreviewPlugin = {},
bool  forceMidiToDrums = false,
std::unique_ptr< Edit editToUpdate = {} 
)
static

Creates an Edit for previewing a file.

Definition at line 2999 of file tracktion_Edit.cpp.

◆ createEditForPreviewingPreset()

std::unique_ptr< Edit > tracktion::engine::Edit::createEditForPreviewingPreset ( Engine engine,
juce::ValueTree  v,
const Edit editToMatch,
bool  tryToMatchTempo,
bool *  couldMatchTempo,
juce::ValueTree  midiPreviewPlugin,
juce::ValueTree  midiDrumPreviewPlugin = {},
bool  forceMidiToDrums = false,
std::unique_ptr< Edit editToUpdate = {} 
)
static

Creates an Edit for previewing a preset.

Definition at line 2812 of file tracktion_Edit.cpp.

◆ createNewItemID() [1/2]

EditItemID tracktion::engine::Edit::createNewItemID ( ) const

Returns a new EditItemID to use for a new EditItem.

Definition at line 1238 of file tracktion_Edit.cpp.

◆ createNewItemID() [2/2]

EditItemID tracktion::engine::Edit::createNewItemID ( const std::vector< EditItemID > &  idsToAvoid) const

Returns a new EditItemID to use for a new EditItem, avoiding some IDs.

Definition at line 1209 of file tracktion_Edit.cpp.

◆ createSingleTrackEdit()

std::unique_ptr< Edit > tracktion::engine::Edit::createSingleTrackEdit ( Engine e,
EditRole  role = EditRole::forEditing 
)
static

Creates an Edit with a single AudioTrack.

Definition at line 3239 of file tracktion_Edit.cpp.

◆ deleteTrack()

void tracktion::engine::Edit::deleteTrack ( Track t)

Deletes a Track.

Definition at line 1995 of file tracktion_Edit.cpp.

◆ dispatchPendingUpdatesSynchronously()

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.

Definition at line 1702 of file tracktion_Edit.cpp.

◆ enableTimecodeSync()

void tracktion::engine::Edit::enableTimecodeSync ( bool  b)

Toggles syncing to MIDI timecode.

See also
midiTimecodeSourceDeviceEnabled

Definition at line 1435 of file tracktion_Edit.cpp.

◆ ensureArrangerTrack()

void tracktion::engine::Edit::ensureArrangerTrack ( )

Creates an ArrangerTrack if there isn't currently one.

Definition at line 2090 of file tracktion_Edit.cpp.

◆ ensureChordTrack()

void tracktion::engine::Edit::ensureChordTrack ( )

Creates a ChordTrack if there isn't currently one.

Definition at line 2127 of file tracktion_Edit.cpp.

◆ ensureMarkerTrack()

void tracktion::engine::Edit::ensureMarkerTrack ( )

Creates a MarkerTrack if there isn't currently one.

Definition at line 2112 of file tracktion_Edit.cpp.

◆ ensureMasterTrack()

void tracktion::engine::Edit::ensureMasterTrack ( )

Creates a MasterTrack if there isn't currently one.

Definition at line 2142 of file tracktion_Edit.cpp.

◆ ensureNumberOfAudioTracks()

void tracktion::engine::Edit::ensureNumberOfAudioTracks ( int  minimumNumTracks)

Creates new tracks to ensure the minimum number.

Definition at line 2157 of file tracktion_Edit.cpp.

◆ ensureTempoTrack()

void tracktion::engine::Edit::ensureTempoTrack ( )

Creates a TempoTrack if there isn't currently one.

Definition at line 2101 of file tracktion_Edit.cpp.

◆ findClipsInLinkGroup()

juce::Array< Clip * > tracktion::engine::Edit::findClipsInLinkGroup ( juce::String  linkGroupID) const

Returns and Clip[s] with the given linkGroupID.

See also
Clip::setLinkGroupID

Definition at line 1755 of file tracktion_Edit.cpp.

◆ flushPluginStateIfNeeded()

void tracktion::engine::Edit::flushPluginStateIfNeeded ( Plugin p)

Saves the specified plugin state to the state ValueTree.

Definition at line 1106 of file tracktion_Edit.cpp.

◆ flushState()

void tracktion::engine::Edit::flushState ( )

Saves the plugin, automap and ARA states to the state ValueTree.

Definition at line 1073 of file tracktion_Edit.cpp.

◆ getAbletonLink()

AbletonLink & tracktion::engine::Edit::getAbletonLink ( ) const
noexcept

Returns the AbletonLink object.

Used to sync an Edit's playback with an AbletonLink session.

Definition at line 1147 of file tracktion_Edit.cpp.

◆ getAllAutomatableParams()

juce::Array< AutomatableParameter * > tracktion::engine::Edit::getAllAutomatableParams ( bool  includeTrackParams) const

Returns all automatable parameters in an Edit.

Parameters
includeTrackParamsWhether to include plugins on tracks and clips

Definition at line 2636 of file tracktion_Edit.cpp.

◆ getAllInputDevices()

juce::Array< InputDeviceInstance * > tracktion::engine::Edit::getAllInputDevices ( ) const

Returns all the active InputDeviceInstance[s] in the Edit.

Definition at line 2308 of file tracktion_Edit.cpp.

◆ getARADocument()

ARADocumentHolder & tracktion::engine::Edit::getARADocument ( )

Returns the ARA document handler.

Definition at line 1048 of file tracktion_Edit.cpp.

◆ getArrangerTrack()

ArrangerTrack * tracktion::engine::Edit::getArrangerTrack ( ) const

Returns the global ArrangerTrack.

Definition at line 2746 of file tracktion_Edit.cpp.

◆ getAutomapState()

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.

See also
NovationAutomap

Definition at line 1040 of file tracktion_Edit.cpp.

◆ getAutomationRecordManager()

AutomationRecordManager & tracktion::engine::Edit::getAutomationRecordManager ( )
noexcept

Returns the AutomationRecordManager for the Edit.

Used to change automation read/write modes and start/stop automation recording.

Definition at line 266 of file tracktion_Edit.h.

◆ getAuxBusName()

juce::String tracktion::engine::Edit::getAuxBusName ( int  bus) const

Returns the name of an aux bus.

Definition at line 1663 of file tracktion_Edit.cpp.

◆ getChordTrack()

ChordTrack * tracktion::engine::Edit::getChordTrack ( ) const

Returns the global ChordTrack.

Definition at line 2761 of file tracktion_Edit.cpp.

◆ getClickTrackDevice()

juce::String tracktion::engine::Edit::getClickTrackDevice ( ) const

Returns the name of the device being used as the click track output.

Definition at line 2343 of file tracktion_Edit.cpp.

◆ getClickTrackRange()

TimeRange tracktion::engine::Edit::getClickTrackRange ( ) const
noexcept

Returns the range the click track will be audible within.

Definition at line 2338 of file tracktion_Edit.cpp.

◆ getClickTrackVolume()

float tracktion::engine::Edit::getClickTrackVolume ( ) const
noexcept

Returns the click track volume.

Definition at line 663 of file tracktion_Edit.h.

◆ getCountInMode()

Edit::CountIn tracktion::engine::Edit::getCountInMode ( ) const

Returns the duration of the count in.

Definition at line 2387 of file tracktion_Edit.cpp.

◆ getCurrentInstanceForInputDevice()

InputDeviceInstance * tracktion::engine::Edit::getCurrentInstanceForInputDevice ( InputDevice d) const

Returns an InputDeviceInstance for a global InputDevice.

Definition at line 2300 of file tracktion_Edit.cpp.

◆ getCurrentMidiMachineControlDest()

MidiOutputDevice * tracktion::engine::Edit::getCurrentMidiMachineControlDest ( ) const

Returns the MidiInputDevice being used as an MMC destination.

Definition at line 1484 of file tracktion_Edit.cpp.

◆ getCurrentMidiMachineControlSource()

std::shared_ptr< MidiInputDevice > tracktion::engine::Edit::getCurrentMidiMachineControlSource ( ) const

Returns the MidiInputDevice being used as an MMC source.

Definition at line 1468 of file tracktion_Edit.cpp.

◆ getCurrentMidiTimecodeSource()

std::shared_ptr< MidiInputDevice > tracktion::engine::Edit::getCurrentMidiTimecodeSource ( ) const

Returns the MidiInputDevice being used as the MIDI timecode source.

Definition at line 1414 of file tracktion_Edit.cpp.

◆ getCurrentPlaybackContext()

EditPlaybackContext * tracktion::engine::Edit::getCurrentPlaybackContext ( ) const

Returns the active EditPlaybackContext which is what is attached to the DeviceManager.

Definition at line 1142 of file tracktion_Edit.cpp.

◆ getDefaultNumUndoLevels()

static int tracktion::engine::Edit::getDefaultNumUndoLevels ( )
staticnoexcept

Returns the default number of undo levels that should be used.

Definition at line 338 of file tracktion_Edit.h.

◆ getEditInputDevices()

EditInputDevices & tracktion::engine::Edit::getEditInputDevices ( )
noexcept

Returns the EditInputDevices for the Edit.

Definition at line 2316 of file tracktion_Edit.cpp.

◆ getEditMetadata()

Edit::Metadata tracktion::engine::Edit::getEditMetadata ( )

Returns the current Metadata for the Edit.

Definition at line 2771 of file tracktion_Edit.cpp.

◆ getEditRole()

EditRole tracktion::engine::Edit::getEditRole ( ) const
noexcept

Returns the EditRole.

Definition at line 151 of file tracktion_Edit.h.

◆ getFirstClipTime()

TimePosition tracktion::engine::Edit::getFirstClipTime ( ) const

Returns the time of first clip.

Definition at line 1738 of file tracktion_Edit.cpp.

◆ getGlobalMacros()

MacroParameterElement & tracktion::engine::Edit::getGlobalMacros ( ) const

Returns global MacroParameterElement.

Definition at line 496 of file tracktion_Edit.h.

◆ getIsPreviewEdit()

bool tracktion::engine::Edit::getIsPreviewEdit ( ) const
noexcept

Returns true if this Edit is a temporary Edit for previewing files/clips etc.

Definition at line 163 of file tracktion_Edit.h.

◆ getLaunchQuantisation()

LaunchQuantisation & tracktion::engine::Edit::getLaunchQuantisation ( )

Returns the global launch quantisation.

Definition at line 1405 of file tracktion_Edit.cpp.

◆ getLength()

TimeDuration tracktion::engine::Edit::getLength ( ) const

Returns the end time of last clip.

Definition at line 1725 of file tracktion_Edit.cpp.

◆ getLowLatencyDisabledPlugins()

juce::Array< EditItemID > tracktion::engine::Edit::getLowLatencyDisabledPlugins ( )

Returns the current set of diabled plugins.

Definition at line 512 of file tracktion_Edit.h.

◆ getLowLatencyMonitoring()

bool tracktion::engine::Edit::getLowLatencyMonitoring ( ) const
noexcept

Returns true if in low latency monitoring mode.

Definition at line 503 of file tracktion_Edit.h.

◆ getMarkerManager()

MarkerManager & tracktion::engine::Edit::getMarkerManager ( ) const
noexcept

Returns the MarkerManager.

Definition at line 750 of file tracktion_Edit.h.

◆ getMarkerTrack()

MarkerTrack * tracktion::engine::Edit::getMarkerTrack ( ) const

Returns the global MarkerTrack.

Definition at line 2751 of file tracktion_Edit.cpp.

◆ getMasterPanParameter()

AutomatableParameter::Ptr tracktion::engine::Edit::getMasterPanParameter ( ) const

Returns the master pan AutomatableParameter.

Definition at line 573 of file tracktion_Edit.h.

◆ getMasterPluginList()

PluginList & tracktion::engine::Edit::getMasterPluginList ( ) const
noexcept

Returns the master PluginList.

Definition at line 476 of file tracktion_Edit.h.

◆ getMasterSliderPosParameter()

AutomatableParameter::Ptr tracktion::engine::Edit::getMasterSliderPosParameter ( ) const

Returns the master volume AutomatableParameter.

N.B. this is in slider position, not dB

Definition at line 570 of file tracktion_Edit.h.

◆ getMasterTrack()

MasterTrack * tracktion::engine::Edit::getMasterTrack ( ) const

Returns the global MasterTrack.

Definition at line 2766 of file tracktion_Edit.cpp.

◆ getMasterVolumePlugin()

VolumeAndPanPlugin::Ptr tracktion::engine::Edit::getMasterVolumePlugin ( ) const

Returns the master VolumeAndPanPlugin.

Definition at line 565 of file tracktion_Edit.h.

◆ getMaximumEditEnd()

static TimePosition tracktion::engine::Edit::getMaximumEditEnd ( )
static

Definition at line 175 of file tracktion_Edit.h.

◆ getMaximumEditTimeRange()

static TimeRange tracktion::engine::Edit::getMaximumEditTimeRange ( )
static

Returns the maximum length an Edit can be.

Definition at line 173 of file tracktion_Edit.h.

◆ getMaximumLength()

static TimeDuration tracktion::engine::Edit::getMaximumLength ( )
static

Returns the maximum length an Edit can be.

Definition at line 170 of file tracktion_Edit.h.

◆ getName()

juce::String tracktion::engine::Edit::getName ( )

Returns the name of the Edit if a ProjectItem can be found for it.

Definition at line 733 of file tracktion_Edit.cpp.

◆ getNextTimeOfInterest()

TimePosition tracktion::engine::Edit::getNextTimeOfInterest ( TimePosition  afterThisTime)

Finds the next marker or start/end of a clip after a certain time.

Definition at line 1280 of file tracktion_Edit.cpp.

◆ getNumCountInBeats()

int tracktion::engine::Edit::getNumCountInBeats ( ) const

Returns the number of beats of the count in.

Definition at line 2392 of file tracktion_Edit.cpp.

◆ getParameterChangeHandler()

ParameterChangeHandler & tracktion::engine::Edit::getParameterChangeHandler ( )
noexcept

Returns the ParameterChangeHandler for the Edit.

Definition at line 258 of file tracktion_Edit.h.

◆ getParameterControlMappings()

ParameterControlMappings & tracktion::engine::Edit::getParameterControlMappings ( )
noexcept

Returns the ParameterControlMappings for the Edit.

Definition at line 261 of file tracktion_Edit.h.

◆ getPluginCache()

PluginCache & tracktion::engine::Edit::getPluginCache ( )
noexcept

Returns the PluginCache which manages all active Plugin[s] for this Edit.

Definition at line 2168 of file tracktion_Edit.cpp.

◆ getPreviewLevelMeasurer()

SharedLevelMeasurer::Ptr tracktion::engine::Edit::getPreviewLevelMeasurer ( )

Returns a previously set SharedLevelMeasurer.

Definition at line 800 of file tracktion_Edit.h.

◆ getPreviousTimeOfInterest()

TimePosition tracktion::engine::Edit::getPreviousTimeOfInterest ( TimePosition  beforeThisTime)

Finds the previous marker or start/end of a clip after a certain time.

Definition at line 1298 of file tracktion_Edit.cpp.

◆ getProjectItemID()

ProjectItemID tracktion::engine::Edit::getProjectItemID ( ) const
noexcept

Returns the ProjectItemID of the Edit.

Definition at line 147 of file tracktion_Edit.h.

◆ getRackList()

RackTypeList & tracktion::engine::Edit::getRackList ( ) const
noexcept

Returns the RackTypeList which contains all the RackTypes for the Edit.

Definition at line 516 of file tracktion_Edit.h.

◆ getSceneList()

SceneList & tracktion::engine::Edit::getSceneList ( )

Returns a list of Scenes in the Edit.

Definition at line 1397 of file tracktion_Edit.cpp.

◆ getSelectableDescription()

juce::String tracktion::engine::Edit::getSelectableDescription ( )
overridevirtual

Retuns the description of this Selectable.

Implements tracktion::engine::Selectable.

Definition at line 304 of file tracktion_Edit.h.

◆ getTempDirectory()

juce::File tracktion::engine::Edit::getTempDirectory ( bool  createIfNonExistent) const

Returns the temp directory the Edit it using.

Definition at line 2580 of file tracktion_Edit.cpp.

◆ getTempoTrack()

TempoTrack * tracktion::engine::Edit::getTempoTrack ( ) const

Returns the global TempoTrack.

Definition at line 2756 of file tracktion_Edit.cpp.

◆ getTimecodeFormat()

TimecodeDisplayFormat tracktion::engine::Edit::getTimecodeFormat ( ) const

Returns the current TimecodeDisplayFormat.

Definition at line 1586 of file tracktion_Edit.cpp.

◆ getTimecodeOffset()

TimeDuration tracktion::engine::Edit::getTimecodeOffset ( ) const
noexcept

Returns the offset to apply to MIDI timecode.

Definition at line 626 of file tracktion_Edit.h.

◆ getTimeOfLastChange()

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.

Definition at line 1111 of file tracktion_Edit.cpp.

◆ getTrackCompManager()

TrackCompManager & tracktion::engine::Edit::getTrackCompManager ( ) const
noexcept

Returns the TrackCompManager for the Edit.

Definition at line 519 of file tracktion_Edit.h.

◆ getTrackList()

TrackList & tracktion::engine::Edit::getTrackList ( )

Returns the TrackList for the Edit which contains all the top level tracks.

Definition at line 348 of file tracktion_Edit.h.

◆ getTransport()

TransportControl & tracktion::engine::Edit::getTransport ( ) const
noexcept

Returns the TransportControl which is used to stop/stop/position playback and recording.

Definition at line 251 of file tracktion_Edit.h.

◆ getUndoManager()

juce::UndoManager & tracktion::engine::Edit::getUndoManager ( )
noexcept

Returns the juce::UndoManager used for this Edit.

Definition at line 308 of file tracktion_Edit.h.

◆ getVideoFile()

juce::File tracktion::engine::Edit::getVideoFile ( ) const

Returns the currently set video file.

Definition at line 2626 of file tracktion_Edit.cpp.

◆ hasChangedSinceSaved()

bool tracktion::engine::Edit::hasChangedSinceSaved ( ) const

Returns true if the Edit has changed since it was last saved.

Definition at line 1129 of file tracktion_Edit.cpp.

◆ initialiseAllPlugins()

void tracktion::engine::Edit::initialiseAllPlugins ( )

Initialises all the plugins.

Usually you'd call this once after loading an Edit.

Definition at line 2291 of file tracktion_Edit.cpp.

◆ insertNewAudioTrack()

AudioTrack::Ptr tracktion::engine::Edit::insertNewAudioTrack ( TrackInsertPoint  insertPoint,
SelectionManager sm 
)

Inserts a new AudioTrack in the Edit.

Definition at line 1804 of file tracktion_Edit.cpp.

◆ insertNewAutomationTrack()

AutomationTrack::Ptr tracktion::engine::Edit::insertNewAutomationTrack ( TrackInsertPoint  insertPoint,
SelectionManager sm 
)

Inserts a new AutomationTrack in the Edit.

Definition at line 1826 of file tracktion_Edit.cpp.

◆ insertNewFolderTrack()

FolderTrack::Ptr tracktion::engine::Edit::insertNewFolderTrack ( TrackInsertPoint  insertPoint,
SelectionManager sm,
bool  asSubmix 
)

Inserts a new FolderTrack in the Edit, optionally as a submix.

Definition at line 1815 of file tracktion_Edit.cpp.

◆ insertNewTrack()

Track::Ptr tracktion::engine::Edit::insertNewTrack ( TrackInsertPoint  insertPoint,
const juce::Identifier xmlType,
SelectionManager sm 
)

Inserts a new Track with the given type in the Edit.

Definition at line 1835 of file tracktion_Edit.cpp.

◆ insertTrack() [1/2]

Track::Ptr tracktion::engine::Edit::insertTrack ( juce::ValueTree  v,
juce::ValueTree  parent,
juce::ValueTree  preceeding,
SelectionManager sm 
)

Inserts a new Track with the given state in the Edit.

Parameters
parentThe track the new track should be nested in to. If this is invalid, it will be a top-level track.
preceedingThe track new track should go after. If this is invalid, it will go at the end of the list.

Definition at line 1781 of file tracktion_Edit.cpp.

◆ insertTrack() [2/2]

Track::Ptr tracktion::engine::Edit::insertTrack ( TrackInsertPoint  insertPoint,
juce::ValueTree  v,
SelectionManager sm 
)

Inserts a new Track with the given state in the Edit.

Definition at line 1763 of file tracktion_Edit.cpp.

◆ invalidateStoredLength()

void tracktion::engine::Edit::invalidateStoredLength ( )
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.

Definition at line 708 of file tracktion_Edit.h.

◆ isClickTrackDevice()

bool tracktion::engine::Edit::isClickTrackDevice ( OutputDevice dev) const

Returns true if the given OutputDevice is being used as the click track output.

Definition at line 2355 of file tracktion_Edit.cpp.

◆ isLoading()

bool tracktion::engine::Edit::isLoading ( ) const

Returns true if the Edit's not yet fully loaded.

Definition at line 198 of file tracktion_Edit.h.

◆ isMidiTimecodeIgnoringHours()

bool tracktion::engine::Edit::isMidiTimecodeIgnoringHours ( ) const

Returns true if hours are ignored when syncing to MIDI timecode.

Definition at line 632 of file tracktion_Edit.h.

◆ isRendering()

bool tracktion::engine::Edit::isRendering ( ) const
noexcept

Returns true if the Edit is currently being rendered.

Definition at line 296 of file tracktion_Edit.h.

◆ isTimecodeSyncEnabled()

bool tracktion::engine::Edit::isTimecodeSyncEnabled ( ) const
noexcept

Returns true if syncing to MIDI timecode is enabled.

Definition at line 623 of file tracktion_Edit.h.

◆ markAsChanged()

void tracktion::engine::Edit::markAsChanged ( )

Marks the edit as being significantly changed and should therefore be saved.

Definition at line 1123 of file tracktion_Edit.cpp.

◆ moveTrack()

void tracktion::engine::Edit::moveTrack ( Track::Ptr  t,
TrackInsertPoint  destination 
)

Moves a track to a new position.

Definition at line 1840 of file tracktion_Edit.cpp.

◆ pluginChanged()

void tracktion::engine::Edit::pluginChanged ( Plugin p)
noexcept

Plugins should call this when one of their parameters or state changes to mark the edit as unsaved.

Definition at line 2322 of file tracktion_Edit.cpp.

◆ redo()

void tracktion::engine::Edit::redo ( )

Redoes the changes undone by the last undo.

Definition at line 1202 of file tracktion_Edit.cpp.

◆ removeModifierTimer()

void tracktion::engine::Edit::removeModifierTimer ( ModifierTimer mt)

Removes a ModifierTimer previously added.

Definition at line 2208 of file tracktion_Edit.cpp.

◆ removeWastedMidiMessagesListener()

void tracktion::engine::Edit::removeWastedMidiMessagesListener ( WastedMidiMessagesListener l)

Removes a previously added WastedMidiMessagesListener.

Definition at line 1161 of file tracktion_Edit.cpp.

◆ resetChangedStatus()

void tracktion::engine::Edit::resetChangedStatus ( )

Resets the changed status so hasChangedSinceSaved returns false.

Definition at line 1116 of file tracktion_Edit.cpp.

◆ restartPlayback()

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.

Definition at line 1134 of file tracktion_Edit.cpp.

◆ sendMirrorUpdateToAllPlugins()

void tracktion::engine::Edit::sendMirrorUpdateToAllPlugins ( Plugin plugin) const

Syncronously updates all Plugins[s] mirroring this one.

Definition at line 2174 of file tracktion_Edit.cpp.

◆ sendSourceFileUpdate()

void tracktion::engine::Edit::sendSourceFileUpdate ( )

Sends a 'sourceMediaChanged' call to all the clips.

Definition at line 1633 of file tracktion_Edit.cpp.

◆ sendStartStopMessageToPlugins()

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.

Definition at line 2194 of file tracktion_Edit.cpp.

◆ sendTempoOrPitchSequenceChangedUpdates()

void tracktion::engine::Edit::sendTempoOrPitchSequenceChangedUpdates ( )

Sends a message to all the clips to let them know the tempo or pitch sequence has changed.

@seee Clip::pitchTempoTrackChanged

Definition at line 1623 of file tracktion_Edit.cpp.

◆ setAuxBusName()

void tracktion::engine::Edit::setAuxBusName ( int  bus,
const juce::String name 
)

Sets the name of an aux bus.

Definition at line 1671 of file tracktion_Edit.cpp.

◆ setClickTrackOutput()

void tracktion::engine::Edit::setClickTrackOutput ( const juce::String deviceName)

Sets the device to use as the click track output.

Definition at line 2368 of file tracktion_Edit.cpp.

◆ setClickTrackRange()

void tracktion::engine::Edit::setClickTrackRange ( TimeRange  newTimes)
noexcept

Sets a range for the click track to be audible within.

Definition at line 2332 of file tracktion_Edit.cpp.

◆ setClickTrackVolume()

void tracktion::engine::Edit::setClickTrackVolume ( float  gain)

Sets the volume of the click track.

Definition at line 2374 of file tracktion_Edit.cpp.

◆ setCountInMode()

void tracktion::engine::Edit::setCountInMode ( CountIn  mode)

Sets the duration of the count in.

Definition at line 2382 of file tracktion_Edit.cpp.

◆ setCurrentMidiMachineControlDest()

void tracktion::engine::Edit::setCurrentMidiMachineControlDest ( MidiOutputDevice newDevice)

Sets the MidiInputDevice to be used as an MMC destination.

Definition at line 1496 of file tracktion_Edit.cpp.

◆ setCurrentMidiMachineControlSource()

void tracktion::engine::Edit::setCurrentMidiMachineControlSource ( std::shared_ptr< MidiInputDevice newDevice)

Sets the MidiInputDevice to be used as an MMC source.

Definition at line 1473 of file tracktion_Edit.cpp.

◆ setCurrentMidiTimecodeSource()

void tracktion::engine::Edit::setCurrentMidiTimecodeSource ( std::shared_ptr< MidiInputDevice newDevice)

Sets the MidiInputDevice being to be used as the MIDI timecode source.

Definition at line 1424 of file tracktion_Edit.cpp.

◆ setEditMetadata()

void tracktion::engine::Edit::setEditMetadata ( Metadata  metadata)

Sets the Metadata for the Edit.

Definition at line 2792 of file tracktion_Edit.cpp.

◆ setLowLatencyDisabledPlugins()

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.

Definition at line 2277 of file tracktion_Edit.cpp.

◆ setLowLatencyMonitoring()

void tracktion::engine::Edit::setLowLatencyMonitoring ( bool  enabled,
const juce::Array< EditItemID > &  plugins 
)

Toggles low latency monitoring for a set of plugins.

Definition at line 2222 of file tracktion_Edit.cpp.

◆ setMasterPanPos()

void tracktion::engine::Edit::setMasterPanPos ( float  p)

Returns the master pan position.

Definition at line 1657 of file tracktion_Edit.cpp.

◆ setMasterVolumeSliderPos()

void tracktion::engine::Edit::setMasterVolumeSliderPos ( float  v)

Sets the master volume level.

N.B. this is in slider position, not dB

Definition at line 1652 of file tracktion_Edit.cpp.

◆ setMidiTimecodeIgnoringHours()

void tracktion::engine::Edit::setMidiTimecodeIgnoringHours ( bool  shouldIgnore)

Sets whether hours are ignored when syncing to MIDI timecode.

Definition at line 1507 of file tracktion_Edit.cpp.

◆ setPreviewLevelMeasurer()

void tracktion::engine::Edit::setPreviewLevelMeasurer ( SharedLevelMeasurer::Ptr  p)

Sets a SharedLevelMeasurer to use.

Definition at line 803 of file tracktion_Edit.h.

◆ setProjectItemID()

void tracktion::engine::Edit::setProjectItemID ( ProjectItemID  newID)

Sets the ProjectItemID of the Edit, this is also stored in the state.

Definition at line 741 of file tracktion_Edit.cpp.

◆ setTempDirectory()

void tracktion::engine::Edit::setTempDirectory ( const juce::File dir)

Sets the temp directory for the Edit to use.

Definition at line 2594 of file tracktion_Edit.cpp.

◆ setTimecodeFormat()

void tracktion::engine::Edit::setTimecodeFormat ( TimecodeDisplayFormat  newFormat)

Sets the TimecodeDisplayFormat to use.

Definition at line 1591 of file tracktion_Edit.cpp.

◆ setTimecodeOffset()

void tracktion::engine::Edit::setTimecodeOffset ( TimeDuration  newOffset)

Sets the offset to apply to MIDI timecode.

Definition at line 1457 of file tracktion_Edit.cpp.

◆ setVideoFile()

void tracktion::engine::Edit::setVideoFile ( const juce::File f,
juce::String  importDesc 
)

Sets a video file to display.

Definition at line 2600 of file tracktion_Edit.cpp.

◆ shouldLoadPlugins()

bool tracktion::engine::Edit::shouldLoadPlugins ( ) const
noexcept

Returns true if this Edit can load Plugin[s].

Definition at line 160 of file tracktion_Edit.h.

◆ shouldPlay()

bool tracktion::engine::Edit::shouldPlay ( ) const
noexcept

Returns true if this Edit should be played back (or false if it was just opened for inspection).

Definition at line 154 of file tracktion_Edit.h.

◆ toggleTimecodeMode()

void tracktion::engine::Edit::toggleTimecodeMode ( )

Toggles the TimecodeDisplayFormat through the available TimecodeType[s].

See also
TimecodeType

Definition at line 1605 of file tracktion_Edit.cpp.

◆ undo()

void tracktion::engine::Edit::undo ( )

Undoes the most recent changes made.

Definition at line 1201 of file tracktion_Edit.cpp.

◆ updateMidiTimecodeDevices()

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.

Definition at line 1514 of file tracktion_Edit.cpp.

◆ updateMirroredPlugin()

void tracktion::engine::Edit::updateMirroredPlugin ( Plugin p)

Adds this plugin to a list so mirrored Plugin[s] are updated asyncronously.

Definition at line 2188 of file tracktion_Edit.cpp.

◆ updateModifierTimers()

void tracktion::engine::Edit::updateModifierTimers ( TimePosition  editTime,
int  numSamples 
) const

Updates all the ModifierTimers with a given edit time and number of samples.

Definition at line 2213 of file tracktion_Edit.cpp.

◆ updateMuteSoloStatuses()

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.

Definition at line 1380 of file tracktion_Edit.cpp.

◆ visitAllAutomatableParams()

void tracktion::engine::Edit::visitAllAutomatableParams ( bool  includeTrackParams,
const std::function< void(AutomatableParameter &)> &  visit 
) const

Returns all automatable parameters in an Edit.

Parameters
includeTrackParamsWhether to include plugins on tracks and clips

Definition at line 2691 of file tracktion_Edit.cpp.

◆ visitAllTopLevelTracks()

void tracktion::engine::Edit::visitAllTopLevelTracks ( std::function< bool(Track &)>  f) const

Visits all top-level tracks (i.e.

non-recursively) in the Edit with the given function.

Definition at line 1249 of file tracktion_Edit.cpp.

◆ visitAllTracks()

void tracktion::engine::Edit::visitAllTracks ( std::function< bool(Track &)>  f,
bool  recursive 
) const

Visits all tracks in the Edit with the given function.

Parameters
recursiveWhether to visit nested tracks or just top level tracks.

Definition at line 1255 of file tracktion_Edit.cpp.

◆ visitAllTracksRecursive()

void tracktion::engine::Edit::visitAllTracksRecursive ( std::function< bool(Track &)>  f) const

Visits all tracks in the Edit with the given function.

Return false to stop the traversal.

Definition at line 1243 of file tracktion_Edit.cpp.

◆ warnOfWastedMidiMessages()

void tracktion::engine::Edit::warnOfWastedMidiMessages ( InputDevice d,
Track t 
)

Triggers a callback to any registered WastedMidiMessagesListener[s].

Definition at line 1166 of file tracktion_Edit.cpp.

Friends And Related Symbol Documentation

◆ TrackList

friend struct TrackList
friend

Definition at line 910 of file tracktion_Edit.h.

Member Data Documentation

◆ clickTrackEmphasiseBars

juce::CachedValue<bool> tracktion::engine::Edit::clickTrackEmphasiseBars

Whether the click track should emphasise bars.

Definition at line 820 of file tracktion_Edit.h.

◆ clickTrackEnabled

juce::CachedValue<bool> tracktion::engine::Edit::clickTrackEnabled

Whether the click track is enabled.

Definition at line 819 of file tracktion_Edit.h.

◆ clickTrackGain

juce::CachedValue<float> tracktion::engine::Edit::clickTrackGain

The gain of the click track.

Definition at line 825 of file tracktion_Edit.h.

◆ clickTrackRecordingOnly

juce::CachedValue<bool> tracktion::engine::Edit::clickTrackRecordingOnly

Whether the click track should be audible only when recording.

Definition at line 821 of file tracktion_Edit.h.

◆ clipCache

EditItemCache<Clip> tracktion::engine::Edit::clipCache

Quick way to find and iterate all Clip[s] in the Edit.

Definition at line 237 of file tracktion_Edit.h.

◆ clipSlotCache

EditItemCache<ClipSlot> tracktion::engine::Edit::clipSlotCache

Quick way to find and iterate all ClipSlot[s] in the Edit.

Definition at line 234 of file tracktion_Edit.h.

◆ editFileRetriever

std::function<juce::File()> 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.

Definition at line 130 of file tracktion_Edit.h.

◆ engine

Engine& tracktion::engine::Edit::engine

A reference to the Engine.

Definition at line 120 of file tracktion_Edit.h.

◆ filePathResolver

std::function<juce::File (const juce::String&)> tracktion::engine::Edit::filePathResolver

This callback can be set to resolve file paths.

By default:

  1. If the path is an absolute path it will simply return it
  2. If it is a relative path, the editFileRetriever will be used to try and find a File for the Edit and the path will be resolved against that

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.

Definition at line 141 of file tracktion_Edit.h.

◆ inputDeviceState

juce::ValueTree tracktion::engine::Edit::inputDeviceState

The ValueTree of the input device states.

Definition at line 829 of file tracktion_Edit.h.

◆ lastSignificantChange

juce::CachedValue<juce::String> tracktion::engine::Edit::lastSignificantChange

The last time a change was made to the Edit.

See also
getTimeOfLastChange

Definition at line 806 of file tracktion_Edit.h.

◆ masterFadeIn

juce::CachedValue<TimeDuration> tracktion::engine::Edit::masterFadeIn

The duration in seconds of the fade in.

Definition at line 808 of file tracktion_Edit.h.

◆ masterFadeInType

juce::CachedValue<AudioFadeCurve::Type> tracktion::engine::Edit::masterFadeInType

The curve type of the fade in.

Definition at line 813 of file tracktion_Edit.h.

◆ masterFadeOut

juce::CachedValue<TimeDuration> tracktion::engine::Edit::masterFadeOut

The duration in seconds of the fade out.

Definition at line 809 of file tracktion_Edit.h.

◆ masterFadeOutType

juce::CachedValue<AudioFadeCurve::Type> tracktion::engine::Edit::masterFadeOutType

The curve type of the fade out.

Definition at line 814 of file tracktion_Edit.h.

◆ maximumLength

constexpr double tracktion::engine::Edit::maximumLength
staticconstexpr

The maximum length an Edit can be.

Definition at line 167 of file tracktion_Edit.h.

◆ midiTimecodeIgnoringHours

juce::CachedValue<bool> tracktion::engine::Edit::midiTimecodeIgnoringHours

Whether the MIDI timecode source ignores hours.

Definition at line 817 of file tracktion_Edit.h.

◆ midiTimecodeSourceDeviceEnabled

juce::CachedValue<bool> tracktion::engine::Edit::midiTimecodeSourceDeviceEnabled

Whether a MIDI timecode source is enabled.

Definition at line 816 of file tracktion_Edit.h.

◆ pitchSequence

PitchSequence tracktion::engine::Edit::pitchSequence

The global PitchSequence of this Edit.

Definition at line 608 of file tracktion_Edit.h.

◆ playInStopEnabled

juce::CachedValue<bool> tracktion::engine::Edit::playInStopEnabled

Whether the audio engine should run when playback is stopped.

Definition at line 823 of file tracktion_Edit.h.

◆ recordingPunchInOut

juce::CachedValue<bool> tracktion::engine::Edit::recordingPunchInOut

Whether recoridng only happens within the in/out markers.

Definition at line 822 of file tracktion_Edit.h.

◆ state

juce::ValueTree tracktion::engine::Edit::state

The ValueTree of the Edit state.

Definition at line 828 of file tracktion_Edit.h.

◆ tempoSequence

TempoSequence tracktion::engine::Edit::tempoSequence

The global TempoSequence of this Edit.

Definition at line 588 of file tracktion_Edit.h.

◆ ticksPerQuarterNote

const int tracktion::engine::Edit::ticksPerQuarterNote
static

The number of ticks per quarter note.

Definition at line 177 of file tracktion_Edit.h.

◆ timecodeOffset

juce::CachedValue<TimeDuration> tracktion::engine::Edit::timecodeOffset

The duration in seconds of the timecode offset.

Definition at line 810 of file tracktion_Edit.h.

◆ trackCache

EditItemCache<Track> tracktion::engine::Edit::trackCache

Quick way to find and iterate all Track[s] in the Edit.

Definition at line 231 of file tracktion_Edit.h.

◆ videoMuted

juce::CachedValue<bool> tracktion::engine::Edit::videoMuted

Whether the video source is muted.

Definition at line 818 of file tracktion_Edit.h.

◆ videoOffset

juce::CachedValue<TimeDuration> tracktion::engine::Edit::videoOffset

The duration in seconds of the video offset.

Definition at line 811 of file tracktion_Edit.h.

◆ videoSource

juce::CachedValue<ProjectItemID> tracktion::engine::Edit::videoSource

The ProjectItemID of the video source.

Definition at line 826 of file tracktion_Edit.h.


The documentation for this class was generated from the following files: