tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
tracktion::engine::AudioClipBase Class Referenceabstract

Base class for Clips that produce some kind of audio e.g. More...

#include "tracktion_AudioClipBase.h"

Inheritance diagram for tracktion::engine::AudioClipBase:
tracktion::engine::Clip tracktion::engine::RenderManager::Job::Listener juce::Timer tracktion::engine::TrackItem tracktion::engine::Exportable juce::ValueTree::Listener tracktion::engine::EditItem tracktion::engine::Selectable juce::ReferenceCountedObject tracktion::engine::ContainerClip tracktion::engine::EditClip tracktion::engine::WaveAudioClip

Classes

struct  ProxyRenderingInfo
 Holds information about how to render a proxy for this clip. More...
 
class  TempoDetectTask
 Performs a tempo detection task on a background thread. More...
 

Public Types

enum  FadeBehaviour { gainFade , speedRamp }
 Describes the fade behaviour. More...
 
enum  AutoPitchMode { pitchTrack , 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 class  FollowActionDurationType { beats , loops }
 Defines the types of duration follow actions can use. More...
 
enum  SyncType { syncBarsBeats , 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

 AudioClipBase (const juce::ValueTree &, EditItemID, Type, ClipOwner &)
 Creates a basic AudioClip.
 
 ~AudioClipBase () override
 Destructor.
 
TimeDuration getMaximumLength () override
 Returns the maximum length for this clip.
 
virtual TimeDuration getSourceLength () const =0
 Must return the length in seconds of the source material e.g.
 
virtual AudioFile getAudioFile () const
 Returns the file used to play back the source and will get proxied etc.
 
AudioFile getPlaybackFile ()
 Returns the current AudioFile being used by the Clip, either the original source or a proxy.
 
virtual juce::File getOriginalFile () const =0
 Must return the file that the source ProjectItemID refers to.
 
virtual HashCode getHash () const =0
 Must return a unique hash for this clip's source.
 
virtual AudioFileInfo getWaveInfo ()
 Returns the WaveInfo for a clip.
 
void markAsDirty ()
 Resets the dirty flag so that a new render will be attempted.
 
void updateSourceFile ()
 Checks the current source file to see if it's up to date and then triggers a source render if needed.
 
virtual bool needsRender () const
 Subclasses should override this to return true if they need the rest of the render callbacks.
 
virtual RenderManager::Job::Ptr getRenderJob (const AudioFile &)
 Subclasses should override this to return a RenderJob suitable for rendering its source file.
 
virtual void renderComplete ()
 Callback to indicate that the render has completed.
 
virtual juce::String getRenderMessage ()
 Override this to return a custom message to be displayed over waveforms during rendering.
 
virtual juce::String getClipMessage ()
 Override this to return a custom message to display over the clip where the "file missing" text usually goes.
 
void cancelCurrentRender ()
 If a render is in progress, this will cancel it.
 
void setGainDB (float dB)
 Sets the gain of the clip in dB.
 
float getGainDB () const noexcept
 Returns the gain of the clip in dB.
 
float getGain () const noexcept
 Returns the gain of the clip.
 
void setPan (float pan)
 Sets the pan of the clip.
 
float getPan () const noexcept
 Returns the pan of the clip from -1 to 1.
 
void setMuted (bool shouldBeMuted) override
 Mutes or unmutes the clip.
 
bool isMuted () const override
 Returns true if the clip is muted.
 
LiveClipLevel getLiveClipLevel ()
 Returns a LiveClipLevel which can be used to read the gain, pan and mute statuses.
 
void setLeftChannelActive (bool)
 Enables the left channel of the clip.
 
bool isLeftChannelActive () const
 Returns whether the left channel of the clip is enabled.
 
void setRightChannelActive (bool)
 Enables the right channel of the clip.
 
bool isRightChannelActive () const
 Returns whether the right channel of the clip is enabled.
 
juce::AudioChannelSet getActiveChannels () const
 Returns the layout of the active channels.
 
bool setFadeIn (TimeDuration length)
 Sets the fade in duration in seconds.
 
TimeDuration getFadeIn () const
 Returns the fade in duration in seconds.
 
bool setFadeOut (TimeDuration length)
 Sets the fade out duration in seconds.
 
TimeDuration getFadeOut () const
 Returns the fade out duration in seconds.
 
void setFadeInType (AudioFadeCurve::Type)
 Sets the curve shape for the fade in to use.
 
AudioFadeCurve::Type getFadeInType () const
 Returns the curve shape for the fade in to use.
 
void setFadeOutType (AudioFadeCurve::Type newType)
 Sets the curve shape for the fade out to use.
 
AudioFadeCurve::Type getFadeOutType () const
 Returns the curve shape for the fade out to use.
 
void setAutoCrossfade (bool shouldAutoCrossfade)
 Enables/disables auto-crossfading.
 
bool getAutoCrossfade () const noexcept
 Returns whether auto-crossfade is enabled.
 
void updateAutoCrossfadesAsync (bool updateOverlapped)
 Triggers an update of the auto-crossfades.
 
void applyEdgeFades ()
 Sets the fade in/out lengths to be 0.03s to avoid any clicks at the start/end of th clip.
 
void copyFadeToAutomation (bool fadeIn, bool removeClipFade)
 Copies the fade in curve to a volume automation curve.
 
void setFadeInBehaviour (FadeBehaviour newBehaviour)
 Sets the fade in behaviour.
 
FadeBehaviour getFadeInBehaviour () const
 Returns the fade in behaviour.
 
void setFadeOutBehaviour (FadeBehaviour newBehaviour)
 Sets the fade out behaviour.
 
FadeBehaviour getFadeOutBehaviour () const
 Returns the fade out behaviour.
 
virtual void setLoopDefaults ()=0
 Override this to fill in the LoopInfo structure as best fits the source.
 
void setLoopInfo (const LoopInfo &)
 Sets a LoopInfo to describe this clip's tempo, time sig etc.
 
const LoopInfogetLoopInfo () const
 Returns the LoopInfo being used to describe this clip.
 
LoopInfogetLoopInfo ()
 Returns the LoopInfo being used to describe this clip.
 
TimeRange getLoopRange () const
 Returns the loop range in seconds.
 
bool canLoop () const override
 Returns true if this clip is capable of looping.
 
bool isLooping () const override
 Returns true if this clip is currently looping.
 
bool beatBasedLooping () const override
 Returns true if this clip's looping is based on beats or false if absolute time.
 
void setNumberOfLoops (int num) override
 Sets the clip looping a number of times.
 
void disableLooping () override
 Disables all looping.
 
BeatPosition getLoopStartBeats () const override
 Returns the beat position of the loop start point.
 
TimePosition getLoopStart () const override
 Returns the start time of the loop start point.
 
BeatDuration getLoopLengthBeats () const override
 Returns the length of loop in beats.
 
TimeDuration getLoopLength () const override
 Returns the length of loop in seconds.
 
void setLoopRange (TimeRange) override
 Sets the loop range the clip should use in seconds.
 
void setLoopRangeBeats (BeatRange) override
 Sets the loop range the clip should use in beats.
 
void setAutoDetectBeats (bool)
 Enables auto-detection of beats.
 
bool getAutoDetectBeats () const
 Returns true if auto-detect of beats is enabled.
 
void setBeatSensitivity (float s)
 Sets the beat sensitivity, triggering a LoopInfo update if auto-detect is enabled.
 
float getBeatSensitivity () const
 Returns the beat sensitivity.
 
void pitchTempoTrackChanged () override
 Called when there are pitch or tempo changes made which might require clips to adjust timing information.
 
void setSpeedRatio (double newSpeed) override
 Sets a speed ratio i.e.
 
void setTimeStretchMode (TimeStretcher::Mode mode)
 Sets a time-stretch mode to use.
 
TimeStretcher::Mode getTimeStretchMode () const noexcept
 Returns the time-stretch mode that has been set.
 
TimeStretcher::Mode getActualTimeStretchMode () const noexcept
 Returns the time-stretch mode that is in use.
 
void setAutoTempo (bool shouldUseAutoTempo)
 Enables/disables auto-tempo.
 
bool getAutoTempo () const
 Returns true if auto-tempo has been set.
 
void setAutoPitch (bool shouldUseAutoPitch)
 Enables/disables auto-pitch.
 
bool getAutoPitch () const
 Returns true if auto-pitch has been set.
 
void setAutoPitchMode (AutoPitchMode m)
 Sets the AutoPitchMode to use.
 
AutoPitchMode getAutoPitchMode ()
 Returns the AutoPitchMode in use.
 
void setWarpTime (bool shouldUseWarpTime)
 Enables/disables warp time.
 
bool getWarpTime () const
 Returns true if warp time is enabled.
 
WarpTimeManagergetWarpTimeManager () const
 Returns the WarpTimeManager for this clip used to maipluate warp markers.
 
void setTranspose (int numSemitones)
 Sets the number of semitones to transpose the clip by.
 
int getTransposeSemiTones (bool includeAutoPitch) const
 Returns the number of semitones this clip will be changed by.
 
void setPitchChange (float semitones)
 Sets the number of semitones to transpose the clip by.
 
float getPitchChange () const
 Returns the number of semitones to transpose the clip by.
 
float getPitchRatio () const
 Returns the pitch change as a normalised ratio.
 
void setIsReversed (bool shouldBeReversed)
 Enables reversing of the clip's source material.
 
bool getIsReversed () const noexcept
 Returns true if the clip's source material is reversed.
 
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.
 
bool performTempoDetect ()
 Performs a tempo-detection task and if successful sets the clip's LoopInfo tempo to this.
 
juce::StringArray getPitchChoices ()
 Returns an array describng what pitch each semitone change will be.
 
virtual bool canHaveEffects () const
 Returns true if this clip can have ClipEffects added to it.
 
void enableEffects (bool enable, bool warn)
 Enables/disables ClipEffects for this clip.
 
bool effectsEnabled () const
 Returns true if ClipEffects are enabled.
 
void addEffect (const juce::ValueTree &effectsTree)
 Adds a ClipEffect to this clip.
 
void setEffectsVisible (bool b)
 Sets the effectsVisible flag for this clip.
 
bool getEffectsVisible () const
 Returns true if the effectsVisible flag is set for this clip.
 
ClipEffectsgetClipEffects () const noexcept
 Returns the ClipEffects for this clip if it has been enabled.
 
bool canSnapToOriginalBWavTime ()
 Returns true if source file has a bwav time reference metadata property.
 
void snapToOriginalBWavTime ()
 Moves the clip to the bwav time reference metadata property time.
 
virtual juce::Array< ProjectItemIDgetTakes () const
 Returns the ProjectItemID of the clip's takes.
 
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.
 
virtual bool isUsingFile (const AudioFile &)
 Should return true if the clip is referencing the file in any way.
 
AudioFile getProxyFileToCreate (bool renderTimestretched)
 Returns the AudioFile to create to play this clip back.
 
void setUsesProxy (bool canUseProxy) noexcept
 Can be used to disable proxy file generation for this clip.
 
bool canUseProxy () const noexcept
 Retuns true if this clip can use a proxy file.
 
bool usesTimeStretchedProxy () const
 Retuns true if this clip use a proxy file due to timestretching.
 
std::unique_ptr< ProxyRenderingInfocreateProxyRenderingInfo ()
 Creates a ProxyRenderingInfo object to decribe the stretch segements of this clip.
 
HashCode getProxyHash ()
 Returns a hash identifying the proxy settings.
 
void beginRenderingNewProxyIfNeeded ()
 Triggers creation of a new proxy file if one is required.
 
const AudioSegmentListgetAudioSegmentList ()
 Returns an AudioSegmentList describing this file if it is using auto-tempo.
 
void setResamplingQuality (ResamplingQuality)
 Sets the resampling qulity to use.
 
ResamplingQuality getResamplingQuality () const
 Returns the resampling quality to the be used.
 
void reverseLoopPoints ()
 Reverses the loop points to expose the same section of the source file but reversed.
 
void checkFadeLengthsForOverrun ()
 Trims the fade in out lengths to avoid any overlap between them.
 
AudioClipBasegetOverlappingClip (ClipDirection) const
 Returns the previous/next overlapping clip if one exists.
 
bool isUsingMelodyne () const
 Returns true if this clip is using Melodyne.
 
void showMelodyneWindow ()
 Shows the Melodyne window if this clip is using Melodyne.
 
void hideMelodyneWindow ()
 Hides the Melodyne window if this clip is using Melodyne.
 
void melodyneConvertToMIDI ()
 If this clip is using Melodyne, this will create a new MIDI clip based on the Melodyne analysis.
 
void loadMelodyneState ()
 
bool setupARA (bool dontPopupErrorMessages)
 This internal method is used solely to find out if createAudioNode() should return nullptr or not.
 
void initialise () override
 Initialises the Clip.
 
void cloneFrom (Clip *) override
 Clones the given clip to this clip.
 
void flushStateToValueTree () override
 Can be overridden to ensure any state (e.g.
 
void setParent (ClipOwner *) override
 
bool canBeAddedTo (ClipOwner &) override
 Tests whether this clip can go on the given parent.
 
void changed () override
 This should be called to send a change notification to any SelectableListeners that are registered with this object.
 
juce::Colour getDefaultColour () const override
 Returns the default colour for this clip.
 
PatternGeneratorgetPatternGenerator () override
 Returns the PatternGenerator for this clip if it has one.
 
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< TimePositiongetRescaledMarkPoints () const override
 Returns the mark points relative to the start of the clip, rescaled to the current speed.
 
juce::Array< ReferencedItemgetReferencedItems () override
 
void reassignReferencedItem (const ReferencedItem &, ProjectItemID newID, double newStartTime) override
 
std::shared_ptr< LaunchHandlegetLaunchHandle () override
 Some clip types can be launched, if that's possible, this returns a handle to trigger starting/stopping the clip.
 
void setUsesGlobalLaunchQuatisation (bool useGlobal) override
 Some clip types can be launched, if that's possible, this sets whether the clip's quantisation or the global quantisation should be used.
 
bool usesGlobalLaunchQuatisation () override
 Some clip types can be launched, if that's possible, this returns whether the clip's quantisation or the global quantisation should be used.
 
LaunchQuantisationgetLaunchQuantisation () override
 Some clip types can be launched, if that's possible, this returns a quantisation that can be used for this clip.
 
FollowActions * getFollowActions () override
 Some clip types can be launched, if that's possible, this can be used to determine the action to perform after a clip has played.
 
bool addClipPlugin (const Plugin::Ptr &, SelectionManager &) override
 Adds a plugin to the clip.
 
Plugin::Array getAllPlugins () override
 Returns all the plugins on the clip.
 
void sendMirrorUpdateToAllPlugins (Plugin &) const override
 Sends an update to all plugins mirroing the one passed in.
 
PluginListgetPluginList () override
 Returns the PluginList for this clip if it has one.
 
- 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.
 
 ~Clip () override
 Destructor.
 
virtual void sourceMediaChanged ()
 Called when the source media file reference (attribute "source") has changed - i.e.
 
virtual juce::String getName () const override
 Returns the name of the clip.
 
void setName (const juce::String &newName)
 Sets a new name for a clip.
 
virtual bool isMidi () const =0
 Returns true if this is a MidiClip.
 
virtual bool usesSourceFile () const
 True if it references a source file - i.e.
 
SourceFileReferencegetSourceFileReference ()
 Returns the SourceFileReference of the Clip.
 
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.
 
juce::Array< ReferencedItemgetReferencedItems () override
 Returns an array of any ReferencedItem[s] e.g.
 
void reassignReferencedItem (const ReferencedItem &, ProjectItemID, double) override
 Should be implemented to change the underlying source to a new ProjectItemID.
 
ClipPosition getPosition () const override
 Returns the ClipPosition on the parent Track.
 
BeatPosition getContentBeatAtTime (TimePosition) const
 Returns the beat number (with offset) at the given time.
 
TimePosition getTimeOfContentBeat (BeatPosition) const
 Returns time of a beat number.
 
virtual juce::Array< TimePositiongetInterestingTimes ()
 Returns times for snapping to, relative to the Edit.
 
TimePosition getSpottingPoint () const
 Returns the first marked time in the source file which can be used for syncronising newly added clips.
 
TimeRange getLoopRange () const
 Returns the loop range in seconds.
 
BeatRange getLoopRangeBeats () const
 Returns the loop range in beats.
 
virtual void setSyncType (SyncType sync)
 Sets the sync type for the clip.
 
SyncType getSyncType () const
 Returns the sync type clip is using.
 
void setPosition (ClipPosition newPosition)
 Sets the position of the clip.
 
void setStart (TimePosition newStart, bool preserveSync, bool keepLength)
 Sets the start time of the clip.
 
void setLength (TimeDuration newLength, bool preserveSync)
 Sets the length of the clip.
 
void setEnd (TimePosition newEnd, bool preserveSync)
 Sets the end of the clip.
 
void setOffset (TimeDuration newOffset)
 Sets the offset of the clip, i.e.
 
void trimAwayOverlap (TimeRange editRangeToTrim)
 Trims away any part of the clip that overlaps this region.
 
void removeFromParent ()
 Removes this clip from the parent track or container clip.
 
bool moveTo (ClipOwner &)
 Moves the clip to a new parent (if possible).
 
double getSpeedRatio () const noexcept
 Returns the speed ratio i.e.
 
virtual void rescale (TimePosition pivotTimeInEdit, double factor)
 stretches and scales this clip relative to a fixed point in the edit.
 
bool isGrouped () const override
 Returns true if the clip is part of a group.
 
TrackItemgetGroupParent () const override
 Returns the parent TrackItem if part of a group.
 
void setGroup (EditItemID newGroupID)
 Sets the clip to be part of a group.
 
EditItemID getGroupID () const noexcept
 Returns the ID of the group.
 
CollectionClipgetGroupClip () const
 Returns this as a CollectionClip if it is one.
 
bool isLinked () const
 Returns true if this clip is linked with any others.
 
void setLinkGroupID (juce::String newLinkID)
 Sets the link ID to link this clip with others.
 
juce::String getLinkGroupID () const
 Returns the link ID of this clip.
 
ClipOwnergetParent () const
 Returns the parent ClipOwner this clip is on.
 
ClipTrackgetClipTrack () const
 Returns the parent ClipTrack this clip is on (if any).
 
TrackgetTrack () const override
 Returns the parent Track this clip is on (if any).
 
ClipSlotgetClipSlot () const
 Returns the parent ClipSlot this clip is on (if any).
 
virtual juce::Colour getColour () const
 Returns the colour property of this clip.
 
void setColour (juce::Colour col)
 Sets the colour property of this clip.
 
virtual void removePlugin (const Plugin::Ptr &)
 Removes the given plugin from the clip if the clip supports plugins.
 
virtual void clearTakes ()
 Clears any takes this clip has.
 
virtual bool hasAnyTakes () const
 Returns true if this clip has any takes.
 
virtual juce::StringArray getTakeDescriptions () const
 Returns the descriptions of any takes.
 
virtual void setCurrentTake (int)
 Sets a given take index to be the current take.
 
virtual int getCurrentTake () const
 Returns the current take index.
 
virtual int getNumTakes (bool)
 Returns the total number of takes.
 
virtual bool isCurrentTakeComp ()
 Returns true if the current take is a comp.
 
virtual void setShowingTakes (bool shouldShow)
 Sets whether the clip should be showing takes.
 
virtual bool isShowingTakes () const
 Returns true if the clip is showing takes.
 
virtual Clip::Array unpackTakes (bool)
 Attempts to unpack the takes to new clips.
 
void updateLinkedClips ()
 Triggers a call to cloneFrom for all clips with the same linkID.
 
void addListener (Listener *)
 Adds a Listener.
 
void removeListener (Listener *)
 Removes a Listener.
 
juce::ListenerList< Listener > & getListeners ()
 Returns the listener list so Nodes can manually call them.
 
void changed () override
 This should be called to send a change notification to any SelectableListeners that are registered with this object.
 
juce::UndoManagergetUndoManager () const
 Returns the UndoManager.
 
- Public Member Functions inherited from tracktion::engine::TrackItem
 TrackItem (Edit &, EditItemID, Type)
 Creates a TrackItem with an ID and type.
 
 ~TrackItem ()
 Destructor.
 
TimeRange getEditTimeRange () const
 Returns the time range of this item.
 
BeatRange getEditBeatRange () const
 Returns the beat range of this item.
 
BeatPosition getStartBeat () const
 Returns the start beat in the Edit of this item.
 
BeatPosition getContentStartBeat () const
 Returns the start beat of the content in the Edit of this item.
 
BeatPosition getEndBeat () const
 Returns the end beat in the Edit of this item.
 
BeatDuration getLengthInBeats () const
 Returns the duration in beats the of this item.
 
TimePosition getTimeOfRelativeBeat (BeatDuration) const
 Returns an Edit time point for a given number of beats from the start of this item.
 
BeatPosition getBeatOfRelativeTime (TimeDuration) const
 Returns an Edit beat point for a given number of seconds from the start of this item.
 
BeatDuration getOffsetInBeats () const
 Returns an the offset of this item in beats.
 
EditItemID getTrackID () const
 Returns the ID of the Track this item lives on.
 
- Public Member Functions inherited from tracktion::engine::EditItem
 EditItem (EditItemID, Edit &)
 
- Public Member Functions inherited from tracktion::engine::Selectable
virtual juce::String getSelectableDescription ()=0
 Subclasses must return a description of what they are.
 
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected.
 
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 ()
 
- Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
 
void decReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 
- Public Member Functions inherited from tracktion::engine::RenderManager::Job::Listener
virtual void jobStarted (RenderManager::Job &)
 

Static Public Member Functions

static juce::StringArray getRootNoteChoices (Engine &)
 Returns an array of the root note choices e.g.
 
- 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.
 
static bool isClipState (const juce::Identifier &)
 Checks whether a ValueTree type is some kind of clip state.
 
static Ptr createClipForState (const juce::ValueTree &, ClipOwner &targetParent)
 Creates a clip for a given ValueTree representation.
 
- Static Public Member Functions inherited from tracktion::engine::TrackItem
static const chartypeToString (Type)
 Returns the string version of a TrackItem::Type.
 
static juce::Identifier clipTypeToXMLType (Type)
 Returns an Identifier version of a TrackItem::Type.
 
static TrackItem::Type xmlTagToType (juce::StringRef)
 Returns the TrackItem::Type of a type string.
 
static TrackItem::Type stringToType (const juce::String &)
 Returns the TrackItem::Type of a type string.
 
static juce::String getSuggestedNameForNewItem (Type)
 Returns a text string for a new clip of the given type.
 
template<typename ArrayType >
static void sortByTime (ArrayType &items)
 Helper function to sort an array of TrackItem[s] by their start time.
 
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.
 
- 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.
 
- Static Public Member Functions inherited from tracktion::engine::Exportable
static juce::Array< Exportable * > addAllExportables (Edit &)
 Returns all the Exportables contained in an Edit.
 

Public Attributes

juce::ReferenceCountedObjectPtr< MelodyneFileReadermelodyneProxy
 The MelodyneFileReader proxy if this clip is using Melodyne.
 
juce::CachedValue< TimeStretcher::ElastiqueProOptionselastiqueProOptions
 The ElastiqueProOptions for fine tuning Elastique (if available).
 
- Public Attributes inherited from tracktion::engine::Clip
juce::CachedValue< FollowActionDurationTypefollowActionDurationType
 The type of duration to use for when to trigger the follow action.
 
juce::CachedValue< BeatDurationfollowActionBeats
 Determines the time for which a launched clip will play before a follow action is taken.
 
juce::CachedValue< doublefollowActionNumLoops
 Determines the number of loops for which a launched clip will play before a follow action is taken.
 
juce::ValueTree state
 The ValueTree of the Clip state.
 
juce::CachedValue< juce::Colourcolour
 The colour property.
 
juce::CachedValue< bool > disabled
 Whether the Clip is disabled or not.
 
- Public Attributes inherited from tracktion::engine::TrackItem
const Type type
 The type of this item.
 
- Public Attributes inherited from tracktion::engine::EditItem
Editedit
 
const EditItemID itemID
 Every EditItem has an ID which is unique within the edit.
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 

Protected Member Functions

void updateLeftRightChannelActivenessFlags ()
 
void createNewProxyAsync ()
 Triggers a source or proxy render after a timeout.
 
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.
 
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeParentChanged (juce::ValueTree &) override
 
- Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
 
void resetReferenceCount () noexcept
 
- Protected Member Functions inherited from juce::ValueTree::Listener
virtual void valueTreeRedirected (ValueTree &treeWhichHasBeenChanged)
 

Protected Attributes

std::shared_ptr< ClipLevellevel
 
juce::CachedValue< juce::Stringchannels
 
juce::CachedValue< TimeDurationfadeIn
 
juce::CachedValue< TimeDurationfadeOut
 
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< TimePositionloopStart
 
juce::CachedValue< TimeDurationloopLength
 
juce::CachedValue< BeatPositionloopStartBeats
 
juce::CachedValue< BeatDurationloopLengthBeats
 
juce::CachedValue< intproxyAllowed
 
juce::CachedValue< inttranspose
 
juce::CachedValue< floatpitchChange
 
LoopInfo loopInfo
 
juce::CachedValue< floatbeatSensitivity
 
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
 
RenderManager::Job::Ptr renderJob
 
AudioFile lastProxy
 
- Protected Attributes inherited from tracktion::engine::Clip
bool isInitialised
 
bool cloneInProgress
 
juce::CachedValue< juce::StringclipName
 
ClipOwnerparent
 
juce::CachedValue< TimePositionclipStart
 
juce::CachedValue< TimeDurationlength
 
juce::CachedValue< TimeDurationoffset
 
juce::CachedValue< doublespeedRatio
 
SourceFileReference sourceFileReference
 
juce::CachedValue< EditItemIDgroupID
 
juce::CachedValue< juce::StringlinkID
 
juce::File currentSourceFile
 
juce::CachedValue< SyncTypesyncType
 
juce::CachedValue< bool > showingTakes
 
std::unique_ptr< PatternGeneratorpatternGenerator
 
AsyncCaller updateLinkedClipsCaller
 
juce::ListenerList< Listenerlisteners
 

Friends

class WaveCompManager
 

Detailed Description

Base class for Clips that produce some kind of audio e.g.

WaveAudioClip or EditClip. This class contains the common functionality such as gains, fades, plugins etc.

If your source if dynamically generated override needsRender to return true. This will then trigger the rest of the render callbacks which should be used to generate the source and fill in any update messages etc.

If your source is static override getAudioFile to return the source file. Note that this may be changed by the UI so it is a good idea to also overrride sourceMediaChanged and getSourceLength to update properties accordingly when the source ProjectItemID is re-assigned.

Either way you must override getHash which should return a hash of the current source e.g. an AudioFile hash or hash describing the current render set-up of an Edit.

Definition at line 31 of file tracktion_AudioClipBase.h.

Member Typedef Documentation

◆ Ptr

Definition at line 43 of file tracktion_AudioClipBase.h.

Member Enumeration Documentation

◆ AutoPitchMode

Defines the auto pitch mode.

Enumerator
pitchTrack 

Clip tracks the Edit's PitchSequence.

chordTrackMono 

Clip tracks the chord track with a monophonic pitch change.

chordTrackPoly 

Clip tracks the pitch track with a polyphonic pitch change.

Definition at line 305 of file tracktion_AudioClipBase.h.

◆ ClipDirection

Defines a prevous/next direction.

See also
getOverlappingClip

Definition at line 510 of file tracktion_AudioClipBase.h.

◆ FadeBehaviour

Describes the fade behaviour.

Enumerator
gainFade 

Fade is a volume/gain ramp.

speedRamp 

Fade is a change of playback speed for tape start/stop effects.

Definition at line 212 of file tracktion_AudioClipBase.h.

Constructor & Destructor Documentation

◆ AudioClipBase()

tracktion::engine::AudioClipBase::AudioClipBase ( const juce::ValueTree v,
EditItemID  id,
Type  t,
ClipOwner targetParent 
)

Creates a basic AudioClip.

Definition at line 200 of file tracktion_AudioClipBase.cpp.

◆ ~AudioClipBase()

tracktion::engine::AudioClipBase::~AudioClipBase ( )
override

Destructor.

Definition at line 277 of file tracktion_AudioClipBase.cpp.

Member Function Documentation

◆ addClipPlugin()

bool tracktion::engine::AudioClipBase::addClipPlugin ( const Plugin::Ptr ,
SelectionManager  
)
overridevirtual

Adds a plugin to the clip.

Returns
false if the clip contain plugins.

Reimplemented from tracktion::engine::Clip.

Definition at line 1586 of file tracktion_AudioClipBase.cpp.

◆ addEffect()

void tracktion::engine::AudioClipBase::addEffect ( const juce::ValueTree effectsTree)

Adds a ClipEffect to this clip.

Definition at line 1325 of file tracktion_AudioClipBase.cpp.

◆ addMark()

void tracktion::engine::AudioClipBase::addMark ( TimePosition  relCursorPos)

Definition at line 1369 of file tracktion_AudioClipBase.cpp.

◆ applyEdgeFades()

void tracktion::engine::AudioClipBase::applyEdgeFades ( )

Sets the fade in/out lengths to be 0.03s to avoid any clicks at the start/end of th clip.

Definition at line 759 of file tracktion_AudioClipBase.cpp.

◆ autoDetectBeatMarkers()

LoopInfo tracktion::engine::AudioClipBase::autoDetectBeatMarkers ( const LoopInfo current,
bool  autoBeat,
float  sensitivity 
) const

Scans the current source file for any beats and adds them to the LoopInfo returned.

Parameters
currentA LoopInfo to initialise the result from
autoBeatWhether to auto detect the beats from the source file
sensitivityThe sensitivity to use 0-1 [[ blocks ]]

Definition at line 1194 of file tracktion_AudioClipBase.cpp.

◆ beatBasedLooping()

bool tracktion::engine::AudioClipBase::beatBasedLooping ( ) const
overridevirtual

Returns true if this clip's looping is based on beats or false if absolute time.

Reimplemented from tracktion::engine::Clip.

Definition at line 249 of file tracktion_AudioClipBase.h.

◆ beginRenderingNewProxyIfNeeded()

void tracktion::engine::AudioClipBase::beginRenderingNewProxyIfNeeded ( )

Triggers creation of a new proxy file if one is required.

Definition at line 2224 of file tracktion_AudioClipBase.cpp.

◆ canAddClipPlugin()

juce::String tracktion::engine::AudioClipBase::canAddClipPlugin ( const Plugin::Ptr p) 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.

MIDI) or the list is full.

Definition at line 1572 of file tracktion_AudioClipBase.cpp.

◆ canBeAddedTo()

bool tracktion::engine::AudioClipBase::canBeAddedTo ( ClipOwner )
overridevirtual

Tests whether this clip can go on the given parent.

Implements tracktion::engine::Clip.

Definition at line 391 of file tracktion_AudioClipBase.cpp.

◆ cancelCurrentRender()

void tracktion::engine::AudioClipBase::cancelCurrentRender ( )

If a render is in progress, this will cancel it.

Definition at line 2272 of file tracktion_AudioClipBase.cpp.

◆ canHaveEffects()

virtual bool tracktion::engine::AudioClipBase::canHaveEffects ( ) const
virtual

Returns true if this clip can have ClipEffects added to it.

Reimplemented in tracktion::engine::EditClip.

Definition at line 394 of file tracktion_AudioClipBase.h.

◆ canLoop()

bool tracktion::engine::AudioClipBase::canLoop ( ) const
overridevirtual

Returns true if this clip is capable of looping.

Reimplemented from tracktion::engine::Clip.

Definition at line 936 of file tracktion_AudioClipBase.cpp.

◆ canSnapToOriginalBWavTime()

bool tracktion::engine::AudioClipBase::canSnapToOriginalBWavTime ( )

Returns true if source file has a bwav time reference metadata property.

Definition at line 1443 of file tracktion_AudioClipBase.cpp.

◆ canUseProxy()

bool tracktion::engine::AudioClipBase::canUseProxy ( ) const
noexcept

Retuns true if this clip can use a proxy file.

Definition at line 470 of file tracktion_AudioClipBase.h.

◆ changed()

void tracktion::engine::AudioClipBase::changed ( )
overridevirtual

This should be called to send a change notification to any SelectableListeners that are registered with this object.

Reimplemented from tracktion::engine::Selectable.

Reimplemented in tracktion::engine::EditClip.

Definition at line 396 of file tracktion_AudioClipBase.cpp.

◆ checkFadeLengthsForOverrun()

void tracktion::engine::AudioClipBase::checkFadeLengthsForOverrun ( )

Trims the fade in out lengths to avoid any overlap between them.

Definition at line 677 of file tracktion_AudioClipBase.cpp.

◆ cloneFrom()

void tracktion::engine::AudioClipBase::cloneFrom ( Clip c)
overridevirtual

Clones the given clip to this clip.

Reimplemented from tracktion::engine::Clip.

Reimplemented in tracktion::engine::ContainerClip, tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

Definition at line 306 of file tracktion_AudioClipBase.cpp.

◆ copyFadeToAutomation()

void tracktion::engine::AudioClipBase::copyFadeToAutomation ( bool  fadeIn,
bool  removeClipFade 
)

Copies the fade in curve to a volume automation curve.

Parameters
fadeInIf true, this copies the fade-in, if false, the fade-out
removeClipFadeIf true, the fade in will be set to 0
See also
setFadeIn

Definition at line 767 of file tracktion_AudioClipBase.cpp.

◆ createNewProxyAsync()

void tracktion::engine::AudioClipBase::createNewProxyAsync ( )
protected

Triggers a source or proxy render after a timeout.

Call this if something changes that may affect either the source or the proxy e.g. Edit clip tracks or tempo sequence.

Definition at line 2266 of file tracktion_AudioClipBase.cpp.

◆ createProxyRenderingInfo()

std::unique_ptr< AudioClipBase::ProxyRenderingInfo > tracktion::engine::AudioClipBase::createProxyRenderingInfo ( )

Creates a ProxyRenderingInfo object to decribe the stretch segements of this clip.

Definition at line 2108 of file tracktion_AudioClipBase.cpp.

◆ deleteMark()

void tracktion::engine::AudioClipBase::deleteMark ( TimePosition  relCursorPos)

Definition at line 1411 of file tracktion_AudioClipBase.cpp.

◆ disableLooping()

void tracktion::engine::AudioClipBase::disableLooping ( )
overridevirtual

Disables all looping.

Reimplemented from tracktion::engine::Clip.

Definition at line 903 of file tracktion_AudioClipBase.cpp.

◆ effectsEnabled()

bool tracktion::engine::AudioClipBase::effectsEnabled ( ) const

Returns true if ClipEffects are enabled.

Definition at line 403 of file tracktion_AudioClipBase.h.

◆ enableEffects()

void tracktion::engine::AudioClipBase::enableEffects ( bool  enable,
bool  warn 
)

Enables/disables ClipEffects for this clip.

Parameters
enableWhether to turn on/off clip FX for this clip
warnIf true and clip FX are enabled, this will show a confirmation dialog to the user first

Definition at line 1300 of file tracktion_AudioClipBase.cpp.

◆ flushStateToValueTree()

void tracktion::engine::AudioClipBase::flushStateToValueTree ( )
overridevirtual

Can be overridden to ensure any state (e.g.

clip plugins) is flushed to the ValueTree ready for saving.

Reimplemented from tracktion::engine::Clip.

Reimplemented in tracktion::engine::ContainerClip.

Definition at line 366 of file tracktion_AudioClipBase.cpp.

◆ getActiveChannels()

juce::AudioChannelSet tracktion::engine::AudioClipBase::getActiveChannels ( ) const

Returns the layout of the active channels.

Definition at line 158 of file tracktion_AudioClipBase.h.

◆ getActualTimeStretchMode()

TimeStretcher::Mode tracktion::engine::AudioClipBase::getActualTimeStretchMode ( ) const
noexcept

Returns the time-stretch mode that is in use.

Note that even if not time-stretch mode has been set e.g. for speed changes, if auto-pitch or auto-tempo is enabled, a time-stretch mode will have to be used and this returns it.

Definition at line 591 of file tracktion_AudioClipBase.cpp.

◆ getAllPlugins()

Plugin::Array tracktion::engine::AudioClipBase::getAllPlugins ( )
overridevirtual

Returns all the plugins on the clip.

Reimplemented from tracktion::engine::Clip.

Definition at line 1597 of file tracktion_AudioClipBase.cpp.

◆ getAudioFile()

virtual AudioFile tracktion::engine::AudioClipBase::getAudioFile ( ) const
virtual

Returns the file used to play back the source and will get proxied etc.

Reimplemented in tracktion::engine::EditClip.

Definition at line 59 of file tracktion_AudioClipBase.h.

◆ getAudioSegmentList()

const AudioSegmentList & tracktion::engine::AudioClipBase::getAudioSegmentList ( )

Returns an AudioSegmentList describing this file if it is using auto-tempo.

This can be useful for drawing waveforms. [[ message_thread ]]

Definition at line 1049 of file tracktion_AudioClipBase.cpp.

◆ getAutoCrossfade()

bool tracktion::engine::AudioClipBase::getAutoCrossfade ( ) const
noexcept

Returns whether auto-crossfade is enabled.

Definition at line 193 of file tracktion_AudioClipBase.h.

◆ getAutoDetectBeats()

bool tracktion::engine::AudioClipBase::getAutoDetectBeats ( ) const

Returns true if auto-detect of beats is enabled.

Definition at line 274 of file tracktion_AudioClipBase.h.

◆ getAutoPitch()

bool tracktion::engine::AudioClipBase::getAutoPitch ( ) const

Returns true if auto-pitch has been set.

Definition at line 326 of file tracktion_AudioClipBase.h.

◆ getAutoPitchMode()

AutoPitchMode tracktion::engine::AudioClipBase::getAutoPitchMode ( )

Returns the AutoPitchMode in use.

Definition at line 332 of file tracktion_AudioClipBase.h.

◆ getAutoTempo()

bool tracktion::engine::AudioClipBase::getAutoTempo ( ) const

Returns true if auto-tempo has been set.

Definition at line 318 of file tracktion_AudioClipBase.h.

◆ getBeatSensitivity()

float tracktion::engine::AudioClipBase::getBeatSensitivity ( ) const

Returns the beat sensitivity.

Definition at line 281 of file tracktion_AudioClipBase.h.

◆ getClipEffects()

ClipEffects * tracktion::engine::AudioClipBase::getClipEffects ( ) const
noexcept

Returns the ClipEffects for this clip if it has been enabled.

Definition at line 415 of file tracktion_AudioClipBase.h.

◆ getClipMessage()

virtual juce::String tracktion::engine::AudioClipBase::getClipMessage ( )
virtual

Override this to return a custom message to display over the clip where the "file missing" text usually goes.

Reimplemented in tracktion::engine::EditClip.

Definition at line 118 of file tracktion_AudioClipBase.h.

◆ getDefaultColour()

juce::Colour tracktion::engine::AudioClipBase::getDefaultColour ( ) const
overridevirtual

Returns the default colour for this clip.

Implements tracktion::engine::Clip.

Definition at line 407 of file tracktion_AudioClipBase.cpp.

◆ getEffectsVisible()

bool tracktion::engine::AudioClipBase::getEffectsVisible ( ) const

Returns true if the effectsVisible flag is set for this clip.

Definition at line 412 of file tracktion_AudioClipBase.h.

◆ getFadeIn()

TimeDuration tracktion::engine::AudioClipBase::getFadeIn ( ) const

Returns the fade in duration in seconds.

Definition at line 539 of file tracktion_AudioClipBase.cpp.

◆ getFadeInBehaviour()

FadeBehaviour tracktion::engine::AudioClipBase::getFadeInBehaviour ( ) const

Returns the fade in behaviour.

Definition at line 221 of file tracktion_AudioClipBase.h.

◆ getFadeInType()

AudioFadeCurve::Type tracktion::engine::AudioClipBase::getFadeInType ( ) const

Returns the curve shape for the fade in to use.

Definition at line 180 of file tracktion_AudioClipBase.h.

◆ getFadeOut()

TimeDuration tracktion::engine::AudioClipBase::getFadeOut ( ) const

Returns the fade out duration in seconds.

Definition at line 554 of file tracktion_AudioClipBase.cpp.

◆ getFadeOutBehaviour()

FadeBehaviour tracktion::engine::AudioClipBase::getFadeOutBehaviour ( ) const

Returns the fade out behaviour.

Definition at line 226 of file tracktion_AudioClipBase.h.

◆ getFadeOutType()

AudioFadeCurve::Type tracktion::engine::AudioClipBase::getFadeOutType ( ) const

Returns the curve shape for the fade out to use.

Definition at line 185 of file tracktion_AudioClipBase.h.

◆ getFollowActions()

FollowActions * tracktion::engine::AudioClipBase::getFollowActions ( )
overridevirtual

Some clip types can be launched, if that's possible, this can be used to determine the action to perform after a clip has played.

Reimplemented from tracktion::engine::Clip.

Definition at line 1562 of file tracktion_AudioClipBase.cpp.

◆ getGain()

float tracktion::engine::AudioClipBase::getGain ( ) const
noexcept

Returns the gain of the clip.

Definition at line 129 of file tracktion_AudioClipBase.h.

◆ getGainDB()

float tracktion::engine::AudioClipBase::getGainDB ( ) const
noexcept

Returns the gain of the clip in dB.

Definition at line 127 of file tracktion_AudioClipBase.h.

◆ getHash()

virtual HashCode tracktion::engine::AudioClipBase::getHash ( ) const
pure virtual

Must return a unique hash for this clip's source.

This should be the same until the clip changes as it is used to determine if the proxy needs regenerating.

Implemented in tracktion::engine::ContainerClip, tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

◆ getIsReversed()

bool tracktion::engine::AudioClipBase::getIsReversed ( ) const
noexcept

Returns true if the clip's source material is reversed.

Definition at line 370 of file tracktion_AudioClipBase.h.

◆ getLaunchHandle()

std::shared_ptr< LaunchHandle > tracktion::engine::AudioClipBase::getLaunchHandle ( )
overridevirtual

Some clip types can be launched, if that's possible, this returns a handle to trigger starting/stopping the clip.

Reimplemented from tracktion::engine::Clip.

Definition at line 1546 of file tracktion_AudioClipBase.cpp.

◆ getLaunchQuantisation()

LaunchQuantisation * tracktion::engine::AudioClipBase::getLaunchQuantisation ( )
overridevirtual

Some clip types can be launched, if that's possible, this returns a quantisation that can be used for this clip.

N.B. This will always be the clip's LaunchQuantisation, to find out if you should use the Edit's LaunchQuantisation, check usesGlobalLaunchQuatisation first

Reimplemented from tracktion::engine::Clip.

Definition at line 1554 of file tracktion_AudioClipBase.cpp.

◆ getLiveClipLevel()

LiveClipLevel tracktion::engine::AudioClipBase::getLiveClipLevel ( )

Returns a LiveClipLevel which can be used to read the gain, pan and mute statuses.

Definition at line 1651 of file tracktion_AudioClipBase.cpp.

◆ getLoopInfo() [1/2]

LoopInfo & tracktion::engine::AudioClipBase::getLoopInfo ( )

Returns the LoopInfo being used to describe this clip.

Definition at line 239 of file tracktion_AudioClipBase.h.

◆ getLoopInfo() [2/2]

const LoopInfo & tracktion::engine::AudioClipBase::getLoopInfo ( ) const

Returns the LoopInfo being used to describe this clip.

Definition at line 237 of file tracktion_AudioClipBase.h.

◆ getLoopLength()

TimeDuration tracktion::engine::AudioClipBase::getLoopLength ( ) const
overridevirtual

Returns the length of loop in seconds.

Reimplemented from tracktion::engine::Clip.

Definition at line 950 of file tracktion_AudioClipBase.cpp.

◆ getLoopLengthBeats()

BeatDuration tracktion::engine::AudioClipBase::getLoopLengthBeats ( ) const
overridevirtual

Returns the length of loop in beats.

Reimplemented from tracktion::engine::Clip.

Definition at line 966 of file tracktion_AudioClipBase.cpp.

◆ getLoopRange()

TimeRange tracktion::engine::AudioClipBase::getLoopRange ( ) const

Returns the loop range in seconds.

Definition at line 925 of file tracktion_AudioClipBase.cpp.

◆ getLoopStart()

TimePosition tracktion::engine::AudioClipBase::getLoopStart ( ) const
overridevirtual

Returns the start time of the loop start point.

Reimplemented from tracktion::engine::Clip.

Definition at line 942 of file tracktion_AudioClipBase.cpp.

◆ getLoopStartBeats()

BeatPosition tracktion::engine::AudioClipBase::getLoopStartBeats ( ) const
overridevirtual

Returns the beat position of the loop start point.

Reimplemented from tracktion::engine::Clip.

Definition at line 958 of file tracktion_AudioClipBase.cpp.

◆ getMaximumLength()

TimeDuration tracktion::engine::AudioClipBase::getMaximumLength ( )
overridevirtual

Returns the maximum length for this clip.

This can change depending on the clips properties e.g. if the clip is timestretched then this will return a proportion of getSourceLength, if it is looped this will return infinite.

Reimplemented from tracktion::engine::Clip.

Definition at line 413 of file tracktion_AudioClipBase.cpp.

◆ getOriginalFile()

virtual juce::File tracktion::engine::AudioClipBase::getOriginalFile ( ) const
pure virtual

Must return the file that the source ProjectItemID refers to.

Implemented in tracktion::engine::ContainerClip, tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

◆ getOverlappingClip()

AudioClipBase * tracktion::engine::AudioClipBase::getOverlappingClip ( ClipDirection  direction) const

Returns the previous/next overlapping clip if one exists.

Definition at line 698 of file tracktion_AudioClipBase.cpp.

◆ getPan()

float tracktion::engine::AudioClipBase::getPan ( ) const
noexcept

Returns the pan of the clip from -1 to 1.

See also
setPan.

Definition at line 136 of file tracktion_AudioClipBase.h.

◆ getPatternGenerator()

PatternGenerator * tracktion::engine::AudioClipBase::getPatternGenerator ( )
overridevirtual

Returns the PatternGenerator for this clip if it has one.

See also
MidiClip

Reimplemented from tracktion::engine::Clip.

Definition at line 374 of file tracktion_AudioClipBase.cpp.

◆ getPitchChange()

float tracktion::engine::AudioClipBase::getPitchChange ( ) const

Returns the number of semitones to transpose the clip by.

Definition at line 361 of file tracktion_AudioClipBase.h.

◆ getPitchChoices()

juce::StringArray tracktion::engine::AudioClipBase::getPitchChoices ( )

Returns an array describng what pitch each semitone change will be.

Definition at line 1267 of file tracktion_AudioClipBase.cpp.

◆ getPitchRatio()

float tracktion::engine::AudioClipBase::getPitchRatio ( ) const

Returns the pitch change as a normalised ratio.

0 = no change, <0 = pitched down, >0 = pitched up.

Definition at line 364 of file tracktion_AudioClipBase.h.

◆ getPlaybackFile()

AudioFile tracktion::engine::AudioClipBase::getPlaybackFile ( )

Returns the current AudioFile being used by the Clip, either the original source or a proxy.

Definition at line 2166 of file tracktion_AudioClipBase.cpp.

◆ getPluginList()

PluginList * tracktion::engine::AudioClipBase::getPluginList ( )
overridevirtual

Returns the PluginList for this clip if it has one.

Reimplemented from tracktion::engine::Clip.

Definition at line 614 of file tracktion_AudioClipBase.h.

◆ getProxyFileToCreate()

AudioFile tracktion::engine::AudioClipBase::getProxyFileToCreate ( bool  renderTimestretched)

Returns the AudioFile to create to play this clip back.

Parameters
renderTimestretchedIf true, this should be a time-stretched version of the clip
See also
setAutoTempo

Definition at line 1899 of file tracktion_AudioClipBase.cpp.

◆ getProxyHash()

HashCode tracktion::engine::AudioClipBase::getProxyHash ( )

Returns a hash identifying the proxy settings.

Definition at line 2194 of file tracktion_AudioClipBase.cpp.

◆ getReferencedItems()

juce::Array< Exportable::ReferencedItem > tracktion::engine::AudioClipBase::getReferencedItems ( )
overridevirtual

Implements tracktion::engine::Exportable.

Definition at line 1462 of file tracktion_AudioClipBase.cpp.

◆ getRenderJob()

virtual RenderManager::Job::Ptr tracktion::engine::AudioClipBase::getRenderJob ( const AudioFile )
virtual

Subclasses should override this to return a RenderJob suitable for rendering its source file.

Note that because we can only render one source this should also check to see if the source should be reversed and do so accordingly. This will be called on the message thread so should complete quickly, if your source needs some time consuming setup (e.g. loading Edits) then make sure your render job does this in its render thread.

Reimplemented in tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

Definition at line 103 of file tracktion_AudioClipBase.h.

◆ getRenderMessage()

virtual juce::String tracktion::engine::AudioClipBase::getRenderMessage ( )
virtual

Override this to return a custom message to be displayed over waveforms during rendering.

This is called periodically once a render has started. Once you are done, this should return an empty string to let the AudioStripBase know to stop updating.

Reimplemented in tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

Definition at line 115 of file tracktion_AudioClipBase.h.

◆ getResamplingQuality()

ResamplingQuality tracktion::engine::AudioClipBase::getResamplingQuality ( ) const

Returns the resampling quality to the be used.

Definition at line 1065 of file tracktion_AudioClipBase.cpp.

◆ getRescaledMarkPoints() [1/2]

juce::Array< TimePosition > tracktion::engine::AudioClipBase::getRescaledMarkPoints ( ) const
overridevirtual

Returns the mark points relative to the start of the clip, rescaled to the current speed.

Reimplemented from tracktion::engine::Clip.

Definition at line 1747 of file tracktion_AudioClipBase.cpp.

◆ getRescaledMarkPoints() [2/2]

void tracktion::engine::AudioClipBase::getRescaledMarkPoints ( juce::Array< TimePosition > &  rescaled,
juce::Array< int > &  orig 
) const

Definition at line 1755 of file tracktion_AudioClipBase.cpp.

◆ getRootNoteChoices()

juce::StringArray tracktion::engine::AudioClipBase::getRootNoteChoices ( Engine e)
static

Returns an array of the root note choices e.g.

"C#" etc.

Definition at line 1256 of file tracktion_AudioClipBase.cpp.

◆ getSourceLength()

virtual TimeDuration tracktion::engine::AudioClipBase::getSourceLength ( ) const
pure virtual

Must return the length in seconds of the source material e.g.

the length of the audio file or edit.

Implemented in tracktion::engine::ContainerClip, tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

◆ getTakes()

juce::Array< ProjectItemID > tracktion::engine::AudioClipBase::getTakes ( ) const
virtual

Returns the ProjectItemID of the clip's takes.

Reimplemented in tracktion::engine::WaveAudioClip.

Definition at line 1539 of file tracktion_AudioClipBase.cpp.

◆ getTimeStretchMode()

TimeStretcher::Mode tracktion::engine::AudioClipBase::getTimeStretchMode ( ) const
noexcept

Returns the time-stretch mode that has been set.

Definition at line 586 of file tracktion_AudioClipBase.cpp.

◆ getTransposeSemiTones()

int tracktion::engine::AudioClipBase::getTransposeSemiTones ( bool  includeAutoPitch) const

Returns the number of semitones this clip will be changed by.

N.B. this is used if auto-pitch is enabled.

Parameters
includeAutoPitchIf true, this will include the changes defined by auto-pitch. If false, this will only be the number explicitly set in setTranspose

Definition at line 1178 of file tracktion_AudioClipBase.cpp.

◆ getWarpTime()

bool tracktion::engine::AudioClipBase::getWarpTime ( ) const

Returns true if warp time is enabled.

Definition at line 340 of file tracktion_AudioClipBase.h.

◆ getWarpTimeManager()

WarpTimeManager & tracktion::engine::AudioClipBase::getWarpTimeManager ( ) const

Returns the WarpTimeManager for this clip used to maipluate warp markers.

Definition at line 1165 of file tracktion_AudioClipBase.cpp.

◆ getWaveInfo()

AudioFileInfo tracktion::engine::AudioClipBase::getWaveInfo ( )
virtual

Returns the WaveInfo for a clip.

By default this just looks in the AudioSegmentList cache but subclasses can override this to return a custom WaveInfo if they don't reference source files..

Reimplemented in tracktion::engine::EditClip.

Definition at line 2182 of file tracktion_AudioClipBase.cpp.

◆ hideMelodyneWindow()

void tracktion::engine::AudioClipBase::hideMelodyneWindow ( )

Hides the Melodyne window if this clip is using Melodyne.

Definition at line 1100 of file tracktion_AudioClipBase.cpp.

◆ initialise()

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

Initialises the Clip.

Called once automatically after construction.

Reimplemented from tracktion::engine::Clip.

Reimplemented in tracktion::engine::ContainerClip, tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

Definition at line 286 of file tracktion_AudioClipBase.cpp.

◆ isLeftChannelActive()

bool tracktion::engine::AudioClipBase::isLeftChannelActive ( ) const

Returns whether the left channel of the clip is enabled.

Definition at line 465 of file tracktion_AudioClipBase.cpp.

◆ isLooping()

bool tracktion::engine::AudioClipBase::isLooping ( ) const
overridevirtual

Returns true if this clip is currently looping.

Reimplemented from tracktion::engine::Clip.

Definition at line 247 of file tracktion_AudioClipBase.h.

◆ isMuted()

bool tracktion::engine::AudioClipBase::isMuted ( ) const
overridevirtual

Returns true if the clip is muted.

Implements tracktion::engine::Clip.

Definition at line 141 of file tracktion_AudioClipBase.h.

◆ isRightChannelActive()

bool tracktion::engine::AudioClipBase::isRightChannelActive ( ) const

Returns whether the right channel of the clip is enabled.

Definition at line 492 of file tracktion_AudioClipBase.cpp.

◆ isUsingFile()

bool tracktion::engine::AudioClipBase::isUsingFile ( const AudioFile af)
virtual

Should return true if the clip is referencing the file in any way.

Reimplemented in tracktion::engine::ContainerClip, tracktion::engine::WaveAudioClip, and tracktion::engine::EditClip.

Definition at line 1867 of file tracktion_AudioClipBase.cpp.

◆ isUsingMelodyne()

bool tracktion::engine::AudioClipBase::isUsingMelodyne ( ) const

Returns true if this clip is using Melodyne.

Definition at line 1084 of file tracktion_AudioClipBase.cpp.

◆ loadMelodyneState()

void tracktion::engine::AudioClipBase::loadMelodyneState ( )

Definition at line 1089 of file tracktion_AudioClipBase.cpp.

◆ markAsDirty()

void tracktion::engine::AudioClipBase::markAsDirty ( )

Resets the dirty flag so that a new render will be attempted.

Call this whenever one of your clips properties that will change the source file change. This flag is used to avoid constantly re-rendering failed sources.

Definition at line 1657 of file tracktion_AudioClipBase.cpp.

◆ melodyneConvertToMIDI()

void tracktion::engine::AudioClipBase::melodyneConvertToMIDI ( )

If this clip is using Melodyne, this will create a new MIDI clip based on the Melodyne analysis.

Definition at line 1106 of file tracktion_AudioClipBase.cpp.

◆ moveMarkTo()

void tracktion::engine::AudioClipBase::moveMarkTo ( TimePosition  relCursorPos)

Definition at line 1379 of file tracktion_AudioClipBase.cpp.

◆ needsRender()

virtual bool tracktion::engine::AudioClipBase::needsRender ( ) const
virtual

Subclasses should override this to return true if they need the rest of the render callbacks.

Reimplemented in tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

Definition at line 95 of file tracktion_AudioClipBase.h.

◆ performTempoDetect()

bool tracktion::engine::AudioClipBase::performTempoDetect ( )

Performs a tempo-detection task and if successful sets the clip's LoopInfo tempo to this.

Returns
true if the tempo was sensibly detected [[ blocks ]]

Definition at line 1241 of file tracktion_AudioClipBase.cpp.

◆ pitchTempoTrackChanged()

void tracktion::engine::AudioClipBase::pitchTempoTrackChanged ( )
overridevirtual

Called when there are pitch or tempo changes made which might require clips to adjust timing information.

Reimplemented from tracktion::engine::Clip.

Reimplemented in tracktion::engine::ContainerClip.

Definition at line 1032 of file tracktion_AudioClipBase.cpp.

◆ reassignReferencedItem()

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

Implements tracktion::engine::Exportable.

Definition at line 1519 of file tracktion_AudioClipBase.cpp.

◆ renderComplete()

void tracktion::engine::AudioClipBase::renderComplete ( )
virtual

Callback to indicate that the render has completed.

If you override this, make sure to call the base class implementation first.

Reimplemented in tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

Definition at line 1736 of file tracktion_AudioClipBase.cpp.

◆ reverseLoopPoints()

void tracktion::engine::AudioClipBase::reverseLoopPoints ( )

Reverses the loop points to expose the same section of the source file but reversed.

Definition at line 602 of file tracktion_AudioClipBase.cpp.

◆ sendMirrorUpdateToAllPlugins()

void tracktion::engine::AudioClipBase::sendMirrorUpdateToAllPlugins ( Plugin ) const
overridevirtual

Sends an update to all plugins mirroing the one passed in.

Reimplemented from tracktion::engine::Clip.

Definition at line 1602 of file tracktion_AudioClipBase.cpp.

◆ setAutoCrossfade()

void tracktion::engine::AudioClipBase::setAutoCrossfade ( bool  shouldAutoCrossfade)

Enables/disables auto-crossfading.

When enabled, the fade in/out length will automatically be set to the length of any overlapping clip regions.

Definition at line 191 of file tracktion_AudioClipBase.h.

◆ setAutoDetectBeats()

void tracktion::engine::AudioClipBase::setAutoDetectBeats ( bool  b)

Enables auto-detection of beats.

If this is true the LoopInfo will be set based on what beats were detected. This will aso updat eif the sensitivity is changed

See also
setBeatSensitivity. [[ blocks ]]

Definition at line 1020 of file tracktion_AudioClipBase.cpp.

◆ setAutoPitch()

void tracktion::engine::AudioClipBase::setAutoPitch ( bool  shouldUseAutoPitch)

Enables/disables auto-pitch.

If enabled, this clip will adjust its playback pitch to stay in sync with the Edit's PitchSequence.

Definition at line 323 of file tracktion_AudioClipBase.h.

◆ setAutoPitchMode()

void tracktion::engine::AudioClipBase::setAutoPitchMode ( AutoPitchMode  m)

Sets the AutoPitchMode to use.

Definition at line 329 of file tracktion_AudioClipBase.h.

◆ setAutoTempo()

void tracktion::engine::AudioClipBase::setAutoTempo ( bool  shouldUseAutoTempo)

Enables/disables auto-tempo.

If enabled, this clip will adjust its playback speed to stay in sync with the Edit's TempoSequence.

Definition at line 315 of file tracktion_AudioClipBase.h.

◆ setBeatSensitivity()

void tracktion::engine::AudioClipBase::setBeatSensitivity ( float  s)

Sets the beat sensitivity, triggering a LoopInfo update if auto-detect is enabled.

See also
setAutoDetectBeats

Definition at line 1026 of file tracktion_AudioClipBase.cpp.

◆ setEffectsVisible()

void tracktion::engine::AudioClipBase::setEffectsVisible ( bool  b)

Sets the effectsVisible flag for this clip.

Definition at line 409 of file tracktion_AudioClipBase.h.

◆ setFadeIn()

bool tracktion::engine::AudioClipBase::setFadeIn ( TimeDuration  length)

Sets the fade in duration in seconds.

If the duration is longer than the clip or overlaps the fade out, this will reduce the fade out accordingly.

Definition at line 498 of file tracktion_AudioClipBase.cpp.

◆ setFadeInBehaviour()

void tracktion::engine::AudioClipBase::setFadeInBehaviour ( FadeBehaviour  newBehaviour)

Sets the fade in behaviour.

Definition at line 219 of file tracktion_AudioClipBase.h.

◆ setFadeInType()

void tracktion::engine::AudioClipBase::setFadeInType ( AudioFadeCurve::Type  t)

Sets the curve shape for the fade in to use.

Definition at line 569 of file tracktion_AudioClipBase.cpp.

◆ setFadeOut()

bool tracktion::engine::AudioClipBase::setFadeOut ( TimeDuration  length)

Sets the fade out duration in seconds.

If the duration is longer than the clip or overlaps the fade in, this will reduce the fade in accordingly.

Definition at line 519 of file tracktion_AudioClipBase.cpp.

◆ setFadeOutBehaviour()

void tracktion::engine::AudioClipBase::setFadeOutBehaviour ( FadeBehaviour  newBehaviour)

Sets the fade out behaviour.

Definition at line 224 of file tracktion_AudioClipBase.h.

◆ setFadeOutType()

void tracktion::engine::AudioClipBase::setFadeOutType ( AudioFadeCurve::Type  newType)

Sets the curve shape for the fade out to use.

Definition at line 577 of file tracktion_AudioClipBase.cpp.

◆ setGainDB()

void tracktion::engine::AudioClipBase::setGainDB ( float  dB)

Sets the gain of the clip in dB.

Definition at line 431 of file tracktion_AudioClipBase.cpp.

◆ setIsReversed()

void tracktion::engine::AudioClipBase::setIsReversed ( bool  shouldBeReversed)

Enables reversing of the clip's source material.

Definition at line 367 of file tracktion_AudioClipBase.h.

◆ setLeftChannelActive()

void tracktion::engine::AudioClipBase::setLeftChannelActive ( bool  b)

Enables the left channel of the clip.

Definition at line 443 of file tracktion_AudioClipBase.cpp.

◆ setLoopDefaults()

virtual void tracktion::engine::AudioClipBase::setLoopDefaults ( )
pure virtual

Override this to fill in the LoopInfo structure as best fits the source.

Implemented in tracktion::engine::ContainerClip, tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.

◆ setLoopInfo()

void tracktion::engine::AudioClipBase::setLoopInfo ( const LoopInfo loopInfo_)

Sets a LoopInfo to describe this clip's tempo, time sig etc.

which is used when syncing to the TempoSequence and PitchSequence.

See also
LoopInfo.

Definition at line 871 of file tracktion_AudioClipBase.cpp.

◆ setLoopRange()

void tracktion::engine::AudioClipBase::setLoopRange ( TimeRange  )
overridevirtual

Sets the loop range the clip should use in seconds.

Reimplemented from tracktion::engine::Clip.

Definition at line 974 of file tracktion_AudioClipBase.cpp.

◆ setLoopRangeBeats()

void tracktion::engine::AudioClipBase::setLoopRangeBeats ( BeatRange  )
overridevirtual

Sets the loop range the clip should use in beats.

Reimplemented from tracktion::engine::Clip.

Reimplemented in tracktion::engine::ContainerClip.

Definition at line 1005 of file tracktion_AudioClipBase.cpp.

◆ setMuted()

void tracktion::engine::AudioClipBase::setMuted ( bool  )
overridevirtual

Mutes or unmutes the clip.

Reimplemented from tracktion::engine::Clip.

Definition at line 139 of file tracktion_AudioClipBase.h.

◆ setNumberOfLoops()

void tracktion::engine::AudioClipBase::setNumberOfLoops ( int  )
overridevirtual

Sets the clip looping a number of times.

Reimplemented from tracktion::engine::Clip.

Definition at line 876 of file tracktion_AudioClipBase.cpp.

◆ setPan()

void tracktion::engine::AudioClipBase::setPan ( float  pan)

Sets the pan of the clip.

Parameters
pan-1 = full left, 0 = centre, 1 = full right

Definition at line 436 of file tracktion_AudioClipBase.cpp.

◆ setParent()

void tracktion::engine::AudioClipBase::setParent ( ClipOwner co)
overridevirtual

Reimplemented from tracktion::engine::Clip.

Definition at line 384 of file tracktion_AudioClipBase.cpp.

◆ setPitchChange()

void tracktion::engine::AudioClipBase::setPitchChange ( float  semitones)

Sets the number of semitones to transpose the clip by.

N.B. this is only used if auto-pitch is disabled.

Definition at line 358 of file tracktion_AudioClipBase.h.

◆ setResamplingQuality()

void tracktion::engine::AudioClipBase::setResamplingQuality ( ResamplingQuality  rq)

Sets the resampling qulity to use.

This is only applicable if setUsesProxy has been set to false. If a proxy is used, Lagrange interpolation will be used. N.B. the higher the quality, the more higher the CPU usage during playback.

Definition at line 1060 of file tracktion_AudioClipBase.cpp.

◆ setRightChannelActive()

void tracktion::engine::AudioClipBase::setRightChannelActive ( bool  b)

Enables the right channel of the clip.

Definition at line 470 of file tracktion_AudioClipBase.cpp.

◆ setSpeedRatio()

void tracktion::engine::AudioClipBase::setSpeedRatio ( double  r)
overridevirtual

Sets a speed ratio i.e.

how quickly the clip plays back.

Reimplemented from tracktion::engine::Clip.

Definition at line 1071 of file tracktion_AudioClipBase.cpp.

◆ setTimeStretchMode()

void tracktion::engine::AudioClipBase::setTimeStretchMode ( TimeStretcher::Mode  mode)

Sets a time-stretch mode to use.

Definition at line 1157 of file tracktion_AudioClipBase.cpp.

◆ setTranspose()

void tracktion::engine::AudioClipBase::setTranspose ( int  numSemitones)

Sets the number of semitones to transpose the clip by.

Definition at line 346 of file tracktion_AudioClipBase.h.

◆ setupARA()

bool tracktion::engine::AudioClipBase::setupARA ( bool  dontPopupErrorMessages)

This internal method is used solely to find out if createAudioNode() should return nullptr or not.

Though a bit spaghetti, the ARA node generation will be handled elsewhere, the parent AudioTrack, for the sake of live-play.

Returns
False if something went wrong!
     It's possible no ARA-compatible plugins were found,
     or that ARA complained about something resulting
     in failure to set it up accordingly.
     Celemony's ARA is really flaky and touchy, so the latter
     is most likely!

Definition at line 1608 of file tracktion_AudioClipBase.cpp.

◆ setUsesGlobalLaunchQuatisation()

void tracktion::engine::AudioClipBase::setUsesGlobalLaunchQuatisation ( bool  )
overridevirtual

Some clip types can be launched, if that's possible, this sets whether the clip's quantisation or the global quantisation should be used.

See also
getLaunchQuantisation, Edit::getLaunchQuantisation

Reimplemented from tracktion::engine::Clip.

Definition at line 598 of file tracktion_AudioClipBase.h.

◆ setUsesProxy()

void tracktion::engine::AudioClipBase::setUsesProxy ( bool  canUseProxy)
noexcept

Can be used to disable proxy file generation for this clip.

If disabled, the audio engine will time-stretch the file in real time which may use more CPU.

Definition at line 1878 of file tracktion_AudioClipBase.cpp.

◆ setWarpTime()

void tracktion::engine::AudioClipBase::setWarpTime ( bool  shouldUseWarpTime)

Enables/disables warp time.

Warp Time enables segmented warping of the audio.

See also
WarpTimeManager

Definition at line 337 of file tracktion_AudioClipBase.h.

◆ showMelodyneWindow()

void tracktion::engine::AudioClipBase::showMelodyneWindow ( )

Shows the Melodyne window if this clip is using Melodyne.

Definition at line 1094 of file tracktion_AudioClipBase.cpp.

◆ snapToOriginalBWavTime()

void tracktion::engine::AudioClipBase::snapToOriginalBWavTime ( )

Moves the clip to the bwav time reference metadata property time.

Definition at line 1448 of file tracktion_AudioClipBase.cpp.

◆ updateAutoCrossfadesAsync()

void tracktion::engine::AudioClipBase::updateAutoCrossfadesAsync ( bool  updateOverlapped)

Triggers an update of the auto-crossfades.

N.B. you shouldn't normally need to call this, it's called by the AudioTrack when clips are moved.

Parameters
updateOverlappedIf true, this will also update any other clips that overlap this one.

Definition at line 728 of file tracktion_AudioClipBase.cpp.

◆ updateLeftRightChannelActivenessFlags()

void tracktion::engine::AudioClipBase::updateLeftRightChannelActivenessFlags ( )
protected

Definition at line 354 of file tracktion_AudioClipBase.cpp.

◆ updateSourceFile()

void tracktion::engine::AudioClipBase::updateSourceFile ( )

Checks the current source file to see if it's up to date and then triggers a source render if needed.

This uses the needsRender and getHash methods to determine the source file to be used. Call this if something changes that will affect the render e.g. tracks in an EditClip.

Definition at line 1663 of file tracktion_AudioClipBase.cpp.

◆ usesGlobalLaunchQuatisation()

bool tracktion::engine::AudioClipBase::usesGlobalLaunchQuatisation ( )
overridevirtual

Some clip types can be launched, if that's possible, this returns whether the clip's quantisation or the global quantisation should be used.

See also
getLaunchQuantisation, Edit::getLaunchQuantisation

Reimplemented from tracktion::engine::Clip.

Definition at line 600 of file tracktion_AudioClipBase.h.

◆ usesTimeStretchedProxy()

bool tracktion::engine::AudioClipBase::usesTimeStretchedProxy ( ) const

Retuns true if this clip use a proxy file due to timestretching.

This can be because auto-tempo, auto-pitch or a pitch change has been set.

Definition at line 1884 of file tracktion_AudioClipBase.cpp.

◆ valueTreeChildAdded()

void tracktion::engine::AudioClipBase::valueTreeChildAdded ( juce::ValueTree parent,
juce::ValueTree child 
)
overrideprotectedvirtual

Reimplemented from juce::ValueTree::Listener.

Definition at line 2427 of file tracktion_AudioClipBase.cpp.

◆ valueTreeChildOrderChanged()

void tracktion::engine::AudioClipBase::valueTreeChildOrderChanged ( juce::ValueTree parentState,
int  oldIndex,
int  newIndex 
)
overrideprotectedvirtual

Reimplemented from juce::ValueTree::Listener.

Definition at line 2473 of file tracktion_AudioClipBase.cpp.

◆ valueTreeChildRemoved()

void tracktion::engine::AudioClipBase::valueTreeChildRemoved ( juce::ValueTree parent,
juce::ValueTree child,
int  oldIndex 
)
overrideprotectedvirtual

Reimplemented from juce::ValueTree::Listener.

Definition at line 2450 of file tracktion_AudioClipBase.cpp.

◆ valueTreeParentChanged()

void tracktion::engine::AudioClipBase::valueTreeParentChanged ( juce::ValueTree child)
overrideprotectedvirtual

Reimplemented from juce::ValueTree::Listener.

Definition at line 2478 of file tracktion_AudioClipBase.cpp.

◆ valueTreePropertyChanged()

void tracktion::engine::AudioClipBase::valueTreePropertyChanged ( juce::ValueTree tree,
const juce::Identifier id 
)
overrideprotectedvirtual

Reimplemented from juce::ValueTree::Listener.

Definition at line 2332 of file tracktion_AudioClipBase.cpp.

Friends And Related Symbol Documentation

◆ WaveCompManager

friend class WaveCompManager
friend

Definition at line 618 of file tracktion_AudioClipBase.h.

Member Data Documentation

◆ activeChannels

juce::AudioChannelSet tracktion::engine::AudioClipBase::activeChannels
protected

Definition at line 651 of file tracktion_AudioClipBase.h.

◆ asyncFunctionCaller

AsyncFunctionCaller tracktion::engine::AudioClipBase::asyncFunctionCaller
mutableprotected

Definition at line 649 of file tracktion_AudioClipBase.h.

◆ audioSegmentList

std::unique_ptr<AudioSegmentList> tracktion::engine::AudioClipBase::audioSegmentList
mutableprotected

Definition at line 647 of file tracktion_AudioClipBase.h.

◆ autoCrossfade

juce::CachedValue<bool> tracktion::engine::AudioClipBase::autoCrossfade
protected

Definition at line 627 of file tracktion_AudioClipBase.h.

◆ autoDetectBeats

juce::CachedValue<bool> tracktion::engine::AudioClipBase::autoDetectBeats
protected

Definition at line 643 of file tracktion_AudioClipBase.h.

◆ autoFadeIn

TimeDuration tracktion::engine::AudioClipBase::autoFadeIn
protected

Definition at line 625 of file tracktion_AudioClipBase.h.

◆ autoFadeOut

TimeDuration tracktion::engine::AudioClipBase::autoFadeOut
protected

Definition at line 625 of file tracktion_AudioClipBase.h.

◆ autoPitch

juce::CachedValue<bool> tracktion::engine::AudioClipBase::autoPitch
protected

Definition at line 643 of file tracktion_AudioClipBase.h.

◆ autoPitchMode

juce::CachedValue<AutoPitchMode> tracktion::engine::AudioClipBase::autoPitchMode
protected

Definition at line 644 of file tracktion_AudioClipBase.h.

◆ autoTempo

juce::CachedValue<bool> tracktion::engine::AudioClipBase::autoTempo
protected

Definition at line 643 of file tracktion_AudioClipBase.h.

◆ beatSensitivity

juce::CachedValue<float> tracktion::engine::AudioClipBase::beatSensitivity
protected

Definition at line 641 of file tracktion_AudioClipBase.h.

◆ channels

juce::CachedValue<juce::String> tracktion::engine::AudioClipBase::channels
protected

Definition at line 622 of file tracktion_AudioClipBase.h.

◆ clipEffects

std::unique_ptr<ClipEffects> tracktion::engine::AudioClipBase::clipEffects
protected

Definition at line 648 of file tracktion_AudioClipBase.h.

◆ clipEffectsVisible

juce::CachedValue<bool> tracktion::engine::AudioClipBase::clipEffectsVisible
protected

Definition at line 643 of file tracktion_AudioClipBase.h.

◆ elastiqueProOptions

juce::CachedValue<TimeStretcher::ElastiqueProOptions> tracktion::engine::AudioClipBase::elastiqueProOptions

The ElastiqueProOptions for fine tuning Elastique (if available).

Definition at line 553 of file tracktion_AudioClipBase.h.

◆ fadeIn

juce::CachedValue<TimeDuration> tracktion::engine::AudioClipBase::fadeIn
protected

Definition at line 624 of file tracktion_AudioClipBase.h.

◆ fadeInBehaviour

juce::CachedValue<FadeBehaviour> tracktion::engine::AudioClipBase::fadeInBehaviour
protected

Definition at line 628 of file tracktion_AudioClipBase.h.

◆ fadeInType

juce::CachedValue<AudioFadeCurve::Type> tracktion::engine::AudioClipBase::fadeInType
protected

Definition at line 626 of file tracktion_AudioClipBase.h.

◆ fadeOut

juce::CachedValue<TimeDuration> tracktion::engine::AudioClipBase::fadeOut
protected

Definition at line 624 of file tracktion_AudioClipBase.h.

◆ fadeOutBehaviour

juce::CachedValue<FadeBehaviour> tracktion::engine::AudioClipBase::fadeOutBehaviour
protected

Definition at line 628 of file tracktion_AudioClipBase.h.

◆ fadeOutType

juce::CachedValue<AudioFadeCurve::Type> tracktion::engine::AudioClipBase::fadeOutType
protected

Definition at line 626 of file tracktion_AudioClipBase.h.

◆ isReversed

juce::CachedValue<bool> tracktion::engine::AudioClipBase::isReversed
protected

Definition at line 643 of file tracktion_AudioClipBase.h.

◆ lastProxy

AudioFile tracktion::engine::AudioClipBase::lastProxy
protected

Definition at line 659 of file tracktion_AudioClipBase.h.

◆ lastRenderJobFailed

bool tracktion::engine::AudioClipBase::lastRenderJobFailed
protected

Definition at line 656 of file tracktion_AudioClipBase.h.

◆ level

std::shared_ptr<ClipLevel> tracktion::engine::AudioClipBase::level
protected

Definition at line 621 of file tracktion_AudioClipBase.h.

◆ loopInfo

LoopInfo tracktion::engine::AudioClipBase::loopInfo
protected

Definition at line 639 of file tracktion_AudioClipBase.h.

◆ loopLength

juce::CachedValue<TimeDuration> tracktion::engine::AudioClipBase::loopLength
protected

Definition at line 632 of file tracktion_AudioClipBase.h.

◆ loopLengthBeats

juce::CachedValue<BeatDuration> tracktion::engine::AudioClipBase::loopLengthBeats
protected

Definition at line 634 of file tracktion_AudioClipBase.h.

◆ loopStart

juce::CachedValue<TimePosition> tracktion::engine::AudioClipBase::loopStart
protected

Definition at line 631 of file tracktion_AudioClipBase.h.

◆ loopStartBeats

juce::CachedValue<BeatPosition> tracktion::engine::AudioClipBase::loopStartBeats
protected

Definition at line 633 of file tracktion_AudioClipBase.h.

◆ melodyneProxy

juce::ReferenceCountedObjectPtr<MelodyneFileReader> tracktion::engine::AudioClipBase::melodyneProxy

The MelodyneFileReader proxy if this clip is using Melodyne.

Definition at line 517 of file tracktion_AudioClipBase.h.

◆ pitchChange

juce::CachedValue<float> tracktion::engine::AudioClipBase::pitchChange
protected

Definition at line 638 of file tracktion_AudioClipBase.h.

◆ pluginList

PluginList tracktion::engine::AudioClipBase::pluginList
protected

Definition at line 654 of file tracktion_AudioClipBase.h.

◆ proxyAllowed

juce::CachedValue<int> tracktion::engine::AudioClipBase::proxyAllowed
protected

Definition at line 636 of file tracktion_AudioClipBase.h.

◆ renderJob

RenderManager::Job::Ptr tracktion::engine::AudioClipBase::renderJob
protected

Definition at line 658 of file tracktion_AudioClipBase.h.

◆ resamplingQuality

juce::CachedValue<ResamplingQuality> tracktion::engine::AudioClipBase::resamplingQuality
protected

Definition at line 629 of file tracktion_AudioClipBase.h.

◆ timeStretchMode

juce::CachedValue<TimeStretcher::Mode> tracktion::engine::AudioClipBase::timeStretchMode
protected

Definition at line 642 of file tracktion_AudioClipBase.h.

◆ transpose

juce::CachedValue<int> tracktion::engine::AudioClipBase::transpose
protected

Definition at line 637 of file tracktion_AudioClipBase.h.

◆ warpTime

juce::CachedValue<bool> tracktion::engine::AudioClipBase::warpTime
protected

Definition at line 643 of file tracktion_AudioClipBase.h.

◆ warpTimeManager

WarpTimeManager::Ptr tracktion::engine::AudioClipBase::warpTimeManager
mutableprotected

Definition at line 646 of file tracktion_AudioClipBase.h.


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