TracktionEngine
Public Types | Public Member Functions | List of all members
tracktion::engine::WaveAudioClip Class Reference

An audio clip that uses an audio file as its source. More...

Inheritance diagram for tracktion::engine::WaveAudioClip:

Public Types

using Ptr = juce::ReferenceCountedObjectPtr< WaveAudioClip >
 
- Public Types inherited from tracktion::engine::AudioClipBase
enum  FadeBehaviour { gainFade = 0 , speedRamp }
 Describes the fade behaviour. More...
 
enum  AutoPitchMode { pitchTrack = 0 , chordTrackMono , chordTrackPoly }
 Defines the auto pitch mode. More...
 
enum class  ClipDirection { previous , next , none }
 Defines a prevous/next direction. More...
 
using Ptr = juce::ReferenceCountedObjectPtr< AudioClipBase >
 
- Public Types inherited from tracktion::engine::Clip
enum  SyncType { syncBarsBeats = 0 , syncAbsolute }
 Determines the clip sync type. More...
 
using Ptr = juce::ReferenceCountedObjectPtr< Clip >
 
using Array = juce::ReferenceCountedArray< Clip >
 
- Public Types inherited from tracktion::engine::TrackItem
enum class  Type {
  unknown , wave , midi , edit ,
  step , marker , pitch , timeSig ,
  collection , video , recording , chord ,
  arranger , container
}
 Defines the types of item that can live on Track[s]. More...
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 

Public Member Functions

 WaveAudioClip (const juce::ValueTree &, EditItemID, ClipOwner &)
 Creates a WaveAudioClip from a given state. More...
 
 ~WaveAudioClip () override
 Destructor. More...
 
void addTake (ProjectItemID)
 Adds a new take with the ProjectItemID as the source. More...
 
void addTake (const juce::File &)
 Adds a new take with the given file as the source. More...
 
void deleteAllUnusedTakes (bool deleteSourceFiles)
 Deletes all but the current takes. More...
 
void deleteAllUnusedTakesConfirmingWithUser (bool deleteSourceFiles)
 Deletes all but the current takes but shows a confirmation dialog first. More...
 
WaveCompManagergetCompManager ()
 Returns the WaveCompManager for this clip. More...
 
bool needsRender () const override
 
RenderManager::Job::Ptr getRenderJob (const AudioFile &destFile) override
 
juce::String getRenderMessage () override
 
void renderComplete () override
 
bool isUsingFile (const AudioFile &) override
 
void initialise () override
 
void cloneFrom (Clip *) override
 
juce::String getSelectableDescription () override
 
bool isMidi () const override
 
bool usesSourceFile () const override
 
TimeDuration getSourceLength () const override
 
void sourceMediaChanged () override
 
juce::File getOriginalFile () const override
 
HashCode getHash () const override
 
void setLoopDefaults () override
 
juce::StringArray getTakeDescriptions () const override
 
bool hasAnyTakes () const override
 
int getNumTakes (bool includeComps) override
 
juce::Array< ProjectItemIDgetTakes () const override
 
void clearTakes () override
 
int getCurrentTake () const override
 
void setCurrentTake (int takeIndex) override
 
bool isCurrentTakeComp () override
 
Clip::Array unpackTakes (bool toNewTracks) override
 
void reassignReferencedItem (const ReferencedItem &, ProjectItemID newID, double newStartTime) override
 
- Public Member Functions inherited from tracktion::engine::AudioClipBase
 AudioClipBase (const juce::ValueTree &, EditItemID, Type, ClipOwner &)
 Creates a basic AudioClip. More...
 
 ~AudioClipBase () override
 Destructor. More...
 
TimeDuration getMaximumLength () override
 Returns the maximum length for this clip. More...
 
virtual AudioFile getAudioFile () const
 Returns the file used to play back the source and will get proxied etc. More...
 
AudioFile getPlaybackFile ()
 Returns the current AudioFile being used by the Clip, either the original source or a proxy. More...
 
virtual AudioFileInfo getWaveInfo ()
 Returns the WaveInfo for a clip. More...
 
void markAsDirty ()
 Resets the dirty flag so that a new render will be attempted. More...
 
void updateSourceFile ()
 Checks the current source file to see if it's up to date and then triggers a source render if needed. More...
 
virtual juce::String getClipMessage ()
 Override this to return a custom message to display over the clip where the "file missing" text usually goes. More...
 
void cancelCurrentRender ()
 If a render is in progress, this will cancel it. More...
 
void setGainDB (float dB)
 Sets the gain of the clip in dB. More...
 
float getGainDB () const noexcept
 Returns the gain of the clip in dB. More...
 
float getGain () const noexcept
 Returns the gain of the clip. More...
 
void setPan (float pan)
 Sets the pan of the clip. More...
 
float getPan () const noexcept
 Returns the pan of the clip from -1 to 1. More...
 
void setMuted (bool shouldBeMuted) override
 
bool isMuted () const override
 
LiveClipLevel getLiveClipLevel ()
 Returns a LiveClipLevel which can be used to read the gain, pan and mute statuses. More...
 
void setLeftChannelActive (bool)
 Enables the left channel of the clip. More...
 
bool isLeftChannelActive () const
 Returns whether the left channel of the clip is enabled. More...
 
void setRightChannelActive (bool)
 Enables the right channel of the clip. More...
 
bool isRightChannelActive () const
 Returns whether the right channel of the clip is enabled. More...
 
juce::AudioChannelSet getActiveChannels () const
 Returns the layout of the active channels. More...
 
bool setFadeIn (TimeDuration length)
 Sets the fade in duration in seconds. More...
 
TimeDuration getFadeIn () const
 Returns the fade in duration in seconds. More...
 
bool setFadeOut (TimeDuration length)
 Sets the fade out duration in seconds. More...
 
TimeDuration getFadeOut () const
 Returns the fade out duration in seconds. More...
 
void setFadeInType (AudioFadeCurve::Type)
 Sets the curve shape for the fade in to use. More...
 
AudioFadeCurve::Type getFadeInType () const
 Returns the curve shape for the fade in to use. More...
 
void setFadeOutType (AudioFadeCurve::Type newType)
 Sets the curve shape for the fade out to use. More...
 
AudioFadeCurve::Type getFadeOutType () const
 Returns the curve shape for the fade out to use. More...
 
void setAutoCrossfade (bool shouldAutoCrossfade)
 Enables/disables auto-crossfading. More...
 
bool getAutoCrossfade () const noexcept
 Returns whether auto-crossfade is enabled. More...
 
void updateAutoCrossfadesAsync (bool updateOverlapped)
 Triggers an update of the auto-crossfades. More...
 
void applyEdgeFades ()
 Sets the fade in/out lengths to be 0.03s to avoid any clicks at the start/end of th clip. More...
 
void copyFadeToAutomation (bool fadeIn, bool removeClipFade)
 Copies the fade in curve to a volume automation curve. More...
 
void setFadeInBehaviour (FadeBehaviour newBehaviour)
 Sets the fade in behaviour. More...
 
FadeBehaviour getFadeInBehaviour () const
 Returns the fade in behaviour. More...
 
void setFadeOutBehaviour (FadeBehaviour newBehaviour)
 Sets the fade out behaviour. More...
 
FadeBehaviour getFadeOutBehaviour () const
 Returns the fade out behaviour. More...
 
void setLoopInfo (const LoopInfo &)
 Sets a LoopInfo to describe this clip's tempo, time sig etc. More...
 
const LoopInfogetLoopInfo () const
 Returns the LoopInfo being used to describe this clip. More...
 
LoopInfogetLoopInfo ()
 Returns the LoopInfo being used to describe this clip. More...
 
TimeRange getLoopRange () const
 Returns the loop range in seconds. More...
 
bool canLoop () const override
 
bool isLooping () const override
 
bool beatBasedLooping () const override
 
void setNumberOfLoops (int num) override
 
void disableLooping () override
 
BeatPosition getLoopStartBeats () const override
 
TimePosition getLoopStart () const override
 
BeatDuration getLoopLengthBeats () const override
 
TimeDuration getLoopLength () const override
 
void setLoopRange (TimeRange) override
 
void setLoopRangeBeats (BeatRange) override
 
void setAutoDetectBeats (bool)
 Enables auto-detection of beats. More...
 
bool getAutoDetectBeats () const
 Returns true if auto-detect of beats is enabled. More...
 
void setBeatSensitivity (float s)
 Sets the beat sensitivity, triggering a LoopInfo update if auto-detect is enabled. More...
 
float getBeatSensitivity () const
 Returns the beat sensitivity. More...
 
void pitchTempoTrackChanged () override
 
void setSpeedRatio (double newSpeed) override
 
void setTimeStretchMode (TimeStretcher::Mode mode)
 Sets a time-stretch mode to use. More...
 
TimeStretcher::Mode getTimeStretchMode () const noexcept
 Returns the time-stretch mode that has been set. More...
 
TimeStretcher::Mode getActualTimeStretchMode () const noexcept
 Returns the time-stretch mode that is in use. More...
 
void setAutoTempo (bool shouldUseAutoTempo)
 Enables/disables auto-tempo. More...
 
bool getAutoTempo () const
 Returns true if auto-tempo has been set. More...
 
void setAutoPitch (bool shouldUseAutoPitch)
 Enables/disables auto-pitch. More...
 
bool getAutoPitch () const
 Returns true if auto-pitch has been set. More...
 
void setAutoPitchMode (AutoPitchMode m)
 Sets the AutoPitchMode to use. More...
 
AutoPitchMode getAutoPitchMode ()
 Returns the AutoPitchMode in use. More...
 
void setWarpTime (bool shouldUseWarpTime)
 Enables/disables warp time. More...
 
bool getWarpTime () const
 Returns true if warp time is enabled. More...
 
WarpTimeManagergetWarpTimeManager () const
 Returns the WarpTimeManager for this clip used to maipluate warp markers. More...
 
void setTranspose (int numSemitones)
 Sets the number of semitones to transpose the clip by. More...
 
int getTransposeSemiTones (bool includeAutoPitch) const
 Returns the number of semitones this clip will be changed by. More...
 
void setPitchChange (float semitones)
 Sets the number of semitones to transpose the clip by. More...
 
float getPitchChange () const
 Returns the number of semitones to transpose the clip by. More...
 
float getPitchRatio () const
 Returns the pitch change as a normalised ratio. More...
 
void setIsReversed (bool shouldBeReversed)
 Enables reversing of the clip's source material. More...
 
bool getIsReversed () const noexcept
 Returns true if the clip's source material is reversed. More...
 
LoopInfo autoDetectBeatMarkers (const LoopInfo &current, bool autoBeat, float sensitivity) const
 Scans the current source file for any beats and adds them to the LoopInfo returned. More...
 
bool performTempoDetect ()
 Performs a tempo-detection task and if successful sets the clip's LoopInfo tempo to this. More...
 
juce::StringArray getPitchChoices ()
 Returns an array describng what pitch each semitone change will be. More...
 
virtual bool canHaveEffects () const
 Returns true if this clip can have ClipEffects added to it. More...
 
void enableEffects (bool enable, bool warn)
 Enables/disables ClipEffects for this clip. More...
 
bool effectsEnabled () const
 Returns true if ClipEffects are enabled. More...
 
void addEffect (const juce::ValueTree &effectsTree)
 Adds a ClipEffect to this clip. More...
 
void setEffectsVisible (bool b)
 Sets the effectsVisible flag for this clip. More...
 
bool getEffectsVisible () const
 Returns true if the effectsVisible flag is set for this clip. More...
 
ClipEffectsgetClipEffects () const noexcept
 Returns the ClipEffects for this clip if it has been enabled. More...
 
bool canSnapToOriginalBWavTime ()
 Returns true if source file has a bwav time reference metadata property. More...
 
void snapToOriginalBWavTime ()
 Moves the clip to the bwav time reference metadata property time. More...
 
juce::String canAddClipPlugin (const Plugin::Ptr &) const
 Returns an empty string if this plugin can be added, otherwise an error message due to the clip plugin being an incorrect type (e.g. More...
 
AudioFile getProxyFileToCreate (bool renderTimestretched)
 Returns the AudioFile to create to play this clip back. More...
 
void setUsesProxy (bool canUseProxy) noexcept
 Can be used to disable proxy file generation for this clip. More...
 
bool canUseProxy () const noexcept
 Retuns true if this clip can use a proxy file. More...
 
bool usesTimeStretchedProxy () const
 Retuns true if this clip use a proxy file due to timestretching. More...
 
std::unique_ptr< ProxyRenderingInfocreateProxyRenderingInfo ()
 Creates a ProxyRenderingInfo object to decribe the stretch segements of this clip. More...
 
HashCode getProxyHash ()
 Returns a hash identifying the proxy settings. More...
 
void beginRenderingNewProxyIfNeeded ()
 Triggers creation of a new proxy file if one is required. More...
 
const AudioSegmentListgetAudioSegmentList ()
 Returns an AudioSegmentList describing this file if it is using auto-tempo. More...
 
void setResamplingQuality (ResamplingQuality)
 Sets the resampling qulity to use. More...
 
ResamplingQuality getResamplingQuality () const
 Returns the resampling quality to the be used. More...
 
void reverseLoopPoints ()
 Reverses the loop points to expose the same section of the source file but reversed. More...
 
void checkFadeLengthsForOverrun ()
 Trims the fade in out lengths to avoid any overlap between them. More...
 
AudioClipBasegetOverlappingClip (ClipDirection) const
 Returns the previous/next overlapping clip if one exists. More...
 
bool isUsingMelodyne () const
 Returns true if this clip is using Melodyne. More...
 
void showMelodyneWindow ()
 Shows the Melodyne window if this clip is using Melodyne. More...
 
void hideMelodyneWindow ()
 Hides the Melodyne window if this clip is using Melodyne. More...
 
void melodyneConvertToMIDI ()
 If this clip is using Melodyne, this will create a new MIDI clip based on the Melodyne analysis. More...
 
void loadMelodyneState ()
 
bool setupARA (bool dontPopupErrorMessages)
 This internal method is used solely to find out if createAudioNode() should return nullptr or not. More...
 
void flushStateToValueTree () override
 
void setParent (ClipOwner *) override
 
bool canBeAddedTo (ClipOwner &) override
 
void changed () override
 
juce::Colour getDefaultColour () const override
 
PatternGeneratorgetPatternGenerator () override
 
void addMark (TimePosition relCursorPos)
 
void moveMarkTo (TimePosition relCursorPos)
 
void deleteMark (TimePosition relCursorPos)
 
void getRescaledMarkPoints (juce::Array< TimePosition > &rescaled, juce::Array< int > &orig) const
 
juce::Array< TimePosition > getRescaledMarkPoints () const override
 
juce::Array< ReferencedItemgetReferencedItems () override
 
bool addClipPlugin (const Plugin::Ptr &, SelectionManager &) override
 
Plugin::Array getAllPlugins () override
 
void sendMirrorUpdateToAllPlugins (Plugin &) const override
 
PluginListgetPluginList () override
 
- Public Member Functions inherited from tracktion::engine::Clip
 Clip (const juce::ValueTree &, ClipOwner &, EditItemID, Type)
 Creates a clip of a given type from a ValueTree state. More...
 
 ~Clip () override
 Destructor. More...
 
virtual juce::String getName () const override
 Returns the name of the clip. More...
 
void setName (const juce::String &newName)
 Sets a new name for a clip. More...
 
SourceFileReferencegetSourceFileReference ()
 Returns the SourceFileReference of the Clip. More...
 
juce::File getCurrentSourceFile () const
 Returns the current source file, this is different to the SourceFileReference as it could be a temporary comp file, clipFX, reverse render etc. More...
 
juce::Array< ReferencedItemgetReferencedItems () override
 Returns an array of any ReferencedItem[s] e.g. More...
 
ClipPosition getPosition () const override
 Returns the ClipPosition on the parent Track. More...
 
BeatPosition getContentBeatAtTime (TimePosition) const
 Returns the beat number (with offset) at the given time. More...
 
TimePosition getTimeOfContentBeat (BeatPosition) const
 Returns time of a beat number. More...
 
virtual juce::Array< TimePosition > getInterestingTimes ()
 Returns times for snapping to, relative to the Edit. More...
 
TimePosition getSpottingPoint () const
 Returns the first marked time in the source file which can be used for syncronising newly added clips. More...
 
TimeRange getLoopRange () const
 Returns the loop range in seconds. More...
 
BeatRange getLoopRangeBeats () const
 Returns the loop range in beats. More...
 
virtual void setSyncType (SyncType sync)
 Sets the sync type for the clip. More...
 
SyncType getSyncType () const
 Returns the sync type clip is using. More...
 
void setPosition (ClipPosition newPosition)
 Sets the position of the clip. More...
 
void setStart (TimePosition newStart, bool preserveSync, bool keepLength)
 Sets the start time of the clip. More...
 
void setLength (TimeDuration newLength, bool preserveSync)
 Sets the length of the clip. More...
 
void setEnd (TimePosition newEnd, bool preserveSync)
 Sets the end of the clip. More...
 
void setOffset (TimeDuration newOffset)
 Sets the offset of the clip, i.e. More...
 
void trimAwayOverlap (TimeRange editRangeToTrim)
 Trims away any part of the clip that overlaps this region. More...
 
void removeFromParent ()
 Removes this clip from the parent track or container clip. More...
 
bool moveTo (ClipOwner &)
 Moves the clip to a new parent (if possible). More...
 
double getSpeedRatio () const noexcept
 Returns the speed ratio i.e. More...
 
virtual void rescale (TimePosition pivotTimeInEdit, double factor)
 stretches and scales this clip relative to a fixed point in the edit. More...
 
bool isGrouped () const override
 Returns true if the clip is part of a group. More...
 
TrackItemgetGroupParent () const override
 Returns the parent TrackItem if part of a group. More...
 
void setGroup (EditItemID newGroupID)
 Sets the clip to be part of a group. More...
 
EditItemID getGroupID () const noexcept
 Returns the ID of the group. More...
 
CollectionClipgetGroupClip () const
 Returns this as a CollectionClip if it is one. More...
 
bool isLinked () const
 Returns true if this clip is linked with any others. More...
 
void setLinkGroupID (juce::String newLinkID)
 Sets the link ID to link this clip with others. More...
 
juce::String getLinkGroupID () const
 Returns the link ID of this clip. More...
 
ClipOwnergetParent () const
 Returns the parent ClipOwner this clip is on. More...
 
ClipTrackgetClipTrack () const
 Returns the parent ClipTrack this clip is on (if any). More...
 
TrackgetTrack () const override
 Returns the parent Track this clip is on (if any). More...
 
virtual juce::Colour getColour () const
 Returns the colour property of this clip. More...
 
void setColour (juce::Colour col)
 Sets the colour property of this clip. More...
 
virtual void removePlugin (const Plugin::Ptr &)
 Removes the given plugin from the clip if the clip supports plugins. More...
 
virtual void setShowingTakes (bool shouldShow)
 Sets whether the clip should be showing takes. More...
 
virtual bool isShowingTakes () const
 Returns true if the clip is showing takes. More...
 
void updateLinkedClips ()
 Triggers a call to cloneFrom for all clips with the same linkID. More...
 
void addListener (Listener *)
 Adds a Listener. More...
 
void removeListener (Listener *)
 Removes a Listener. More...
 
juce::ListenerList< Listener > & getListeners ()
 Returns the listener list so Nodes can manually call them. More...
 
void changed () override
 
juce::UndoManager * getUndoManager () const
 Returns the UndoManager. More...
 
- Public Member Functions inherited from tracktion::engine::TrackItem
 TrackItem (Edit &, EditItemID, Type)
 Creates a TrackItem with an ID and type. More...
 
 ~TrackItem ()
 Destructor. More...
 
TimeRange getEditTimeRange () const
 Returns the time range of this item. More...
 
BeatRange getEditBeatRange () const
 Returns the beat range of this item. More...
 
BeatPosition getStartBeat () const
 Returns the start beat in the Edit of this item. More...
 
BeatPosition getContentStartBeat () const
 Returns the start beat of the content in the Edit of this item. More...
 
BeatPosition getEndBeat () const
 Returns the end beat in the Edit of this item. More...
 
BeatDuration getLengthInBeats () const
 Returns the duration in beats the of this item. More...
 
TimePosition getTimeOfRelativeBeat (BeatDuration) const
 Returns an Edit time point for a given number of beats from the start of this item. More...
 
BeatPosition getBeatOfRelativeTime (TimeDuration) const
 Returns an Edit beat point for a given number of seconds from the start of this item. More...
 
BeatDuration getOffsetInBeats () const
 Returns an the offset of this item in beats. More...
 
EditItemID getTrackID () const
 Returns the ID of the Track this item lives on. More...
 
- Public Member Functions inherited from tracktion::engine::EditItem
 EditItem (EditItemID, Edit &)
 
virtual ~EditItem ()=default
 
- Public Member Functions inherited from tracktion::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. More...
 
virtual void selectableAboutToBeDeleted ()
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. More...
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions. More...
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 
- Public Member Functions inherited from tracktion::engine::Exportable
virtual ~Exportable ()=default
 
- Public Member Functions inherited from tracktion::engine::RenderManager::Job::Listener
virtual ~Listener ()
 
virtual void jobStarted (RenderManager::Job &)
 

Additional Inherited Members

- Static Public Member Functions inherited from tracktion::engine::AudioClipBase
static juce::StringArray getRootNoteChoices (Engine &)
 Returns an array of the root note choices e.g. More...
 
- Static Public Member Functions inherited from tracktion::engine::Clip
static bool isClipState (const juce::ValueTree &)
 Checks whether a ValueTree is some kind of clip state. More...
 
static bool isClipState (const juce::Identifier &)
 Checks whether a ValueTree type is some kind of clip state. More...
 
static Ptr createClipForState (const juce::ValueTree &, ClipOwner &targetParent)
 Creates a clip for a given ValueTree representation. More...
 
- Static Public Member Functions inherited from tracktion::engine::TrackItem
static const char * typeToString (Type)
 Returns the string version of a TrackItem::Type. More...
 
static juce::Identifier clipTypeToXMLType (Type)
 Returns an Identifier version of a TrackItem::Type. More...
 
static TrackItem::Type xmlTagToType (juce::StringRef)
 Returns the TrackItem::Type of a type string. More...
 
static TrackItem::Type stringToType (const juce::String &)
 Returns the TrackItem::Type of a type string. More...
 
static juce::String getSuggestedNameForNewItem (Type)
 Returns a text string for a new clip of the given type. More...
 
template<typename ArrayType >
static void sortByTime (ArrayType &items)
 Helper function to sort an array of TrackItem[s] by their start time. More...
 
template<typename ArrayType >
static void stableSortByTime (ArrayType &items)
 Helper function to sort an array of TrackItem[s] by their start time without changing the order of items at the same time. More...
 
- 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. More...
 
- Static Public Member Functions inherited from tracktion::engine::Exportable
static juce::Array< Exportable * > addAllExportables (Edit &)
 Returns all the Exportables contained in an Edit. More...
 
- Public Attributes inherited from tracktion::engine::AudioClipBase
juce::ReferenceCountedObjectPtr< MelodyneFileReadermelodyneProxy
 The MelodyneFileReader proxy if this clip is using Melodyne. More...
 
juce::CachedValue< TimeStretcher::ElastiqueProOptionselastiqueProOptions
 The ElastiqueProOptions for fine tuning Elastique (if available). More...
 
- Public Attributes inherited from tracktion::engine::Clip
juce::ValueTree state
 The ValueTree of the Clip state. More...
 
juce::CachedValue< juce::Colour > colour
 The colour property. More...
 
- Public Attributes inherited from tracktion::engine::TrackItem
const Type type
 The type of this item. More...
 
- Public Attributes inherited from tracktion::engine::EditItem
Editedit
 
const EditItemID itemID
 Every EditItem has an ID which is unique within the edit. More...
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 
- Protected Member Functions inherited from tracktion::engine::AudioClipBase
void updateLeftRightChannelActivenessFlags ()
 
void createNewProxyAsync ()
 Triggers a source or proxy render after a timeout. More...
 
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeChildAdded (juce::ValueTree &parent, juce::ValueTree &) override
 
void valueTreeChildRemoved (juce::ValueTree &parent, juce::ValueTree &, int) override
 
void valueTreeChildOrderChanged (juce::ValueTree &, int, int) override
 
void valueTreeParentChanged (juce::ValueTree &) override
 
- Protected Member Functions inherited from tracktion::engine::Clip
void setCurrentSourceFile (const juce::File &)
 Sets a new source file for this clip. More...
 
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeParentChanged (juce::ValueTree &) override
 
- Protected Attributes inherited from tracktion::engine::AudioClipBase
std::shared_ptr< ClipLevellevel { std::make_shared<ClipLevel>() }
 
juce::CachedValue< juce::String > channels
 
juce::CachedValue< TimeDuration > fadeIn
 
juce::CachedValue< TimeDuration > fadeOut
 
TimeDuration autoFadeIn
 
TimeDuration autoFadeOut
 
juce::CachedValue< AudioFadeCurve::TypefadeInType
 
juce::CachedValue< AudioFadeCurve::TypefadeOutType
 
juce::CachedValue< bool > autoCrossfade
 
juce::CachedValue< FadeBehaviourfadeInBehaviour
 
juce::CachedValue< FadeBehaviourfadeOutBehaviour
 
juce::CachedValue< ResamplingQualityresamplingQuality
 
juce::CachedValue< TimePosition > loopStart
 
juce::CachedValue< TimeDuration > loopLength
 
juce::CachedValue< BeatPosition > loopStartBeats
 
juce::CachedValue< BeatDuration > loopLengthBeats
 
juce::CachedValue< int > proxyAllowed
 
juce::CachedValue< int > transpose
 
juce::CachedValue< float > pitchChange
 
LoopInfo loopInfo
 
juce::CachedValue< float > beatSensitivity
 
juce::CachedValue< TimeStretcher::ModetimeStretchMode
 
juce::CachedValue< bool > autoPitch
 
juce::CachedValue< bool > autoTempo
 
juce::CachedValue< bool > isReversed
 
juce::CachedValue< bool > autoDetectBeats
 
juce::CachedValue< bool > warpTime
 
juce::CachedValue< bool > clipEffectsVisible
 
juce::CachedValue< AutoPitchModeautoPitchMode
 
WarpTimeManager::Ptr warpTimeManager
 
std::unique_ptr< AudioSegmentListaudioSegmentList
 
std::unique_ptr< ClipEffectsclipEffects
 
AsyncFunctionCaller asyncFunctionCaller
 
juce::AudioChannelSet activeChannels
 
PluginList pluginList
 
bool lastRenderJobFailed = false
 
RenderManager::Job::Ptr renderJob
 
AudioFile lastProxy
 
- Protected Attributes inherited from tracktion::engine::Clip
bool isInitialised = false
 
bool cloneInProgress = false
 
juce::CachedValue< juce::String > clipName
 
ClipOwnerparent = nullptr
 
juce::CachedValue< TimePosition > clipStart
 
juce::CachedValue< TimeDuration > length
 
juce::CachedValue< TimeDuration > offset
 
juce::CachedValue< double > speedRatio
 
SourceFileReference sourceFileReference
 
juce::CachedValue< EditItemIDgroupID
 
juce::CachedValue< juce::String > linkID
 
juce::File currentSourceFile
 
juce::CachedValue< SyncTypesyncType
 
juce::CachedValue< bool > showingTakes
 
std::unique_ptr< PatternGeneratorpatternGenerator
 
AsyncCaller updateLinkedClipsCaller
 
juce::ListenerList< Listenerlisteners
 

Detailed Description

An audio clip that uses an audio file as its source.

Member Typedef Documentation

◆ Ptr

using tracktion::engine::WaveAudioClip::Ptr = juce::ReferenceCountedObjectPtr<WaveAudioClip>

Constructor & Destructor Documentation

◆ WaveAudioClip()

tracktion::engine::WaveAudioClip::WaveAudioClip ( const juce::ValueTree &  ,
EditItemID  ,
ClipOwner  
)

Creates a WaveAudioClip from a given state.

See also
ClipTrack::insertWaveClip.

◆ ~WaveAudioClip()

tracktion::engine::WaveAudioClip::~WaveAudioClip ( )
override

Destructor.

Member Function Documentation

◆ addTake() [1/2]

void tracktion::engine::WaveAudioClip::addTake ( ProjectItemID  )

Adds a new take with the ProjectItemID as the source.

◆ addTake() [2/2]

void tracktion::engine::WaveAudioClip::addTake ( const juce::File &  )

Adds a new take with the given file as the source.

◆ deleteAllUnusedTakes()

void tracktion::engine::WaveAudioClip::deleteAllUnusedTakes ( bool  deleteSourceFiles)

Deletes all but the current takes.

Parameters
deleteSourceFilesIf true, also deletes the source files

◆ deleteAllUnusedTakesConfirmingWithUser()

void tracktion::engine::WaveAudioClip::deleteAllUnusedTakesConfirmingWithUser ( bool  deleteSourceFiles)

Deletes all but the current takes but shows a confirmation dialog first.

Parameters
deleteSourceFilesIf true, also deletes the source files

◆ getCompManager()

WaveCompManager& tracktion::engine::WaveAudioClip::getCompManager ( )

Returns the WaveCompManager for this clip.

◆ needsRender()

bool tracktion::engine::WaveAudioClip::needsRender ( ) const
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.

◆ getRenderJob()

RenderManager::Job::Ptr tracktion::engine::WaveAudioClip::getRenderJob ( const AudioFile destFile)
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.

◆ getRenderMessage()

juce::String tracktion::engine::WaveAudioClip::getRenderMessage ( )
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.

◆ renderComplete()

void tracktion::engine::WaveAudioClip::renderComplete ( )
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.

◆ isUsingFile()

bool tracktion::engine::WaveAudioClip::isUsingFile ( const AudioFile )
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.

◆ initialise()

void tracktion::engine::WaveAudioClip::initialise ( )
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.

◆ cloneFrom()

void tracktion::engine::WaveAudioClip::cloneFrom ( Clip )
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.

◆ getSelectableDescription()

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

◆ isMidi()

bool tracktion::engine::WaveAudioClip::isMidi ( ) const
overridevirtual

◆ usesSourceFile()

bool tracktion::engine::WaveAudioClip::usesSourceFile ( ) const
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ getSourceLength()

TimeDuration tracktion::engine::WaveAudioClip::getSourceLength ( ) const
overridevirtual

◆ sourceMediaChanged()

void tracktion::engine::WaveAudioClip::sourceMediaChanged ( )
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ getOriginalFile()

juce::File tracktion::engine::WaveAudioClip::getOriginalFile ( ) const
overridevirtual

◆ getHash()

HashCode tracktion::engine::WaveAudioClip::getHash ( ) const
overridevirtual

◆ setLoopDefaults()

void tracktion::engine::WaveAudioClip::setLoopDefaults ( )
overridevirtual

◆ getTakeDescriptions()

juce::StringArray tracktion::engine::WaveAudioClip::getTakeDescriptions ( ) const
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ hasAnyTakes()

bool tracktion::engine::WaveAudioClip::hasAnyTakes ( ) const
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ getNumTakes()

int tracktion::engine::WaveAudioClip::getNumTakes ( bool  includeComps)
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ getTakes()

juce::Array<ProjectItemID> tracktion::engine::WaveAudioClip::getTakes ( ) const
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.

◆ clearTakes()

void tracktion::engine::WaveAudioClip::clearTakes ( )
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ getCurrentTake()

int tracktion::engine::WaveAudioClip::getCurrentTake ( ) const
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ setCurrentTake()

void tracktion::engine::WaveAudioClip::setCurrentTake ( int  takeIndex)
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ isCurrentTakeComp()

bool tracktion::engine::WaveAudioClip::isCurrentTakeComp ( )
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ unpackTakes()

Clip::Array tracktion::engine::WaveAudioClip::unpackTakes ( bool  toNewTracks)
overridevirtual

Reimplemented from tracktion::engine::Clip.

◆ reassignReferencedItem()

void tracktion::engine::WaveAudioClip::reassignReferencedItem ( const ReferencedItem ,
ProjectItemID  newID,
double  newStartTime 
)
overridevirtual

Reimplemented from tracktion::engine::AudioClipBase.


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