11namespace tracktion {
inline namespace engine
27 : sourceTime (s), warpTime (w) {}
39 if (i == IDs::sourceTime)
40 sourceTime = TimePosition::fromSeconds (
double (v.getProperty (IDs::sourceTime)));
41 else if (i == IDs::warpTime)
42 warpTime = TimePosition::fromSeconds (
double (v.getProperty (IDs::warpTime)));
46 HashCode
getHash() const noexcept;
48 juce::ValueTree state;
108 void removeMarker (
int index);
111 void removeAllMarkers();
150 void editFinishedLoading();
164 ~WarpMarkerList()
override
169 bool isSuitableType (
const juce::ValueTree& v)
const override {
return v.hasType (IDs::WARPMARKER); }
170 WarpMarker* createNewObject (
const juce::ValueTree& v)
override {
return new WarpMarker (v); }
171 void deleteObject (WarpMarker* wm)
override {
delete wm; }
172 void newObjectAdded (WarpMarker*)
override {}
173 void objectRemoved (WarpMarker*)
override {}
174 void objectOrderChanged()
override {}
178 if (v.hasType (IDs::WARPMARKER))
179 if (
auto wm = getWarpMarkerFor (v))
180 wm->updateFrom (v, i);
188 jassert (v.hasType (IDs::WARPMARKER));
189 return objects[v.getParent().indexOf (v)];
195 friend class WarpTimeFactory;
197 const AudioClipBase* clip =
nullptr;
198 AudioFile sourceFile;
199 bool endMarkerEnabled =
true, endMarkersLimited =
false;
202 RenderManager::Job::Ptr transientDetectionJob;
207 void jobFinished (RenderManager::Job& job,
bool completedOk)
override;
Base class for Clips that produce some kind of audio e.g.
The Tracktion Edit class!
Manages a set of reference counted render jobs and can be used to retrieve matching jobs or create ne...
A WarpTimeFactory manages WarpTimeManagers for Clips living in an Edit.
WarpTimeFactory()=default
Constructs the WarpTimeFactory.
~WarpTimeFactory()
Destructor.
A WarpTimeManager contains a list of WarpMarkers and some source material and maps times from a linea...
const juce::Array< WarpMarker * > & getMarkers() const
Returns a list of the current WarpMarkers.
bool isWarpEndMarkerEnabled() const noexcept
Returns true if the end marker is being used as the end of the source material.
std::pair< bool, juce::Array< TimePosition > > getTransientTimes() const
Returns an array of transient times that have been detected from the source file.
bool areEndMarkersLimited() const noexcept
Returns true if the markers are limited to the end of the source length.
Represents a duration in real-life time.
Represents a position in real-life time.
A WarpMarker is a point that maps from a linear "source" time to a "warped" time.
WarpMarker(const juce::ValueTree &v)
Loads a WarpMarker from a saved state.
void updateFrom(const juce::ValueTree &v, const juce::Identifier &i)
Updates this WarpMarker from a ValueTree property.
WarpMarker() noexcept=default
Creates an empty WarpMarker.
HashCode getHash() const noexcept
Returns a hash for this marker.