TracktionEngine
|
A clip in an edit. More...
#include <tracktion_Clip.h>
Classes | |
struct | Listener |
Listener interface to be notified of recorded MIDI being sent to the plugins. More... | |
Public Types | |
enum class | FollowActionDurationType { beats , loops } |
Defines the types of duration follow actions can use. More... | |
enum | SyncType { syncBarsBeats = 0 , syncAbsolute } |
Determines the clip sync type. More... | |
using | Ptr = juce::ReferenceCountedObjectPtr< Clip > |
using | Array = juce::ReferenceCountedArray< Clip > |
![]() | |
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... | |
![]() | |
using | WeakRef = juce::WeakReference< Selectable > |
Public Member Functions | |
Clip (const juce::ValueTree &, ClipOwner &, EditItemID, Type) | |
Creates a clip of a given type from a ValueTree state. | |
~Clip () override | |
Destructor. | |
virtual void | initialise () |
Initialises the Clip. | |
virtual void | flushStateToValueTree () |
Can be overridden to ensure any state (e.g. | |
virtual void | sourceMediaChanged () |
Called when the source media file reference (attribute "source") has changed - i.e. | |
virtual void | pitchTempoTrackChanged () |
Called when there are pitch or tempo changes made which might require clips to adjust timing information. | |
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 | canBeAddedTo (ClipOwner &)=0 |
Tests whether this clip can go on the given parent. | |
virtual bool | usesSourceFile () const |
True if it references a source file - i.e. | |
SourceFileReference & | getSourceFileReference () |
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< ReferencedItem > | getReferencedItems () 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. | |
virtual std::shared_ptr< LaunchHandle > | getLaunchHandle () |
Some clip types can be launched, if that's possible, this returns a handle to trigger starting/stopping the clip. | |
virtual void | setUsesGlobalLaunchQuatisation (bool) |
Some clip types can be launched, if that's possible, this sets whether the clip's quantisation or the global quantisation should be used. | |
virtual bool | usesGlobalLaunchQuatisation () |
Some clip types can be launched, if that's possible, this returns whether the clip's quantisation or the global quantisation should be used. | |
virtual LaunchQuantisation * | getLaunchQuantisation () |
Some clip types can be launched, if that's possible, this returns a quantisation that can be used for this clip. | |
virtual FollowActions * | getFollowActions () |
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. | |
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 TimeDuration | getMaximumLength () |
Returns the maximum length this clip can have. | |
virtual juce::Array< TimePosition > | getInterestingTimes () |
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. | |
virtual bool | canLoop () const |
Returns true if this clip is capable of looping. | |
virtual bool | isLooping () const |
Returns true if this clip is currently looping. | |
virtual bool | beatBasedLooping () const |
Returns true if this clip's looping is based on beats or false if absolute time. | |
virtual void | setNumberOfLoops (int) |
Sets the clip looping a number of times. | |
virtual void | disableLooping () |
Disables all looping. | |
virtual BeatPosition | getLoopStartBeats () const |
Returns the beat position of the loop start point. | |
virtual TimePosition | getLoopStart () const |
Returns the start time of the loop start point. | |
virtual BeatDuration | getLoopLengthBeats () const |
Returns the length of loop in beats. | |
virtual TimeDuration | getLoopLength () const |
Returns the length of loop in seconds. | |
TimeRange | getLoopRange () const |
Returns the loop range in seconds. | |
BeatRange | getLoopRangeBeats () const |
Returns the loop range in beats. | |
virtual void | setLoopRange (TimeRange) |
Sets the loop range the clip should use in seconds. | |
virtual void | setLoopRangeBeats (BeatRange) |
Sets the loop range the clip should use in beats. | |
virtual bool | isMuted () const =0 |
Returns true if the clip is muted. | |
virtual void | setMuted (bool) |
Mutes or unmutes the clip. | |
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 | setSpeedRatio (double) |
Sets a 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. | |
TrackItem * | getGroupParent () 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. | |
CollectionClip * | getGroupClip () 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. | |
ClipOwner * | getParent () const |
Returns the parent ClipOwner this clip is on. | |
ClipTrack * | getClipTrack () const |
Returns the parent ClipTrack this clip is on (if any). | |
Track * | getTrack () const override |
Returns the parent Track this clip is on (if any). | |
ClipSlot * | getClipSlot () 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 bool | addClipPlugin (const Plugin::Ptr &, SelectionManager &) |
Adds a plugin to the clip. | |
virtual Plugin::Array | getAllPlugins () |
Returns all the plugins on the clip. | |
virtual void | sendMirrorUpdateToAllPlugins (Plugin &) const |
Sends an update to all plugins mirroing the one passed in. | |
virtual PluginList * | getPluginList () |
Returns the PluginList for this clip if it has one. | |
virtual juce::Colour | getDefaultColour () const =0 |
Returns the default colour for this clip. | |
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. | |
virtual void | cloneFrom (Clip *) |
Clones the given clip to this clip. | |
void | updateLinkedClips () |
Triggers a call to cloneFrom for all clips with the same linkID. | |
virtual PatternGenerator * | getPatternGenerator () |
Returns the PatternGenerator for this clip if it has one. | |
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 |
juce::UndoManager * | getUndoManager () const |
Returns the UndoManager. | |
virtual void | setParent (ClipOwner *) |
![]() | |
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. | |
![]() | |
EditItem (EditItemID, Edit &) | |
EditItem (Edit &, const juce::ValueTree &) | |
virtual | ~EditItem ()=default |
![]() | |
Selectable () | |
virtual | ~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 () |
![]() | |
virtual | ~Exportable ()=default |
Static Public Member Functions | |
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 const char * | typeToString (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 void | initialise () |
static bool | isSelectableValid (const Selectable *) noexcept |
checks whether this object has been deleted. | |
![]() | |
static juce::Array< Exportable * > | addAllExportables (Edit &) |
Returns all the Exportables contained in an Edit. | |
Public Attributes | |
juce::CachedValue< FollowActionDurationType > | followActionDurationType |
The type of duration to use for when to trigger the follow action. | |
juce::CachedValue< BeatDuration > | followActionBeats |
Determines the time for which a launched clip will play before a follow action is taken. | |
juce::CachedValue< double > | followActionNumLoops |
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::Colour > | colour |
The colour property. | |
juce::CachedValue< bool > | disabled |
Whether the Clip is disabled or not. | |
![]() | |
const Type | type |
The type of this item. | |
![]() | |
Edit & | edit |
const EditItemID | itemID |
Every EditItem has an ID which is unique within the edit. | |
![]() | |
WeakRef::Master | masterReference |
Protected Member Functions | |
void | setCurrentSourceFile (const juce::File &) |
Sets a new source file for this clip. | |
virtual juce::Array< TimePosition > | getRescaledMarkPoints () const |
Returns the mark points relative to the start of the clip, rescaled to the current speed. | |
void | valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override |
void | valueTreeParentChanged (juce::ValueTree &) override |
Protected Attributes | |
bool | isInitialised = false |
bool | cloneInProgress = false |
juce::CachedValue< juce::String > | clipName |
ClipOwner * | parent = nullptr |
juce::CachedValue< TimePosition > | clipStart |
juce::CachedValue< TimeDuration > | length |
juce::CachedValue< TimeDuration > | offset |
juce::CachedValue< double > | speedRatio |
SourceFileReference | sourceFileReference |
juce::CachedValue< EditItemID > | groupID |
juce::CachedValue< juce::String > | linkID |
juce::File | currentSourceFile |
juce::CachedValue< SyncType > | syncType |
juce::CachedValue< bool > | showingTakes |
std::unique_ptr< PatternGenerator > | patternGenerator |
AsyncCaller | updateLinkedClipsCaller |
juce::ListenerList< Listener > | listeners |
A clip in an edit.
This is the base class for various clip types
using tracktion::engine::Clip::Ptr = juce::ReferenceCountedObjectPtr<Clip> |
using tracktion::engine::Clip::Array = juce::ReferenceCountedArray<Clip> |
tracktion::engine::Clip::Clip | ( | const juce::ValueTree & | , |
ClipOwner & | , | ||
EditItemID | , | ||
Type | |||
) |
Creates a clip of a given type from a ValueTree state.
Clip's have to have a parent ClipOwner and unique EditItemID
|
override |
Destructor.
Initialises the Clip.
Called once automatically after construction.
Reimplemented in tracktion::engine::ArrangerClip, tracktion::engine::AudioClipBase, tracktion::engine::ChordClip, tracktion::engine::ContainerClip, tracktion::engine::EditClip, tracktion::engine::MarkerClip, tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
Checks whether a ValueTree is some kind of clip state.
Checks whether a ValueTree type is some kind of clip state.
|
static |
Creates a clip for a given ValueTree representation.
This may return a previously-existing clip with the same ID.
Can be overridden to ensure any state (e.g.
clip plugins) is flushed to the ValueTree ready for saving.
Reimplemented in tracktion::engine::AudioClipBase, and tracktion::engine::ContainerClip.
Called when the source media file reference (attribute "source") has changed - i.e.
when the clip has a new ProjectItemID assigned, not when the file itself changes.
Reimplemented in tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.
Called when there are pitch or tempo changes made which might require clips to adjust timing information.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::ChordClip, tracktion::engine::ContainerClip, and tracktion::engine::MidiClip.
|
overridevirtual |
Returns true if this is a MidiClip.
Implemented in tracktion::engine::ArrangerClip, tracktion::engine::ChordClip, tracktion::engine::ContainerClip, tracktion::engine::EditClip, tracktion::engine::MarkerClip, tracktion::engine::MidiClip, tracktion::engine::StepClip, and tracktion::engine::WaveAudioClip.
Tests whether this clip can go on the given parent.
Implemented in tracktion::engine::ArrangerClip, tracktion::engine::AudioClipBase, tracktion::engine::ChordClip, tracktion::engine::MarkerClip, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
True if it references a source file - i.e.
audio clips do, midi doesn't.
Reimplemented in tracktion::engine::EditClip, and tracktion::engine::WaveAudioClip.
SourceFileReference & tracktion::engine::Clip::getSourceFileReference | ( | ) |
Returns the SourceFileReference of the Clip.
References sourceFileReference.
juce::File tracktion::engine::Clip::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.
References currentSourceFile.
Referenced by tracktion::engine::AudioClipBase::getAudioFile().
|
overridevirtual |
Returns an array of any ReferencedItem[s] e.g.
audio files.
Implements tracktion::engine::Exportable.
|
overridevirtual |
Should be implemented to change the underlying source to a new ProjectItemID.
Implements tracktion::engine::Exportable.
Reimplemented in tracktion::engine::WaveAudioClip.
|
virtual |
Some clip types can be launched, if that's possible, this returns a handle to trigger starting/stopping the clip.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Some clip types can be launched, if that's possible, this sets whether the clip's quantisation or the global quantisation should be used.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Some clip types can be launched, if that's possible, this returns whether the clip's quantisation or the global quantisation should be used.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
|
virtual |
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 in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
|
virtual |
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 in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
|
overridevirtual |
Returns the ClipPosition on the parent Track.
Implements tracktion::engine::TrackItem.
Reimplemented in tracktion::engine::StepClip.
BeatPosition tracktion::engine::Clip::getContentBeatAtTime | ( | TimePosition | ) | const |
Returns the beat number (with offset) at the given time.
TimePosition tracktion::engine::Clip::getTimeOfContentBeat | ( | BeatPosition | ) | const |
Returns time of a beat number.
|
virtual |
Returns the maximum length this clip can have.
Reimplemented in tracktion::engine::AudioClipBase.
References tracktion::engine::Edit::getMaximumEditEnd().
|
virtual |
Returns times for snapping to, relative to the Edit.
Base class adds start and end time.
TimePosition tracktion::engine::Clip::getSpottingPoint | ( | ) | const |
Returns the first marked time in the source file which can be used for syncronising newly added clips.
Returns true if this clip is capable of looping.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Returns true if this clip is currently looping.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Returns true if this clip's looping is based on beats or false if absolute time.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Sets the clip looping a number of times.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Disables all looping.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
|
virtual |
Returns the beat position of the loop start point.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Referenced by getLoopRangeBeats().
|
virtual |
Returns the start time of the loop start point.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Referenced by getLoopRange().
|
virtual |
Returns the length of loop in beats.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Referenced by getLoopRangeBeats().
|
virtual |
Returns the length of loop in seconds.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Referenced by getLoopRange().
TimeRange tracktion::engine::Clip::getLoopRange | ( | ) | const |
Returns the loop range in seconds.
References getLoopLength(), and getLoopStart().
BeatRange tracktion::engine::Clip::getLoopRangeBeats | ( | ) | const |
Returns the loop range in beats.
References getLoopLengthBeats(), and getLoopStartBeats().
Sets the loop range the clip should use in seconds.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Sets the loop range the clip should use in beats.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::ContainerClip, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Returns true if the clip is muted.
Implemented in tracktion::engine::ArrangerClip, tracktion::engine::AudioClipBase, tracktion::engine::ChordClip, tracktion::engine::MarkerClip, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Mutes or unmutes the clip.
Reimplemented in tracktion::engine::MidiClip, tracktion::engine::StepClip, and tracktion::engine::AudioClipBase.
Sets the sync type for the clip.
References syncType.
SyncType tracktion::engine::Clip::getSyncType | ( | ) | const |
Returns the sync type clip is using.
References syncType.
void tracktion::engine::Clip::setPosition | ( | ClipPosition | newPosition | ) |
Sets the position of the clip.
void tracktion::engine::Clip::setStart | ( | TimePosition | newStart, |
bool | preserveSync, | ||
bool | keepLength | ||
) |
Sets the start time of the clip.
newStart | The start time in seconds |
preserveSync | Whether the source material position should be kept static in relation to the Edit's timeline. |
keepLength | Whether the end should be moved to keep the same length. |
void tracktion::engine::Clip::setLength | ( | TimeDuration | newLength, |
bool | preserveSync | ||
) |
Sets the length of the clip.
newLength | The length in seconds |
preserveSync | Whether the source material position should be kept static in relation to the Edit's timeline. |
void tracktion::engine::Clip::setEnd | ( | TimePosition | newEnd, |
bool | preserveSync | ||
) |
Sets the end of the clip.
newEnd | The end time in seconds |
preserveSync | Whether the source material position should be kept static in relation to the Edit's timeline. |
void tracktion::engine::Clip::setOffset | ( | TimeDuration | newOffset | ) |
Sets the offset of the clip, i.e.
how much the clip's content should be shifted within the clip boundary.
newOffset | The offset in seconds |
Trims away any part of the clip that overlaps this region.
void tracktion::engine::Clip::removeFromParent | ( | ) |
Removes this clip from the parent track or container clip.
Moves the clip to a new parent (if possible).
|
noexcept |
Sets a speed ratio i.e.
how quickly the clip plays back.
Reimplemented in tracktion::engine::AudioClipBase.
|
virtual |
stretches and scales this clip relative to a fixed point in the edit.
pivotTimeInEdit | The time to keep fixed |
factor | The scale factor |
Reimplemented in tracktion::engine::MidiClip.
|
overridevirtual |
Returns true if the clip is part of a group.
Reimplemented from tracktion::engine::TrackItem.
References groupID.
|
overridevirtual |
Returns the parent TrackItem if part of a group.
Reimplemented from tracktion::engine::TrackItem.
void tracktion::engine::Clip::setGroup | ( | EditItemID | newGroupID | ) |
Sets the clip to be part of a group.
|
noexcept |
Returns the ID of the group.
References groupID.
CollectionClip * tracktion::engine::Clip::getGroupClip | ( | ) | const |
Returns this as a CollectionClip if it is one.
bool tracktion::engine::Clip::isLinked | ( | ) | const |
Returns true if this clip is linked with any others.
References linkID.
void tracktion::engine::Clip::setLinkGroupID | ( | juce::String | newLinkID | ) |
Sets the link ID to link this clip with others.
References linkID.
juce::String tracktion::engine::Clip::getLinkGroupID | ( | ) | const |
Returns the link ID of this clip.
References linkID.
ClipOwner * tracktion::engine::Clip::getParent | ( | ) | const |
Returns the parent ClipOwner this clip is on.
ClipTrack * tracktion::engine::Clip::getClipTrack | ( | ) | const |
Returns the parent ClipTrack this clip is on (if any).
|
overridevirtual |
Returns the parent Track this clip is on (if any).
Implements tracktion::engine::TrackItem.
ClipSlot * tracktion::engine::Clip::getClipSlot | ( | ) | const |
Returns the parent ClipSlot this clip is on (if any).
|
virtual |
Returns the colour property of this clip.
Reimplemented in tracktion::engine::ChordClip, and tracktion::engine::MarkerClip.
void tracktion::engine::Clip::setColour | ( | juce::Colour | col | ) |
Sets the colour property of this clip.
References colour.
|
virtual |
Removes the given plugin from the clip if the clip supports plugins.
|
virtual |
Adds a plugin to the clip.
Reimplemented in tracktion::engine::AudioClipBase.
|
virtual |
Returns all the plugins on the clip.
Reimplemented in tracktion::engine::AudioClipBase.
Sends an update to all plugins mirroing the one passed in.
Reimplemented in tracktion::engine::AudioClipBase.
|
virtual |
Returns the PluginList for this clip if it has one.
Reimplemented in tracktion::engine::AudioClipBase.
|
pure virtual |
Returns the default colour for this clip.
Implemented in tracktion::engine::ArrangerClip, tracktion::engine::AudioClipBase, tracktion::engine::ChordClip, tracktion::engine::MarkerClip, tracktion::engine::MidiClip, and tracktion::engine::StepClip.
Clears any takes this clip has.
Reimplemented in tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
Returns true if this clip has any takes.
Reimplemented in tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
|
virtual |
Returns the descriptions of any takes.
Reimplemented in tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
Sets a given take index to be the current take.
Reimplemented in tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
Returns the current take index.
Reimplemented in tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
Referenced by tracktion::engine::CompManager::getActiveTakeIndex().
Returns the total number of takes.
includeComps | Whether comps should be included in the count |
Reimplemented in tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
Returns true if the current take is a comp.
Reimplemented in tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
Sets whether the clip should be showing takes.
References showingTakes.
Returns true if the clip is showing takes.
References showingTakes.
|
virtual |
Attempts to unpack the takes to new clips.
toNewTracks | If true this will create new tracks for the new clips, otherwise they'll be placed on existing tracks |
Reimplemented in tracktion::engine::MidiClip, and tracktion::engine::WaveAudioClip.
Clones the given clip to this clip.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::ContainerClip, tracktion::engine::EditClip, tracktion::engine::MidiClip, tracktion::engine::StepClip, and tracktion::engine::WaveAudioClip.
void tracktion::engine::Clip::updateLinkedClips | ( | ) |
Triggers a call to cloneFrom for all clips with the same linkID.
|
virtual |
Returns the PatternGenerator for this clip if it has one.
Reimplemented in tracktion::engine::AudioClipBase, tracktion::engine::ChordClip, and tracktion::engine::MidiClip.
juce::ListenerList< Listener > & tracktion::engine::Clip::getListeners | ( | ) |
Returns the listener list so Nodes can manually call them.
References listeners.
|
overridevirtual |
Reimplemented from tracktion::engine::Selectable.
Reimplemented in tracktion::engine::EditClip.
juce::UndoManager * tracktion::engine::Clip::getUndoManager | ( | ) | const |
Returns the UndoManager.
. Not intended for public use!
Reimplemented in tracktion::engine::AudioClipBase.
Sets a new source file for this clip.
|
protectedvirtual |
Returns the mark points relative to the start of the clip, rescaled to the current speed.
Reimplemented in tracktion::engine::AudioClipBase.
|
overrideprotected |
|
overrideprotected |
juce::CachedValue<FollowActionDurationType> tracktion::engine::Clip::followActionDurationType |
The type of duration to use for when to trigger the follow action.
juce::CachedValue<BeatDuration> tracktion::engine::Clip::followActionBeats |
Determines the time for which a launched clip will play before a follow action is taken.
juce::CachedValue<double> tracktion::engine::Clip::followActionNumLoops |
Determines the number of loops for which a launched clip will play before a follow action is taken.
juce::ValueTree tracktion::engine::Clip::state |
The ValueTree of the Clip state.
juce::CachedValue<juce::Colour> tracktion::engine::Clip::colour |
The colour property.
Referenced by setColour().
juce::CachedValue<bool> tracktion::engine::Clip::disabled |
Whether the Clip is disabled or not.
Changed to disabled clips won't rebuild the audio graph and they won't get added to playback graph.
|
protected |
Referenced by getName().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by getSpeedRatio().
|
protected |
Referenced by getSourceFileReference().
|
protected |
Referenced by getGroupID(), and isGrouped().
|
protected |
Referenced by getLinkGroupID(), isLinked(), and setLinkGroupID().
|
protected |
Referenced by getCurrentSourceFile().
|
protected |
|
protected |
Referenced by isShowingTakes(), and setShowingTakes().
|
protected |
|
protected |
|
protected |
Referenced by getListeners().