TracktionEngine
|
A WarpTimeManager contains a list of WarpMarkers and some source material and maps times from a linear "view" time to a "wapred" source time. More...
Public Types | |
using | Ptr = juce::ReferenceCountedObjectPtr< WarpTimeManager > |
Public Member Functions | |
WarpTimeManager (AudioClipBase &) | |
Creates a WarpTimeManager to warp a clip. More... | |
WarpTimeManager (Edit &, const AudioFile &sourceFile, juce::ValueTree parentTree) | |
Creates a WarpTimeManager to warp an audio file. More... | |
~WarpTimeManager () override | |
Destructor. More... | |
void | setSourceFile (const AudioFile &) |
Sets a source fiel to warp. More... | |
AudioFile | getSourceFile () const |
Returns the current source file. More... | |
TimeDuration | getSourceLength () const |
Returns the length of the source file. More... | |
bool | isWarpEndMarkerEnabled () const noexcept |
Returns true if the end marker is being used as the end of the source material. More... | |
bool | areEndMarkersLimited () const noexcept |
Returns true if the markers are limited to the end of the source length. More... | |
const juce::Array< WarpMarker * > & | getMarkers () const |
Returns a list of the current WarpMarkers. More... | |
int | insertMarker (WarpMarker) |
Inserts a new WarpMarker. More... | |
void | removeMarker (int index) |
Removes a WarpMarker at a given index. More... | |
void | removeAllMarkers () |
Removes all WarpMarkers. More... | |
TimePosition | moveMarker (int index, TimePosition newWarpTime) |
Moves a WarpMarker at a given index to a new time. More... | |
void | setWarpEndMarkerTime (TimePosition endTime) |
Sets the end time of the source material. More... | |
juce::Array< TimeRange > | getWarpTimeRegions (TimeRange overallTimeRegion) const |
Time region can be longer than the clip and the returned array will loop over the clip to match the length. More... | |
std::pair< bool, juce::Array< TimePosition > > | getTransientTimes () const |
Returns an array of transient times that have been detected from the source file. More... | |
TimePosition | warpTimeToSourceTime (TimePosition warpTime) const |
Converts a warp time (i.e. More... | |
TimePosition | sourceTimeToWarpTime (TimePosition sourceTime) const |
Converts a source time (i.e. More... | |
TimePosition | getWarpedStart () const |
Returns the start time of the warped region (can be -ve) More... | |
TimePosition | getWarpedEnd () const |
Returns the endTime of the entire warped region. More... | |
TimePosition | getWarpEndMarkerTime () const |
Sets position in warped region of the redered file end point. More... | |
HashCode | getHash () const |
Returns a hash representing this warp list. More... | |
void | editFinishedLoading () |
Public Member Functions inherited from tracktion::engine::RenderManager::Job::Listener | |
virtual | ~Listener () |
virtual void | jobStarted (RenderManager::Job &) |
Public Attributes | |
Edit & | edit |
juce::ValueTree | state |
A WarpTimeManager contains a list of WarpMarkers and some source material and maps times from a linear "view" time to a "wapred" source time.
Once created this can be used to generate an AudioSegmentList to play the source material back warped.
using tracktion::engine::WarpTimeManager::Ptr = juce::ReferenceCountedObjectPtr<WarpTimeManager> |
tracktion::engine::WarpTimeManager::WarpTimeManager | ( | AudioClipBase & | ) |
Creates a WarpTimeManager to warp a clip.
tracktion::engine::WarpTimeManager::WarpTimeManager | ( | Edit & | , |
const AudioFile & | sourceFile, | ||
juce::ValueTree | parentTree | ||
) |
Creates a WarpTimeManager to warp an audio file.
The WarpMarker state will get added to the parentTree as a child.
|
override |
Destructor.
void tracktion::engine::WarpTimeManager::setSourceFile | ( | const AudioFile & | ) |
Sets a source fiel to warp.
AudioFile tracktion::engine::WarpTimeManager::getSourceFile | ( | ) | const |
Returns the current source file.
TimeDuration tracktion::engine::WarpTimeManager::getSourceLength | ( | ) | const |
Returns the length of the source file.
|
noexcept |
Returns true if the end marker is being used as the end of the source material.
|
noexcept |
Returns true if the markers are limited to the end of the source length.
const juce::Array<WarpMarker*>& tracktion::engine::WarpTimeManager::getMarkers | ( | ) | const |
Returns a list of the current WarpMarkers.
int tracktion::engine::WarpTimeManager::insertMarker | ( | WarpMarker | ) |
Inserts a new WarpMarker.
void tracktion::engine::WarpTimeManager::removeMarker | ( | int | index | ) |
Removes a WarpMarker at a given index.
void tracktion::engine::WarpTimeManager::removeAllMarkers | ( | ) |
Removes all WarpMarkers.
TimePosition tracktion::engine::WarpTimeManager::moveMarker | ( | int | index, |
TimePosition | newWarpTime | ||
) |
Moves a WarpMarker at a given index to a new time.
void tracktion::engine::WarpTimeManager::setWarpEndMarkerTime | ( | TimePosition | endTime | ) |
Sets the end time of the source material.
Only functional if isWarpEndMarkerEnabled returns true.
juce::Array<TimeRange> tracktion::engine::WarpTimeManager::getWarpTimeRegions | ( | TimeRange | overallTimeRegion | ) | const |
Time region can be longer than the clip and the returned array will loop over the clip to match the length.
std::pair<bool, juce::Array<TimePosition> > tracktion::engine::WarpTimeManager::getTransientTimes | ( | ) | const |
Returns an array of transient times that have been detected from the source file.
The bool here will be false if the detection job hasn't finished running yet so call it again peridically until it is true.
TimePosition tracktion::engine::WarpTimeManager::warpTimeToSourceTime | ( | TimePosition | warpTime | ) | const |
Converts a warp time (i.e.
a linear time) to the time in the source file after warping has been applied.
TimePosition tracktion::engine::WarpTimeManager::sourceTimeToWarpTime | ( | TimePosition | sourceTime | ) | const |
Converts a source time (i.e.
time in the file) to a linear time after warping has been applied.
TimePosition tracktion::engine::WarpTimeManager::getWarpedStart | ( | ) | const |
Returns the start time of the warped region (can be -ve)
TimePosition tracktion::engine::WarpTimeManager::getWarpedEnd | ( | ) | const |
Returns the endTime of the entire warped region.
TimePosition tracktion::engine::WarpTimeManager::getWarpEndMarkerTime | ( | ) | const |
Sets position in warped region of the redered file end point.
HashCode tracktion::engine::WarpTimeManager::getHash | ( | ) | const |
Returns a hash representing this warp list.
void tracktion::engine::WarpTimeManager::editFinishedLoading | ( | ) |
Edit& tracktion::engine::WarpTimeManager::edit |
juce::ValueTree tracktion::engine::WarpTimeManager::state |