TracktionEngine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
engine::WarpTimeManager Class Reference

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

#include <tracktion_WarpTimeManager.h>

Inheritance diagram for engine::WarpTimeManager:

Public Types

using Ptr = juce::ReferenceCountedObjectPtr< WarpTimeManager >
 

Public Member Functions

 WarpTimeManager (AudioClipBase &)
 Creates a WarpTimeManager to warp a clip.
 
 WarpTimeManager (Edit &, const AudioFile &sourceFile, juce::ValueTree parentTree)
 Creates a WarpTimeManager to warp an audio file.
 
 ~WarpTimeManager () override
 Destructor.
 
void setSourceFile (const AudioFile &)
 Sets a source fiel to warp.
 
AudioFile getSourceFile () const
 Returns the current source file.
 
TimeDuration getSourceLength () const
 Returns the length of the source file.
 
bool isWarpEndMarkerEnabled () const noexcept
 Returns true if the end marker is being used as the end of the source material.
 
bool areEndMarkersLimited () const noexcept
 Returns true if the markers are limited to the end of the source length.
 
const juce::Array< WarpMarker * > & getMarkers () const
 Returns a list of the current WarpMarkers.
 
int insertMarker (WarpMarker)
 Inserts a new WarpMarker.
 
void removeMarker (int index)
 Removes a WarpMarker at a given index.
 
void removeAllMarkers ()
 Removes all WarpMarkers.
 
TimePosition moveMarker (int index, TimePosition newWarpTime)
 Moves a WarpMarker at a given index to a new time.
 
void setWarpEndMarkerTime (TimePosition endTime)
 Sets the end time of the source material.
 
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.
 
std::pair< bool, juce::Array< TimePosition > > getTransientTimes () const
 Returns an array of transient times that have been detected from the source file.
 
TimePosition warpTimeToSourceTime (TimePosition warpTime) const
 Converts a warp time (i.e.
 
TimePosition sourceTimeToWarpTime (TimePosition sourceTime) const
 Converts a source time (i.e.
 
TimePosition getWarpedStart () const
 Returns the start time of the warped region (can be -ve)
 
TimePosition getWarpedEnd () const
 Returns the endTime of the entire warped region.
 
TimePosition getWarpEndMarkerTime () const
 Sets position in warped region of the redered file end point.
 
HashCode getHash () const
 Returns a hash representing this warp list.
 
void editFinishedLoading ()
 
- Public Member Functions inherited from engine::RenderManager::Job::Listener
virtual ~Listener ()
 
virtual void jobStarted (RenderManager::Job &)
 

Public Attributes

Editedit
 
juce::ValueTree state
 

Detailed Description

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.

Member Typedef Documentation

◆ Ptr

using engine::WarpTimeManager::Ptr = juce::ReferenceCountedObjectPtr<WarpTimeManager>

Constructor & Destructor Documentation

◆ WarpTimeManager() [1/2]

engine::WarpTimeManager::WarpTimeManager ( AudioClipBase )

Creates a WarpTimeManager to warp a clip.

◆ WarpTimeManager() [2/2]

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.

◆ ~WarpTimeManager()

engine::WarpTimeManager::~WarpTimeManager ( )
override

Destructor.

Member Function Documentation

◆ setSourceFile()

void engine::WarpTimeManager::setSourceFile ( const AudioFile )

Sets a source fiel to warp.

◆ getSourceFile()

AudioFile engine::WarpTimeManager::getSourceFile ( ) const

Returns the current source file.

◆ getSourceLength()

TimeDuration engine::WarpTimeManager::getSourceLength ( ) const

Returns the length of the source file.

◆ isWarpEndMarkerEnabled()

bool engine::WarpTimeManager::isWarpEndMarkerEnabled ( ) const
noexcept

Returns true if the end marker is being used as the end of the source material.

See also
setWarpEndMarkerTime

◆ areEndMarkersLimited()

bool engine::WarpTimeManager::areEndMarkersLimited ( ) const
noexcept

Returns true if the markers are limited to the end of the source length.

See also
getSourceLength

◆ getMarkers()

const juce::Array< WarpMarker * > & engine::WarpTimeManager::getMarkers ( ) const

Returns a list of the current WarpMarkers.

◆ insertMarker()

int engine::WarpTimeManager::insertMarker ( WarpMarker  )

Inserts a new WarpMarker.

◆ removeMarker()

void engine::WarpTimeManager::removeMarker ( int  index)

Removes a WarpMarker at a given index.

◆ removeAllMarkers()

void engine::WarpTimeManager::removeAllMarkers ( )

Removes all WarpMarkers.

◆ moveMarker()

TimePosition engine::WarpTimeManager::moveMarker ( int  index,
TimePosition  newWarpTime 
)

Moves a WarpMarker at a given index to a new time.

◆ setWarpEndMarkerTime()

void engine::WarpTimeManager::setWarpEndMarkerTime ( TimePosition  endTime)

Sets the end time of the source material.

Only functional if isWarpEndMarkerEnabled returns true.

◆ getWarpTimeRegions()

juce::Array< TimeRange > 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.

◆ getTransientTimes()

std::pair< bool, juce::Array< TimePosition > > 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.

◆ warpTimeToSourceTime()

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

◆ sourceTimeToWarpTime()

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

◆ getWarpedStart()

TimePosition engine::WarpTimeManager::getWarpedStart ( ) const

Returns the start time of the warped region (can be -ve)

◆ getWarpedEnd()

TimePosition engine::WarpTimeManager::getWarpedEnd ( ) const

Returns the endTime of the entire warped region.

◆ getWarpEndMarkerTime()

TimePosition engine::WarpTimeManager::getWarpEndMarkerTime ( ) const

Sets position in warped region of the redered file end point.

◆ getHash()

HashCode engine::WarpTimeManager::getHash ( ) const

Returns a hash representing this warp list.

◆ editFinishedLoading()

void engine::WarpTimeManager::editFinishedLoading ( )

Member Data Documentation

◆ edit

Edit& engine::WarpTimeManager::edit

◆ state

juce::ValueTree engine::WarpTimeManager::state

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