TracktionEngine
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
tracktion::engine::MidiClip Class Reference
Inheritance diagram for tracktion::engine::MidiClip:

Classes

struct  ScopedEventsList
 Temporarily limits the notes to use. More...
 

Public Types

enum class  LoopedSequenceType : int { loopRangeDefinesAllRepetitions = 0 , loopRangeDefinesSubsequentRepetitions = 1 }
 
using Ptr = juce::ReferenceCountedObjectPtr< MidiClip >
 
- Public Types inherited from tracktion::engine::Clip
enum  SyncType { syncBarsBeats = 0 , syncAbsolute }
 Determines the clip sync type. More...
 
using Ptr = juce::ReferenceCountedObjectPtr< Clip >
 
using Array = juce::ReferenceCountedArray< Clip >
 
- Public Types inherited from tracktion::engine::TrackItem
enum class  Type {
  unknown , wave , midi , edit ,
  step , marker , pitch , timeSig ,
  collection , video , recording , chord ,
  arranger , container
}
 Defines the types of item that can live on Track[s]. More...
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 

Public Member Functions

 MidiClip ()=delete
 
 MidiClip (const juce::ValueTree &, EditItemID, ClipOwner &)
 
 ~MidiClip () override
 
void cloneFrom (Clip *) override
 Clones the given clip to this clip. More...
 
AudioTrackgetAudioTrack () const
 
MidiListgetSequence () const noexcept
 
MidiListgetSequenceLooped ()
 
std::unique_ptr< MidiListcreateSequenceLooped (MidiList &sourceSequence)
 
const SelectedMidiEventsgetSelectedEvents () const
 
void setUsesProxy (bool canUseProxy) noexcept
 Can be used to disable proxy sequence generation for this clip. More...
 
bool canUseProxy () const noexcept
 Retuns true if this clip can use a proxy sequence. More...
 
void scaleVerticallyToFit ()
 
bool hasValidSequence () const noexcept
 
MidiChannel getMidiChannel () const
 
void setMidiChannel (MidiChannel newChannel)
 
void setMPEMode (bool shouldUseMPE)
 Sets whether the clip should send MPE MIDI rather than single channel. More...
 
bool getMPEMode () const noexcept
 
bool isRhythm () const noexcept
 Returns true if this clip represents a rhythm instrument (e.g. More...
 
QuantisationTypegetQuantisation () const noexcept
 
void setQuantisation (const QuantisationType &newType)
 
juce::String getGrooveTemplate () const noexcept
 
void setGrooveTemplate (const juce::String &templateName)
 
bool usesGrooveStrength () const
 
float getGrooveStrength () const
 
void setGrooveStrength (float g)
 
void mergeInMidiSequence (juce::MidiMessageSequence &, MidiList::NoteAutomationType)
 
void addTake (juce::MidiMessageSequence &, MidiList::NoteAutomationType)
 
void extendStart (TimePosition newStartTime)
 This will extend the start time backwards, moving the notes along if this takes the offset below 0.0. More...
 
void trimBeyondEnds (bool beyondStart, bool beyondEnd, juce::UndoManager *)
 
void legatoNote (MidiNote &note, const juce::Array< MidiNote * > &notesToUse, BeatPosition maxEndBeat, juce::UndoManager &)
 Lengthens or shortens a note to match the start of the next note in the given array. More...
 
float getVolumeDb () const
 
void setVolumeDb (float v)
 
bool isSendingBankChanges () const noexcept
 
void setSendingBankChanges (bool sendBank)
 
bool isMuted () const override
 Returns true if the clip is muted. More...
 
void setMuted (bool m) override
 Mutes or unmutes the clip. More...
 
LiveClipLevel getLiveClipLevel ()
 
void initialise () override
 Initialises the Clip. More...
 
bool isMidi () const override
 Returns true if this is a MidiClip. More...
 
void rescale (TimePosition pivotTimeInEdit, double factor) override
 stretches and scales this clip relative to a fixed point in the edit. More...
 
bool canBeAddedTo (ClipOwner &) override
 Tests whether this clip can go on the given parent. More...
 
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are. More...
 
juce::Colour getDefaultColour () const override
 Returns the default colour for this clip. More...
 
void clearTakes () override
 Clears any takes this clip has. More...
 
bool hasAnyTakes () const override
 Returns true if this clip has any takes. More...
 
int getNumTakes (bool includeComps) override
 Returns the total number of takes. More...
 
juce::StringArray getTakeDescriptions () const override
 Returns the descriptions of any takes. More...
 
void setCurrentTake (int takeIndex) override
 Sets a given take index to be the current take. More...
 
int getCurrentTake () const override
 Returns the current take index. More...
 
bool isCurrentTakeComp () override
 Returns true if the current take is a comp. More...
 
void deleteAllUnusedTakesConfirmingWithUser ()
 
Clip::Array unpackTakes (bool toNewTracks) override
 Attempts to unpack the takes to new clips. More...
 
MidiListgetTakeSequence (int takeIndex) const
 
bool canLoop () const override
 Returns true if this clip is capable of looping. More...
 
bool isLooping () const override
 Returns true if this clip is currently looping. More...
 
bool beatBasedLooping () const override
 Returns true if this clip's looping is based on beats or false if absolute time. More...
 
void setNumberOfLoops (int) override
 Sets the clip looping a number of times. More...
 
void disableLooping () override
 Disables all looping. More...
 
void setLoopRange (TimeRange) override
 Sets the loop range the clip should use in seconds. More...
 
void setLoopRangeBeats (BeatRange) override
 Sets the loop range the clip should use in beats. More...
 
BeatPosition getLoopStartBeats () const override
 Returns the beat position of the loop start point. More...
 
BeatDuration getLoopLengthBeats () const override
 Returns the length of loop in beats. More...
 
TimePosition getLoopStart () const override
 Returns the start time of the loop start point. More...
 
TimeDuration getLoopLength () const override
 Returns the length of loop in seconds. More...
 
MidiCompManagergetCompManager ()
 
PatternGeneratorgetPatternGenerator () override
 Returns the PatternGenerator for this clip if it has one. More...
 
void pitchTempoTrackChanged () override
 Called when there are pitch or tempo changes made which might require clips to adjust timing information. More...
 
- Public Member Functions inherited from tracktion::engine::Clip
 Clip (const juce::ValueTree &, ClipOwner &, EditItemID, Type)
 Creates a clip of a given type from a ValueTree state. More...
 
 ~Clip () override
 Destructor. More...
 
virtual void flushStateToValueTree ()
 Can be overridden to ensure any state (e.g. More...
 
virtual void sourceMediaChanged ()
 Called when the source media file reference (attribute "source") has changed - i.e. More...
 
virtual juce::String getName () const override
 Returns the name of the clip. More...
 
void setName (const juce::String &newName)
 Sets a new name for a clip. More...
 
virtual bool usesSourceFile () const
 True if it references a source file - i.e. More...
 
SourceFileReferencegetSourceFileReference ()
 Returns the SourceFileReference of the Clip. More...
 
juce::File getCurrentSourceFile () const
 Returns the current source file, this is different to the SourceFileReference as it could be a temporary comp file, clipFX, reverse render etc. More...
 
juce::Array< ReferencedItemgetReferencedItems () override
 Returns an array of any ReferencedItem[s] e.g. More...
 
void reassignReferencedItem (const ReferencedItem &, ProjectItemID, double) override
 Should be implemented to change the underlying source to a new ProjectItemID. More...
 
ClipPosition getPosition () const override
 Returns the ClipPosition on the parent Track. More...
 
BeatPosition getContentBeatAtTime (TimePosition) const
 Returns the beat number (with offset) at the given time. More...
 
TimePosition getTimeOfContentBeat (BeatPosition) const
 Returns time of a beat number. More...
 
virtual TimeDuration getMaximumLength ()
 Returns the maximum length this clip can have. More...
 
virtual juce::Array< TimePosition > getInterestingTimes ()
 Returns times for snapping to, relative to the Edit. More...
 
TimePosition getSpottingPoint () const
 Returns the first marked time in the source file which can be used for syncronising newly added clips. More...
 
TimeRange getLoopRange () const
 Returns the loop range in seconds. More...
 
BeatRange getLoopRangeBeats () const
 Returns the loop range in beats. More...
 
virtual void setSyncType (SyncType sync)
 Sets the sync type for the clip. More...
 
SyncType getSyncType () const
 Returns the sync type clip is using. More...
 
void setPosition (ClipPosition newPosition)
 Sets the position of the clip. More...
 
void setStart (TimePosition newStart, bool preserveSync, bool keepLength)
 Sets the start time of the clip. More...
 
void setLength (TimeDuration newLength, bool preserveSync)
 Sets the length of the clip. More...
 
void setEnd (TimePosition newEnd, bool preserveSync)
 Sets the end of the clip. More...
 
void setOffset (TimeDuration newOffset)
 Sets the offset of the clip, i.e. More...
 
void trimAwayOverlap (TimeRange editRangeToTrim)
 Trims away any part of the clip that overlaps this region. More...
 
void removeFromParent ()
 Removes this clip from the parent track or container clip. More...
 
bool moveTo (ClipOwner &)
 Moves the clip to a new parent (if possible). More...
 
double getSpeedRatio () const noexcept
 Returns the speed ratio i.e. More...
 
virtual void setSpeedRatio (double)
 Sets a speed ratio i.e. More...
 
bool isGrouped () const override
 Returns true if the clip is part of a group. More...
 
TrackItemgetGroupParent () const override
 Returns the parent TrackItem if part of a group. More...
 
void setGroup (EditItemID newGroupID)
 Sets the clip to be part of a group. More...
 
EditItemID getGroupID () const noexcept
 Returns the ID of the group. More...
 
CollectionClipgetGroupClip () const
 Returns this as a CollectionClip if it is one. More...
 
bool isLinked () const
 Returns true if this clip is linked with any others. More...
 
void setLinkGroupID (juce::String newLinkID)
 Sets the link ID to link this clip with others. More...
 
juce::String getLinkGroupID () const
 Returns the link ID of this clip. More...
 
ClipOwnergetParent () const
 Returns the parent ClipOwner this clip is on. More...
 
ClipTrackgetClipTrack () const
 Returns the parent ClipTrack this clip is on (if any). More...
 
TrackgetTrack () const override
 Returns the parent Track this clip is on (if any). More...
 
virtual juce::Colour getColour () const
 Returns the colour property of this clip. More...
 
void setColour (juce::Colour col)
 Sets the colour property of this clip. More...
 
virtual void removePlugin (const Plugin::Ptr &)
 Removes the given plugin from the clip if the clip supports plugins. More...
 
virtual bool addClipPlugin (const Plugin::Ptr &, SelectionManager &)
 Adds a plugin to the clip. More...
 
virtual Plugin::Array getAllPlugins ()
 Returns all the plugins on the clip. More...
 
virtual void sendMirrorUpdateToAllPlugins (Plugin &) const
 Sends an update to all plugins mirroing the one passed in. More...
 
virtual PluginListgetPluginList ()
 Returns the PluginList for this clip if it has one. More...
 
virtual void setShowingTakes (bool shouldShow)
 Sets whether the clip should be showing takes. More...
 
virtual bool isShowingTakes () const
 Returns true if the clip is showing takes. More...
 
void updateLinkedClips ()
 Triggers a call to cloneFrom for all clips with the same linkID. More...
 
void addListener (Listener *)
 Adds a Listener. More...
 
void removeListener (Listener *)
 Removes a Listener. More...
 
juce::ListenerList< Listener > & getListeners ()
 Returns the listener list so Nodes can manually call them. More...
 
void changed () override
 
juce::UndoManager * getUndoManager () const
 Returns the UndoManager. More...
 
virtual void setParent (ClipOwner *)
 
- Public Member Functions inherited from tracktion::engine::TrackItem
 TrackItem (Edit &, EditItemID, Type)
 Creates a TrackItem with an ID and type. More...
 
 ~TrackItem ()
 Destructor. More...
 
TimeRange getEditTimeRange () const
 Returns the time range of this item. More...
 
BeatRange getEditBeatRange () const
 Returns the beat range of this item. More...
 
BeatPosition getStartBeat () const
 Returns the start beat in the Edit of this item. More...
 
BeatPosition getContentStartBeat () const
 Returns the start beat of the content in the Edit of this item. More...
 
BeatPosition getEndBeat () const
 Returns the end beat in the Edit of this item. More...
 
BeatDuration getLengthInBeats () const
 Returns the duration in beats the of this item. More...
 
TimePosition getTimeOfRelativeBeat (BeatDuration) const
 Returns an Edit time point for a given number of beats from the start of this item. More...
 
BeatPosition getBeatOfRelativeTime (TimeDuration) const
 Returns an Edit beat point for a given number of seconds from the start of this item. More...
 
BeatDuration getOffsetInBeats () const
 Returns an the offset of this item in beats. More...
 
EditItemID getTrackID () const
 Returns the ID of the Track this item lives on. More...
 
- Public Member Functions inherited from tracktion::engine::EditItem
 EditItem (EditItemID, Edit &)
 
virtual ~EditItem ()=default
 
- Public Member Functions inherited from tracktion::engine::Selectable
 Selectable ()
 
virtual ~Selectable ()
 
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected. More...
 
virtual void selectableAboutToBeDeleted ()
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. More...
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions. More...
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 
- Public Member Functions inherited from tracktion::engine::Exportable
virtual ~Exportable ()=default
 

Public Attributes

juce::CachedValue< LoopedSequenceTypeloopedSequenceType
 
- Public Attributes inherited from tracktion::engine::Clip
juce::ValueTree state
 The ValueTree of the Clip state. More...
 
juce::CachedValue< juce::Colour > colour
 The colour property. More...
 
- Public Attributes inherited from tracktion::engine::TrackItem
const Type type
 The type of this item. More...
 
- Public Attributes inherited from tracktion::engine::EditItem
Editedit
 
const EditItemID itemID
 Every EditItem has an ID which is unique within the edit. More...
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 

Protected Member Functions

void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &) override
 
void valueTreeChildRemoved (juce::ValueTree &, juce::ValueTree &, int) override
 
- Protected Member Functions inherited from tracktion::engine::Clip
void setCurrentSourceFile (const juce::File &)
 Sets a new source file for this clip. More...
 
virtual juce::Array< TimePosition > getRescaledMarkPoints () const
 Returns the mark points relative to the start of the clip, rescaled to the current speed. More...
 
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeParentChanged (juce::ValueTree &) override
 

Additional Inherited Members

- Static Public Member Functions inherited from tracktion::engine::Clip
static bool isClipState (const juce::ValueTree &)
 Checks whether a ValueTree is some kind of clip state. More...
 
static bool isClipState (const juce::Identifier &)
 Checks whether a ValueTree type is some kind of clip state. More...
 
static Ptr createClipForState (const juce::ValueTree &, ClipOwner &targetParent)
 Creates a clip for a given ValueTree representation. More...
 
- Static Public Member Functions inherited from tracktion::engine::TrackItem
static const char * typeToString (Type)
 Returns the string version of a TrackItem::Type. More...
 
static juce::Identifier clipTypeToXMLType (Type)
 Returns an Identifier version of a TrackItem::Type. More...
 
static TrackItem::Type xmlTagToType (juce::StringRef)
 Returns the TrackItem::Type of a type string. More...
 
static TrackItem::Type stringToType (const juce::String &)
 Returns the TrackItem::Type of a type string. More...
 
static juce::String getSuggestedNameForNewItem (Type)
 Returns a text string for a new clip of the given type. More...
 
template<typename ArrayType >
static void sortByTime (ArrayType &items)
 Helper function to sort an array of TrackItem[s] by their start time. More...
 
template<typename ArrayType >
static void stableSortByTime (ArrayType &items)
 Helper function to sort an array of TrackItem[s] by their start time without changing the order of items at the same time. More...
 
- Static Public Member Functions inherited from tracktion::engine::Selectable
static void initialise ()
 
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted. More...
 
- Static Public Member Functions inherited from tracktion::engine::Exportable
static juce::Array< Exportable * > addAllExportables (Edit &)
 Returns all the Exportables contained in an Edit. More...
 
- Protected Attributes inherited from tracktion::engine::Clip
bool isInitialised = false
 
bool cloneInProgress = false
 
juce::CachedValue< juce::String > clipName
 
ClipOwnerparent = nullptr
 
juce::CachedValue< TimePosition > clipStart
 
juce::CachedValue< TimeDuration > length
 
juce::CachedValue< TimeDuration > offset
 
juce::CachedValue< double > speedRatio
 
SourceFileReference sourceFileReference
 
juce::CachedValue< EditItemIDgroupID
 
juce::CachedValue< juce::String > linkID
 
juce::File currentSourceFile
 
juce::CachedValue< SyncTypesyncType
 
juce::CachedValue< bool > showingTakes
 
std::unique_ptr< PatternGeneratorpatternGenerator
 
AsyncCaller updateLinkedClipsCaller
 
juce::ListenerList< Listenerlisteners
 

Member Typedef Documentation

◆ Ptr

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

Member Enumeration Documentation

◆ LoopedSequenceType

Enumerator
loopRangeDefinesAllRepetitions 

The looped sequence is the same for all repetitions including the first.

loopRangeDefinesSubsequentRepetitions 

The first section is the whole sequence, subsequent repitions are determined by the loop range.

Constructor & Destructor Documentation

◆ MidiClip() [1/2]

tracktion::engine::MidiClip::MidiClip ( )
delete

◆ MidiClip() [2/2]

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

◆ ~MidiClip()

tracktion::engine::MidiClip::~MidiClip ( )
override

Member Function Documentation

◆ cloneFrom()

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

Clones the given clip to this clip.

Reimplemented from tracktion::engine::Clip.

◆ getAudioTrack()

AudioTrack* tracktion::engine::MidiClip::getAudioTrack ( ) const

◆ getSequence()

MidiList& tracktion::engine::MidiClip::getSequence ( ) const
noexcept

Referenced by getMidiChannel(), and setMidiChannel().

◆ getSequenceLooped()

MidiList& tracktion::engine::MidiClip::getSequenceLooped ( )

◆ createSequenceLooped()

std::unique_ptr<MidiList> tracktion::engine::MidiClip::createSequenceLooped ( MidiList sourceSequence)

◆ getSelectedEvents()

const SelectedMidiEvents* tracktion::engine::MidiClip::getSelectedEvents ( ) const

◆ setUsesProxy()

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

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

N.B. If disabled, the audio engine will perform quantisation and groove adjustments in real time which may use more CPU.

References canUseProxy().

◆ canUseProxy()

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

Retuns true if this clip can use a proxy sequence.

Referenced by setUsesProxy().

◆ scaleVerticallyToFit()

void tracktion::engine::MidiClip::scaleVerticallyToFit ( )

◆ hasValidSequence()

bool tracktion::engine::MidiClip::hasValidSequence ( ) const
noexcept

Referenced by getMidiChannel().

◆ getMidiChannel()

MidiChannel tracktion::engine::MidiClip::getMidiChannel ( ) const

◆ setMidiChannel()

void tracktion::engine::MidiClip::setMidiChannel ( MidiChannel  newChannel)

◆ setMPEMode()

void tracktion::engine::MidiClip::setMPEMode ( bool  shouldUseMPE)

Sets whether the clip should send MPE MIDI rather than single channel.

◆ getMPEMode()

bool tracktion::engine::MidiClip::getMPEMode ( ) const
noexcept

◆ isRhythm()

bool tracktion::engine::MidiClip::isRhythm ( ) const
noexcept

Returns true if this clip represents a rhythm instrument (e.g.

MIDI channel 10)

References tracktion::engine::MidiChannel::getChannelNumber(), and getMidiChannel().

◆ getQuantisation()

QuantisationType& tracktion::engine::MidiClip::getQuantisation ( ) const
noexcept

◆ setQuantisation()

void tracktion::engine::MidiClip::setQuantisation ( const QuantisationType newType)

◆ getGrooveTemplate()

juce::String tracktion::engine::MidiClip::getGrooveTemplate ( ) const
noexcept

◆ setGrooveTemplate()

void tracktion::engine::MidiClip::setGrooveTemplate ( const juce::String &  templateName)

◆ usesGrooveStrength()

bool tracktion::engine::MidiClip::usesGrooveStrength ( ) const

◆ getGrooveStrength()

float tracktion::engine::MidiClip::getGrooveStrength ( ) const

◆ setGrooveStrength()

void tracktion::engine::MidiClip::setGrooveStrength ( float  g)

◆ mergeInMidiSequence()

void tracktion::engine::MidiClip::mergeInMidiSequence ( juce::MidiMessageSequence &  ,
MidiList::NoteAutomationType   
)

◆ addTake()

void tracktion::engine::MidiClip::addTake ( juce::MidiMessageSequence &  ,
MidiList::NoteAutomationType   
)

◆ extendStart()

void tracktion::engine::MidiClip::extendStart ( TimePosition  newStartTime)

This will extend the start time backwards, moving the notes along if this takes the offset below 0.0.

◆ trimBeyondEnds()

void tracktion::engine::MidiClip::trimBeyondEnds ( bool  beyondStart,
bool  beyondEnd,
juce::UndoManager *   
)

◆ legatoNote()

void tracktion::engine::MidiClip::legatoNote ( MidiNote note,
const juce::Array< MidiNote * > &  notesToUse,
BeatPosition  maxEndBeat,
juce::UndoManager &   
)

Lengthens or shortens a note to match the start of the next note in the given array.

If the note is the last in the sequence, it will use the maxEndBeat as its end.

Note
notesToUse must be in ascending note start order.

◆ getVolumeDb()

float tracktion::engine::MidiClip::getVolumeDb ( ) const

◆ setVolumeDb()

void tracktion::engine::MidiClip::setVolumeDb ( float  v)

◆ isSendingBankChanges()

bool tracktion::engine::MidiClip::isSendingBankChanges ( ) const
noexcept

◆ setSendingBankChanges()

void tracktion::engine::MidiClip::setSendingBankChanges ( bool  sendBank)

◆ isMuted()

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

Returns true if the clip is muted.

Implements tracktion::engine::Clip.

◆ setMuted()

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

Mutes or unmutes the clip.

Reimplemented from tracktion::engine::Clip.

◆ getLiveClipLevel()

LiveClipLevel tracktion::engine::MidiClip::getLiveClipLevel ( )

◆ initialise()

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

Initialises the Clip.

Called once automatically after construction.

Reimplemented from tracktion::engine::Clip.

◆ isMidi()

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

Returns true if this is a MidiClip.

Implements tracktion::engine::Clip.

◆ rescale()

void tracktion::engine::MidiClip::rescale ( TimePosition  pivotTimeInEdit,
double  factor 
)
overridevirtual

stretches and scales this clip relative to a fixed point in the edit.

Parameters
pivotTimeInEditThe time to keep fixed
factorThe scale factor

Reimplemented from tracktion::engine::Clip.

◆ canBeAddedTo()

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

Tests whether this clip can go on the given parent.

Implements tracktion::engine::Clip.

◆ getSelectableDescription()

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

Subclasses must return a description of what they are.

Implements tracktion::engine::Selectable.

◆ getDefaultColour()

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

Returns the default colour for this clip.

Implements tracktion::engine::Clip.

◆ clearTakes()

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

Clears any takes this clip has.

Reimplemented from tracktion::engine::Clip.

◆ hasAnyTakes()

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

Returns true if this clip has any takes.

Reimplemented from tracktion::engine::Clip.

◆ getNumTakes()

int tracktion::engine::MidiClip::getNumTakes ( bool  )
overridevirtual

Returns the total number of takes.

Parameters
includeCompsWhether comps should be included in the count

Reimplemented from tracktion::engine::Clip.

◆ getTakeDescriptions()

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

Returns the descriptions of any takes.

Reimplemented from tracktion::engine::Clip.

◆ setCurrentTake()

void tracktion::engine::MidiClip::setCurrentTake ( int  )
overridevirtual

Sets a given take index to be the current take.

Reimplemented from tracktion::engine::Clip.

◆ getCurrentTake()

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

Returns the current take index.

Reimplemented from tracktion::engine::Clip.

◆ isCurrentTakeComp()

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

Returns true if the current take is a comp.

Reimplemented from tracktion::engine::Clip.

◆ deleteAllUnusedTakesConfirmingWithUser()

void tracktion::engine::MidiClip::deleteAllUnusedTakesConfirmingWithUser ( )

◆ unpackTakes()

Clip::Array tracktion::engine::MidiClip::unpackTakes ( bool  )
overridevirtual

Attempts to unpack the takes to new clips.

Parameters
toNewTracksIf true this will create new tracks for the new clips, otherwise they'll be placed on existing tracks

Reimplemented from tracktion::engine::Clip.

◆ getTakeSequence()

MidiList* tracktion::engine::MidiClip::getTakeSequence ( int  takeIndex) const

◆ canLoop()

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

Returns true if this clip is capable of looping.

Reimplemented from tracktion::engine::Clip.

◆ isLooping()

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

Returns true if this clip is currently looping.

Reimplemented from tracktion::engine::Clip.

Referenced by beatBasedLooping().

◆ beatBasedLooping()

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

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

Reimplemented from tracktion::engine::Clip.

References isLooping().

◆ setNumberOfLoops()

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

Sets the clip looping a number of times.

Reimplemented from tracktion::engine::Clip.

◆ disableLooping()

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

Disables all looping.

Reimplemented from tracktion::engine::Clip.

◆ setLoopRange()

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

Sets the loop range the clip should use in seconds.

Reimplemented from tracktion::engine::Clip.

◆ setLoopRangeBeats()

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

Sets the loop range the clip should use in beats.

Reimplemented from tracktion::engine::Clip.

◆ getLoopStartBeats()

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

Returns the beat position of the loop start point.

Reimplemented from tracktion::engine::Clip.

◆ getLoopLengthBeats()

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

Returns the length of loop in beats.

Reimplemented from tracktion::engine::Clip.

◆ getLoopStart()

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

Returns the start time of the loop start point.

Reimplemented from tracktion::engine::Clip.

◆ getLoopLength()

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

Returns the length of loop in seconds.

Reimplemented from tracktion::engine::Clip.

◆ getCompManager()

MidiCompManager& tracktion::engine::MidiClip::getCompManager ( )

◆ getPatternGenerator()

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

Returns the PatternGenerator for this clip if it has one.

See also
MidiClip

Reimplemented from tracktion::engine::Clip.

◆ pitchTempoTrackChanged()

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

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

Reimplemented from tracktion::engine::Clip.

◆ valueTreePropertyChanged()

void tracktion::engine::MidiClip::valueTreePropertyChanged ( juce::ValueTree &  ,
const juce::Identifier &   
)
overrideprotected

◆ valueTreeChildAdded()

void tracktion::engine::MidiClip::valueTreeChildAdded ( juce::ValueTree &  ,
juce::ValueTree &   
)
overrideprotected

◆ valueTreeChildRemoved()

void tracktion::engine::MidiClip::valueTreeChildRemoved ( juce::ValueTree &  ,
juce::ValueTree &  ,
int   
)
overrideprotected

Member Data Documentation

◆ loopedSequenceType

juce::CachedValue<LoopedSequenceType> tracktion::engine::MidiClip::loopedSequenceType

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