|
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 | SaveInhibitor |
| Stops the Edit being written to disk. 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 &)> |
Public Types inherited from 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 | setProjectItemRef (ProjectItemRef) |
| Sets the ProjectItemRef of the Edit, this is also stored in the state. | |
| const ProjectItemRef & | getProjectItemRef () const noexcept |
| Returns the ProjectItemRef that was used to create this 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. | |
| void | setLatencyCompensationEnabled (bool enabled) |
| Can be used to disable latency compensation when playing (it is enabled by default) | |
| bool | isLatencyCompensationEnabled () const noexcept |
| 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. | |
| bool | isSaveInhibited () const noexcept |
| Returns true if a SaveInhibitor is currently stopping this Edit being 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. | |
Public Member Functions inherited from engine::Selectable | |
| 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 Public Member Functions inherited from engine::Selectable | |
| 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. | |
| EditItemCache< AutomatableEditItem > | automatableEditItemCache |
| Quick way to find and iterate all AutomatableEditItem[s] in the Edit. | |
| EditItemCache< AutomationCurveModifier > | automationCurveModifierEditItemCache |
| Quick way to find and iterate all AutomationCurveModifier[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< bool > | alwaysUseRelativePaths |
| Whether clip source paths should always be stored as relative. | |
| juce::CachedValue< float > | clickTrackGain |
| The gain of the click track. | |
| juce::CachedValue< ProjectItemRef > | videoSource |
| The ProjectItemRef 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. | |
Public Attributes inherited from engine::Selectable | |
| 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 engine::Edit::EditFileRetriever = std::function<juce::File()> |
| using 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 |
| engine::Edit::Edit | ( | Options | ) |
Creates a new, empty Edit with default options for a given role.
|
override |
Destructor.
| juce::String engine::Edit::getName | ( | ) |
Returns the name of the Edit if a ProjectItem can be found for it.
| void engine::Edit::setProjectItemRef | ( | ProjectItemRef | ) |
Sets the ProjectItemRef of the Edit, this is also stored in the state.
|
noexcept |
Returns the ProjectItemRef that was used to create this Edit.
|
noexcept |
Returns the EditRole.
|
noexcept |
Returns true if this Edit should be played back (or false if it was just opened for inspection).
|
noexcept |
Returns true if this Edit can render proxy files.
|
noexcept |
|
noexcept |
|
static |
Returns the maximum length an Edit can be.
|
static |
Returns the maximum length an Edit can be.
|
static |
| void engine::Edit::flushState | ( | ) |
Saves the plugin, automap and ARA states to the state ValueTree.
| void engine::Edit::flushPluginStateIfNeeded | ( | Plugin & | ) |
Saves the specified plugin state to the state ValueTree.
| juce::Time 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 engine::Edit::resetChangedStatus | ( | ) |
Resets the changed status so hasChangedSinceSaved returns false.
| bool engine::Edit::hasChangedSinceSaved | ( | ) | const |
Returns true if the Edit has changed since it was last saved.
| bool engine::Edit::isLoading | ( | ) | const |
Returns true if the Edit's not yet fully loaded.
Creates an Edit for the given options.
|
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 * engine::Edit::getCurrentInstanceForInputDevice | ( | InputDevice * | ) | const |
Returns an InputDeviceInstance for a global InputDevice.
| juce::Array< InputDeviceInstance * > 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 * 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 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 engine::Selectable.
References engine::getName().
|
noexcept |
Returns the juce::UndoManager used for this Edit.
Referenced by engine::getUndoManager().
| void engine::Edit::undo | ( | ) |
Undoes the most recent changes made.
| void engine::Edit::redo | ( | ) |
Redoes the changes undone by the last undo.
|
staticnoexcept |
Returns the default number of undo levels that should be used.
| void 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 & engine::Edit::getTrackList | ( | ) |
| void 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 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 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. |
Referenced by engine::getTracksOfType().
| juce::ReferenceCountedObjectPtr< AudioTrack > engine::Edit::insertNewAudioTrack | ( | TrackInsertPoint | , |
| SelectionManager * | , | ||
| bool | addDefaultPlugins = true |
||
| ) |
Inserts a new AudioTrack in the Edit.
| juce::ReferenceCountedObjectPtr< FolderTrack > engine::Edit::insertNewFolderTrack | ( | TrackInsertPoint | , |
| SelectionManager * | , | ||
| bool | asSubmix | ||
| ) |
Inserts a new FolderTrack in the Edit, optionally as a submix.
| juce::ReferenceCountedObjectPtr< AutomationTrack > engine::Edit::insertNewAutomationTrack | ( | TrackInsertPoint | , |
| SelectionManager * | |||
| ) |
Inserts a new AutomationTrack in the Edit.
| Track::Ptr engine::Edit::insertNewTrack | ( | TrackInsertPoint | , |
| const juce::Identifier & | xmlType, | ||
| SelectionManager * | |||
| ) |
| Track::Ptr engine::Edit::insertTrack | ( | TrackInsertPoint | , |
| juce::ValueTree | , | ||
| SelectionManager * | |||
| ) |
| Track::Ptr engine::Edit::insertTrack | ( | juce::ValueTree | , |
| juce::ValueTree | parent, | ||
| juce::ValueTree | preceeding, | ||
| SelectionManager * | |||
| ) |
| void engine::Edit::moveTrack | ( | Track::Ptr | , |
| TrackInsertPoint | |||
| ) |
Moves a track to a new position.
| Track::Ptr engine::Edit::copyTrack | ( | Track::Ptr | , |
| TrackInsertPoint | |||
| ) |
Copies a track to a new position.
| void engine::Edit::ensureNumberOfAudioTracks | ( | int | minimumNumTracks | ) |
Creates new tracks to ensure the minimum number.
| void engine::Edit::ensureArrangerTrack | ( | ) |
Creates an ArrangerTrack if there isn't currently one.
| void engine::Edit::ensureTempoTrack | ( | ) |
Creates a TempoTrack if there isn't currently one.
| void engine::Edit::ensureMarkerTrack | ( | ) |
Creates a MarkerTrack if there isn't currently one.
| void engine::Edit::ensureChordTrack | ( | ) |
Creates a ChordTrack if there isn't currently one.
| void engine::Edit::ensureMasterTrack | ( | ) |
Creates a MasterTrack if there isn't currently one.
| ArrangerTrack * engine::Edit::getArrangerTrack | ( | ) | const |
Returns the global ArrangerTrack.
| MarkerTrack * engine::Edit::getMarkerTrack | ( | ) | const |
Returns the global MarkerTrack.
| TempoTrack * engine::Edit::getTempoTrack | ( | ) | const |
Returns the global TempoTrack.
| ChordTrack * engine::Edit::getChordTrack | ( | ) | const |
Returns the global ChordTrack.
| MasterTrack * engine::Edit::getMasterTrack | ( | ) | const |
Returns the global MasterTrack.
| bool engine::Edit::areAnyTracksMuted | ( | ) | const |
Returns true if any tracks are muted.
| bool engine::Edit::areAnyTracksSolo | ( | ) | const |
Returns true if any tracks are soloed.
| bool engine::Edit::areAnyTracksSoloIsolate | ( | ) | const |
Returns true if any tracks are solo isolated.
| void 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 & engine::Edit::getLaunchQuantisation | ( | ) |
Returns the global launch quantisation.
| EditItemID engine::Edit::createNewItemID | ( | ) | const |
Returns a new EditItemID to use for a new EditItem.
| EditItemID 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 * > engine::Edit::findClipsInLinkGroup | ( | juce::String | linkGroupID | ) | const |
Returns and Clip[s] with the given linkGroupID.
| void engine::Edit::updateMirroredPlugin | ( | Plugin & | ) |
Adds this plugin to a list so mirrored Plugin[s] are updated asyncronously.
| void engine::Edit::sendMirrorUpdateToAllPlugins | ( | Plugin & | ) | const |
Syncronously updates all Plugins[s] mirroring this one.
| void 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 engine::Edit::addModifierTimer | ( | ModifierTimer & | ) |
Adds a ModifierTimer to be updated each block.
| void engine::Edit::removeModifierTimer | ( | ModifierTimer & | ) |
Removes a ModifierTimer previously added.
| void engine::Edit::updateModifierTimers | ( | TimePosition | editTime, |
| int | numSamples | ||
| ) | const |
Updates all the ModifierTimers with a given edit time and number of samples.
| MacroParameterElement & engine::Edit::getGlobalMacros | ( | ) | const |
Returns global MacroParameterElement.
| void 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 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 > engine::Edit::getLowLatencyDisabledPlugins | ( | ) |
Returns the current set of diabled plugins.
| void engine::Edit::setLatencyCompensationEnabled | ( | bool | enabled | ) |
Can be used to disable latency compensation when playing (it is enabled by default)
|
noexcept |
|
noexcept |
Returns the RackTypeList which contains all the RackTypes for the Edit.
|
noexcept |
Returns the TrackCompManager for the Edit.
| juce::String engine::Edit::getAuxBusName | ( | int | bus | ) | const |
Returns the name of an aux bus.
| void engine::Edit::setAuxBusName | ( | int | bus, |
| const juce::String & | name | ||
| ) |
Sets the name of an aux bus.
| juce::Array< AutomatableParameter * > engine::Edit::getAllAutomatableParams | ( | bool | includeTrackParams | ) | const |
Returns all automatable parameters in an Edit.
| includeTrackParams | Whether to include plugins on tracks and clips |
| void 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 engine::Edit::getVideoFile | ( | ) | const |
Returns the currently set video file.
| void engine::Edit::setVideoFile | ( | const juce::File & | , |
| juce::String | importDesc | ||
| ) |
Sets a video file to display.
| TimePosition engine::Edit::getNextTimeOfInterest | ( | TimePosition | afterThisTime | ) |
Finds the next marker or start/end of a clip after a certain time.
| TimePosition 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.
Referenced by engine::insertNewPlugin().
| TimePosition engine::Edit::getFirstClipTime | ( | ) | const |
Returns the time of first clip.
| TimeDuration engine::Edit::getLength | ( | ) | const |
Returns the end time of last clip.
Referenced by engine::benchmark_utilities::renderEdit().
| VolumeAndPanPlugin::Ptr engine::Edit::getMasterVolumePlugin | ( | ) | const |
Returns the master VolumeAndPanPlugin.
| AutomatableParameter::Ptr engine::Edit::getMasterSliderPosParameter | ( | ) | const |
Returns the master volume AutomatableParameter.
N.B. this is in slider position, not dB
| AutomatableParameter::Ptr engine::Edit::getMasterPanParameter | ( | ) | const |
Returns the master pan AutomatableParameter.
| void engine::Edit::setMasterVolumeSliderPos | ( | float | ) |
Sets the master volume level.
N.B. this is in slider position, not dB
| void 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 engine::AirWindowsAutomatableParameter::markAsChanged().
| TimecodeDisplayFormat engine::Edit::getTimecodeFormat | ( | ) | const |
Returns the current TimecodeDisplayFormat.
| void engine::Edit::setTimecodeFormat | ( | TimecodeDisplayFormat | ) |
Sets the TimecodeDisplayFormat to use.
| void engine::Edit::toggleTimecodeMode | ( | ) |
Toggles the TimecodeDisplayFormat through the available TimecodeType[s].
| void 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 > engine::Edit::getCurrentMidiTimecodeSource | ( | ) | const |
Returns the MidiInputDevice being used as the MIDI timecode source.
| void engine::Edit::setCurrentMidiTimecodeSource | ( | std::shared_ptr< MidiInputDevice > | ) |
Sets the MidiInputDevice being to be used as the MIDI timecode source.
| void engine::Edit::enableTimecodeSync | ( | bool | ) |
Toggles syncing to MIDI timecode.
|
noexcept |
Returns true if syncing to MIDI timecode is enabled.
|
noexcept |
Returns the offset to apply to MIDI timecode.
| void engine::Edit::setTimecodeOffset | ( | TimeDuration | newOffset | ) |
Sets the offset to apply to MIDI timecode.
| bool engine::Edit::isMidiTimecodeIgnoringHours | ( | ) | const |
Returns true if hours are ignored when syncing to MIDI timecode.
| void engine::Edit::setMidiTimecodeIgnoringHours | ( | bool | shouldIgnore | ) |
Sets whether hours are ignored when syncing to MIDI timecode.
| std::shared_ptr< MidiInputDevice > engine::Edit::getCurrentMidiMachineControlSource | ( | ) | const |
Returns the MidiInputDevice being used as an MMC source.
| void engine::Edit::setCurrentMidiMachineControlSource | ( | std::shared_ptr< MidiInputDevice > | ) |
Sets the MidiInputDevice to be used as an MMC source.
| MidiOutputDevice * engine::Edit::getCurrentMidiMachineControlDest | ( | ) | const |
Returns the MidiInputDevice being used as an MMC destination.
| void engine::Edit::setCurrentMidiMachineControlDest | ( | MidiOutputDevice * | ) |
Sets the MidiInputDevice to be used as an MMC destination.
| void 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.
| juce::String engine::Edit::getClickTrackDevice | ( | ) | const |
Returns the name of the device being used as the click track output.
| bool engine::Edit::isClickTrackDevice | ( | OutputDevice & | ) | const |
Returns true if the given OutputDevice is being used as the click track output.
| void engine::Edit::setClickTrackOutput | ( | const juce::String & | deviceName | ) |
Sets the device to use as the click track output.
| void engine::Edit::setClickTrackVolume | ( | float | gain | ) |
Sets the volume of the click track.
| void engine::Edit::setCountInMode | ( | CountIn | ) |
Sets the duration of the count in.
| CountIn engine::Edit::getCountInMode | ( | ) | const |
Returns the duration of the count in.
| int engine::Edit::getNumCountInBeats | ( | ) | const |
Returns the number of beats of the count in.
| void engine::Edit::sendSourceFileUpdate | ( | ) |
Sends a 'sourceMediaChanged' call to all the clips.
| void engine::Edit::markAsChanged | ( | ) |
Marks the edit as being significantly changed and should therefore be saved.
|
noexcept |
Returns true if a SaveInhibitor is currently stopping this Edit being 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 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 engine::Edit::areAnyClipsUsingFile | ( | const AudioFile & | ) |
Returns true if any clips are using this file.
| void engine::Edit::cancelAllProxyGeneratorJobs | ( | ) | const |
Stops all proxy generator jobs clips may be performing.
| juce::File engine::Edit::getTempDirectory | ( | bool | createIfNonExistent | ) | const |
Returns the temp directory the Edit it using.
| void engine::Edit::setTempDirectory | ( | const juce::File & | ) |
Sets the temp directory for the Edit to use.
| juce::ValueTree 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 & engine::Edit::getARADocument | ( | ) |
Returns the ARA document handler.
| void engine::Edit::addWastedMidiMessagesListener | ( | WastedMidiMessagesListener * | ) |
Add a WastedMidiMessagesListener to be notified of wasted MIDI messages.
| void engine::Edit::removeWastedMidiMessagesListener | ( | WastedMidiMessagesListener * | ) |
Removes a previously added WastedMidiMessagesListener.
| void engine::Edit::warnOfWastedMidiMessages | ( | InputDevice * | , |
| Track * | |||
| ) |
Triggers a callback to any registered WastedMidiMessagesListener[s].
| SharedLevelMeasurer::Ptr engine::Edit::getPreviewLevelMeasurer | ( | ) |
Returns a previously set SharedLevelMeasurer.
| void engine::Edit::setPreviewLevelMeasurer | ( | SharedLevelMeasurer::Ptr | p | ) |
Sets a SharedLevelMeasurer to use.
| Engine& engine::Edit::engine |
A reference to the Engine.
Referenced by engine::WarpTimeRenderJob::getOrCreateRenderJob().
| EditFileRetriever 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 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.
|
static |
The number of ticks per quarter note.
| EditItemCache<Track> engine::Edit::trackCache |
| EditItemCache<ClipSlot> engine::Edit::clipSlotCache |
| EditItemCache<Clip> engine::Edit::clipCache |
| EditItemCache<AutomatableEditItem> engine::Edit::automatableEditItemCache |
Quick way to find and iterate all AutomatableEditItem[s] in the Edit.
| EditItemCache<AutomationCurveModifier> engine::Edit::automationCurveModifierEditItemCache |
Quick way to find and iterate all AutomationCurveModifier[s] in the Edit.
| TempoSequence engine::Edit::tempoSequence |
The global TempoSequence of this Edit.
Referenced by engine::getTempoSequence(), and engine::benchmark_utilities::renderEdit().
| PitchSequence engine::Edit::pitchSequence |
The global PitchSequence of this Edit.
| juce::CachedValue<juce::String> engine::Edit::lastSignificantChange |
The last time a change was made to the Edit.
| juce::CachedValue<TimeDuration> engine::Edit::masterFadeIn |
The duration in seconds of the fade in.
| juce::CachedValue<TimeDuration> engine::Edit::masterFadeOut |
The duration in seconds of the fade out.
| juce::CachedValue<TimeDuration> engine::Edit::timecodeOffset |
The duration in seconds of the timecode offset.
| juce::CachedValue<TimeDuration> engine::Edit::videoOffset |
The duration in seconds of the video offset.
| juce::CachedValue<AudioFadeCurve::Type> engine::Edit::masterFadeInType |
The curve type of the fade in.
| juce::CachedValue<AudioFadeCurve::Type> engine::Edit::masterFadeOutType |
The curve type of the fade out.
| juce::CachedValue<bool> engine::Edit::midiTimecodeSourceDeviceEnabled |
Whether a MIDI timecode source is enabled.
| juce::CachedValue<bool> engine::Edit::midiTimecodeIgnoringHours |
Whether the MIDI timecode source ignores hours.
| juce::CachedValue<bool> engine::Edit::videoMuted |
Whether the video source is muted.
| juce::CachedValue<bool> engine::Edit::clickTrackEnabled |
Whether the click track is enabled.
| juce::CachedValue<bool> engine::Edit::clickTrackEmphasiseBars |
Whether the click track should emphasise bars.
| juce::CachedValue<bool> engine::Edit::clickTrackRecordingOnly |
Whether the click track should be audible only when recording.
| juce::CachedValue<bool> engine::Edit::recordingPunchInOut |
Whether recoridng only happens within the in/out markers.
| juce::CachedValue<bool> engine::Edit::playInStopEnabled |
Whether the audio engine should run when playback is stopped.
| juce::CachedValue<bool> engine::Edit::alwaysUseRelativePaths |
Whether clip source paths should always be stored as relative.
| juce::CachedValue<float> engine::Edit::clickTrackGain |
The gain of the click track.
| juce::CachedValue<ProjectItemRef> engine::Edit::videoSource |
The ProjectItemRef of the video source.
| juce::ValueTree engine::Edit::state { IDs::EDIT } |
The ValueTree of the Edit state.
| juce::ValueTree engine::Edit::inputDeviceState |
The ValueTree of the input device states.