TracktionEngine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
engine::MidiClip Class Reference

#include <tracktion_MidiClip.h>

Inheritance diagram for engine::MidiClip:

Public Types

enum class  LoopedSequenceType : int { loopRangeDefinesAllRepetitions = 0 , loopRangeDefinesSubsequentRepetitions = 1 }
 
using Ptr = juce::ReferenceCountedObjectPtr< MidiClip >
 
- Public Types inherited from engine::Clip
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 >
 
- Public Types inherited from 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 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.
 
AudioTrackgetAudioTrack () const
 
MidiListgetSequence () const noexcept
 
MidiListgetSequenceLooped ()
 
std::unique_ptr< MidiListcreateSequenceLooped (MidiList &sourceSequence)
 
void setUsesProxy (bool canUseProxy) noexcept
 Can be used to disable proxy sequence generation for this clip.
 
bool canUseProxy () const noexcept
 Retuns true if this clip can use a proxy sequence.
 
std::shared_ptr< LaunchHandlegetLaunchHandle () override
 
void setUsesGlobalLaunchQuatisation (bool useGlobal) override
 
bool usesGlobalLaunchQuatisation () override
 
LaunchQuantisationgetLaunchQuantisation () override
 
FollowActionsgetFollowActions () override
 
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.
 
bool getMPEMode () const noexcept
 
bool isRhythm () const noexcept
 Returns true if this clip represents a rhythm instrument (e.g.
 
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.
 
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.
 
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.
 
void setMuted (bool m) override
 Mutes or unmutes the clip.
 
LiveClipLevel getLiveClipLevel ()
 
void initialise () override
 Initialises the Clip.
 
bool isMidi () const override
 Returns true if this is a MidiClip.
 
void rescale (TimePosition pivotTimeInEdit, double factor) override
 stretches and scales this clip relative to a fixed point in the edit.
 
bool canBeAddedTo (ClipOwner &) override
 Tests whether this clip can go on the given parent.
 
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are.
 
juce::Colour getDefaultColour () const override
 Returns the default colour for this clip.
 
void clearTakes () override
 Clears any takes this clip has.
 
bool hasAnyTakes () const override
 Returns true if this clip has any takes.
 
int getNumTakes (bool includeComps) override
 Returns the total number of takes.
 
juce::StringArray getTakeDescriptions () const override
 Returns the descriptions of any takes.
 
void setCurrentTake (int takeIndex) override
 Sets a given take index to be the current take.
 
int getCurrentTake () const override
 Returns the current take index.
 
bool isCurrentTakeComp () override
 Returns true if the current take is a comp.
 
void deleteAllUnusedTakesConfirmingWithUser ()
 
Clip::Array unpackTakes (bool toNewTracks) override
 Attempts to unpack the takes to new clips.
 
MidiListgetTakeSequence (int takeIndex) const
 
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) override
 Sets the clip looping a number of times.
 
void disableLooping () override
 Disables all looping.
 
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.
 
BeatPosition getLoopStartBeats () const override
 Returns the beat position of the loop start point.
 
BeatDuration getLoopLengthBeats () const override
 Returns the length of loop in beats.
 
TimePosition getLoopStart () const override
 Returns the start time of the loop start point.
 
TimeDuration getLoopLength () const override
 Returns the length of loop in seconds.
 
MidiCompManagergetCompManager ()
 
PatternGeneratorgetPatternGenerator () override
 Returns the PatternGenerator for this clip if it has one.
 
void pitchTempoTrackChanged () override
 Called when there are pitch or tempo changes made which might require clips to adjust timing information.
 
- Public Member Functions inherited from 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 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 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 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 &, ProjectItemRef newRef, double newStartTime) override
 Should be implemented to change the underlying source to a new ProjectItemRef.
 
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 TimeDuration getHead () const
 Returns extra time before the clip start that needs processing (e.g., ARA head time).
 
virtual TimeDuration getTail () const
 Returns extra time after the clip end that needs processing (e.g., ARA tail time).
 
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 setSpeedRatio (double)
 Sets a speed ratio i.e.
 
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)
 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 PluginListgetPluginList ()
 Returns the PluginList for this clip if it has one.
 
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.
 
void updateLinkedClips ()
 Triggers a call to cloneFrom for all clips with the same linkID.
 
AutomationCurveListgetAutomationCurveList (bool createIfNoItems)
 Returns an AutomationCurveList if this clip type supports it.
 
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 *)
 
void updateAutomationCurveListDestinations ()
 
- Public Member Functions inherited from 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 engine::EditItem
 EditItem (EditItemID, Edit &)
 
 EditItem (Edit &, const juce::ValueTree &)
 
virtual ~EditItem ()=default
 
- Public Member Functions inherited from 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.
 
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 engine::Exportable
virtual ~Exportable ()=default
 

Public Attributes

juce::CachedValue< LoopedSequenceTypeloopedSequenceType
 
- Public Attributes inherited from 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::Colour > colour
 The colour property.
 
juce::CachedValue< booldisabled
 Whether the Clip is disabled or not.
 
- Public Attributes inherited from engine::TrackItem
const Type type
 The type of this item.
 
- Public Attributes inherited from engine::EditItem
Editedit
 
const EditItemID itemID
 Every EditItem has an ID which is unique within the edit.
 
- Public Attributes inherited from 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 engine::Clip
void setCurrentSourceFile (const juce::File &)
 Sets a new source file for this clip.
 
virtual juce::Array< TimePositiongetRescaledMarkPoints () 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 valueTreeChildRemoved (juce::ValueTree &, juce::ValueTree &, int) override
 
void valueTreeParentChanged (juce::ValueTree &) override
 

Additional Inherited Members

- Static Public Member Functions inherited from 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 engine::TrackItem
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 Public Member Functions inherited from engine::Selectable
static void initialise ()
 
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted.
 
- Static Public Member Functions inherited from engine::Exportable
static juce::Array< Exportable * > addAllExportables (Edit &)
 Returns all the Exportables contained in an Edit.
 
- Protected Attributes inherited from engine::Clip
bool isInitialised = false
 
bool cloneInProgress = false
 
juce::CachedValue< juce::String > clipName
 
ClipOwnerparent = nullptr
 
juce::CachedValue< TimePositionclipStart
 
juce::CachedValue< TimeDurationlength
 
juce::CachedValue< TimeDurationoffset
 
juce::CachedValue< doublespeedRatio
 
SourceFileReference sourceFileReference
 
juce::CachedValue< EditItemIDgroupID
 
juce::CachedValue< juce::String > linkID
 
juce::File currentSourceFile
 
juce::CachedValue< SyncTypesyncType
 
juce::CachedValue< boolshowingTakes
 
std::unique_ptr< PatternGeneratorpatternGenerator
 
std::unique_ptr< AutomationCurveListautomationCurveList
 
AsyncCaller updateLinkedClipsCaller
 
juce::ListenerList< Listenerlisteners
 

Member Typedef Documentation

◆ Ptr

using 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]

engine::MidiClip::MidiClip ( )
delete

◆ MidiClip() [2/2]

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

◆ ~MidiClip()

engine::MidiClip::~MidiClip ( )
override

Member Function Documentation

◆ cloneFrom()

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

Clones the given clip to this clip.

Reimplemented from engine::Clip.

◆ getAudioTrack()

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

◆ getSequence()

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

◆ getSequenceLooped()

MidiList & engine::MidiClip::getSequenceLooped ( )

◆ createSequenceLooped()

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

◆ setUsesProxy()

void 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.

◆ canUseProxy()

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

Retuns true if this clip can use a proxy sequence.

◆ getLaunchHandle()

std::shared_ptr< LaunchHandle > engine::MidiClip::getLaunchHandle ( )
overridevirtual

Reimplemented from engine::Clip.

◆ setUsesGlobalLaunchQuatisation()

void engine::MidiClip::setUsesGlobalLaunchQuatisation ( bool  useGlobal)
overridevirtual

Reimplemented from engine::Clip.

◆ usesGlobalLaunchQuatisation()

bool engine::MidiClip::usesGlobalLaunchQuatisation ( )
overridevirtual

Reimplemented from engine::Clip.

◆ getLaunchQuantisation()

LaunchQuantisation * engine::MidiClip::getLaunchQuantisation ( )
overridevirtual

Reimplemented from engine::Clip.

◆ getFollowActions()

FollowActions * engine::MidiClip::getFollowActions ( )
overridevirtual

Reimplemented from engine::Clip.

◆ scaleVerticallyToFit()

void engine::MidiClip::scaleVerticallyToFit ( )

◆ hasValidSequence()

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

◆ getMidiChannel()

MidiChannel engine::MidiClip::getMidiChannel ( ) const

◆ setMidiChannel()

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

◆ setMPEMode()

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

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

◆ getMPEMode()

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

◆ isRhythm()

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

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

MIDI channel 10)

◆ getQuantisation()

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

◆ setQuantisation()

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

◆ getGrooveTemplate()

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

◆ setGrooveTemplate()

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

◆ usesGrooveStrength()

bool engine::MidiClip::usesGrooveStrength ( ) const

◆ getGrooveStrength()

float engine::MidiClip::getGrooveStrength ( ) const

◆ setGrooveStrength()

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

◆ mergeInMidiSequence()

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

◆ addTake()

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

◆ extendStart()

void 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 engine::MidiClip::trimBeyondEnds ( bool  beyondStart,
bool  beyondEnd,
juce::UndoManager *   
)

◆ legatoNote()

void 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 engine::MidiClip::getVolumeDb ( ) const

◆ setVolumeDb()

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

◆ isSendingBankChanges()

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

◆ setSendingBankChanges()

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

◆ isMuted()

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

Returns true if the clip is muted.

Implements engine::Clip.

◆ setMuted()

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

Mutes or unmutes the clip.

Reimplemented from engine::Clip.

◆ getLiveClipLevel()

LiveClipLevel engine::MidiClip::getLiveClipLevel ( )

◆ initialise()

void engine::MidiClip::initialise ( )
overridevirtual

Initialises the Clip.

Called once automatically after construction.

Reimplemented from engine::Clip.

◆ isMidi()

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

Returns true if this is a MidiClip.

Implements engine::Clip.

◆ rescale()

void 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 engine::Clip.

◆ canBeAddedTo()

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

Tests whether this clip can go on the given parent.

Implements engine::Clip.

◆ getSelectableDescription()

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

Subclasses must return a description of what they are.

Implements engine::Selectable.

◆ getDefaultColour()

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

Returns the default colour for this clip.

Implements engine::Clip.

◆ clearTakes()

void engine::MidiClip::clearTakes ( )
overridevirtual

Clears any takes this clip has.

Reimplemented from engine::Clip.

◆ hasAnyTakes()

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

Returns true if this clip has any takes.

Reimplemented from engine::Clip.

◆ getNumTakes()

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

Returns the total number of takes.

Parameters
includeCompsWhether comps should be included in the count

Reimplemented from engine::Clip.

◆ getTakeDescriptions()

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

Returns the descriptions of any takes.

Reimplemented from engine::Clip.

◆ setCurrentTake()

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

Sets a given take index to be the current take.

Reimplemented from engine::Clip.

◆ getCurrentTake()

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

Returns the current take index.

Reimplemented from engine::Clip.

◆ isCurrentTakeComp()

bool engine::MidiClip::isCurrentTakeComp ( )
overridevirtual

Returns true if the current take is a comp.

Reimplemented from engine::Clip.

◆ deleteAllUnusedTakesConfirmingWithUser()

void engine::MidiClip::deleteAllUnusedTakesConfirmingWithUser ( )

◆ unpackTakes()

Clip::Array 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 engine::Clip.

◆ getTakeSequence()

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

◆ canLoop()

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

Returns true if this clip is capable of looping.

Reimplemented from engine::Clip.

◆ isLooping()

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

Returns true if this clip is currently looping.

Reimplemented from engine::Clip.

◆ beatBasedLooping()

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

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

Reimplemented from engine::Clip.

◆ setNumberOfLoops()

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

Sets the clip looping a number of times.

Reimplemented from engine::Clip.

◆ disableLooping()

void engine::MidiClip::disableLooping ( )
overridevirtual

Disables all looping.

Reimplemented from engine::Clip.

◆ setLoopRange()

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

Sets the loop range the clip should use in seconds.

Reimplemented from engine::Clip.

◆ setLoopRangeBeats()

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

Sets the loop range the clip should use in beats.

Reimplemented from engine::Clip.

◆ getLoopStartBeats()

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

Returns the beat position of the loop start point.

Reimplemented from engine::Clip.

◆ getLoopLengthBeats()

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

Returns the length of loop in beats.

Reimplemented from engine::Clip.

◆ getLoopStart()

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

Returns the start time of the loop start point.

Reimplemented from engine::Clip.

◆ getLoopLength()

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

Returns the length of loop in seconds.

Reimplemented from engine::Clip.

◆ getCompManager()

MidiCompManager & engine::MidiClip::getCompManager ( )

◆ getPatternGenerator()

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

Returns the PatternGenerator for this clip if it has one.

See also
MidiClip

Reimplemented from engine::Clip.

◆ pitchTempoTrackChanged()

void engine::MidiClip::pitchTempoTrackChanged ( )
overridevirtual

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

Reimplemented from engine::Clip.

◆ valueTreePropertyChanged()

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

◆ valueTreeChildAdded()

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

◆ valueTreeChildRemoved()

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

Member Data Documentation

◆ loopedSequenceType

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

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