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

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
tracktion::engine::MidiClip Class Reference
Inheritance diagram for tracktion::engine::MidiClip:
tracktion::engine::Clip tracktion::engine::TrackItem tracktion::engine::Exportable juce::ValueTree::Listener tracktion::engine::EditItem tracktion::engine::Selectable juce::ReferenceCountedObject

Classes

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

Public Types

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

Public Member Functions

 MidiClip (const juce::ValueTree &, EditItemID, ClipOwner &)
 
void cloneFrom (Clip *) override
 Clones the given clip to this clip.
 
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.
 
bool canUseProxy () const noexcept
 Retuns true if this clip can use a proxy sequence.
 
std::shared_ptr< LaunchHandlegetLaunchHandle () override
 Some clip types can be launched, if that's possible, this returns a handle to trigger starting/stopping the clip.
 
void setUsesGlobalLaunchQuatisation (bool useGlobal) override
 Some clip types can be launched, if that's possible, this sets whether the clip's quantisation or the global quantisation should be used.
 
bool usesGlobalLaunchQuatisation () override
 Some clip types can be launched, if that's possible, this returns whether the clip's quantisation or the global quantisation should be used.
 
LaunchQuantisationgetLaunchQuantisation () override
 Some clip types can be launched, if that's possible, this returns a quantisation that can be used for this clip.
 
FollowActions * getFollowActions () override
 Some clip types can be launched, if that's possible, this can be used to determine the action to perform after a clip has played.
 
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 tracktion::engine::Clip
 Clip (const juce::ValueTree &, ClipOwner &, EditItemID, Type)
 Creates a clip of a given type from a ValueTree state.
 
 ~Clip () override
 Destructor.
 
virtual void 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 &, ProjectItemID, double) override
 Should be implemented to change the underlying source to a new ProjectItemID.
 
ClipPosition getPosition () const override
 Returns the ClipPosition on the parent Track.
 
BeatPosition getContentBeatAtTime (TimePosition) const
 Returns the beat number (with offset) at the given time.
 
TimePosition getTimeOfContentBeat (BeatPosition) const
 Returns time of a beat number.
 
virtual TimeDuration getMaximumLength ()
 Returns the maximum length this clip can have.
 
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 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 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.
 
void addListener (Listener *)
 Adds a Listener.
 
void removeListener (Listener *)
 Removes a Listener.
 
juce::ListenerList< Listener > & getListeners ()
 Returns the listener list so Nodes can manually call them.
 
void changed () override
 This should be called to send a change notification to any SelectableListeners that are registered with this object.
 
juce::UndoManagergetUndoManager () const
 Returns the UndoManager.
 
virtual void setParent (ClipOwner *)
 
- Public Member Functions inherited from tracktion::engine::TrackItem
 TrackItem (Edit &, EditItemID, Type)
 Creates a TrackItem with an ID and type.
 
 ~TrackItem ()
 Destructor.
 
TimeRange getEditTimeRange () const
 Returns the time range of this item.
 
BeatRange getEditBeatRange () const
 Returns the beat range of this item.
 
BeatPosition getStartBeat () const
 Returns the start beat in the Edit of this item.
 
BeatPosition getContentStartBeat () const
 Returns the start beat of the content in the Edit of this item.
 
BeatPosition getEndBeat () const
 Returns the end beat in the Edit of this item.
 
BeatDuration getLengthInBeats () const
 Returns the duration in beats the of this item.
 
TimePosition getTimeOfRelativeBeat (BeatDuration) const
 Returns an Edit time point for a given number of beats from the start of this item.
 
BeatPosition getBeatOfRelativeTime (TimeDuration) const
 Returns an Edit beat point for a given number of seconds from the start of this item.
 
BeatDuration getOffsetInBeats () const
 Returns an the offset of this item in beats.
 
EditItemID getTrackID () const
 Returns the ID of the Track this item lives on.
 
- Public Member Functions inherited from tracktion::engine::EditItem
 EditItem (EditItemID, Edit &)
 
- Public Member Functions inherited from tracktion::engine::Selectable
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected.
 
virtual void selectableAboutToBeDeleted ()
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point.
 
void addListener (SelectableListener *)
 
void removeListener (SelectableListener *)
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions.
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 
- Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
 
void decReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 

Public Attributes

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

Protected Member Functions

void 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.
 
virtual juce::Array< TimePositiongetRescaledMarkPoints () const
 Returns the mark points relative to the start of the clip, rescaled to the current speed.
 
void valueTreeParentChanged (juce::ValueTree &) override
 
- Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
 
void resetReferenceCount () noexcept
 
- Protected Member Functions inherited from juce::ValueTree::Listener
virtual void valueTreeChildOrderChanged (ValueTree &parentTreeWhoseChildrenHaveMoved, int oldIndex, int newIndex)
 
virtual void valueTreeRedirected (ValueTree &treeWhichHasBeenChanged)
 

Friends

class MidiNote
 

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

Detailed Description

Definition at line 17 of file tracktion_MidiClip.h.

Member Typedef Documentation

◆ Ptr

Definition at line 25 of file tracktion_MidiClip.h.

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.

Definition at line 148 of file tracktion_MidiClip.h.

Constructor & Destructor Documentation

◆ MidiClip()

tracktion::engine::MidiClip::MidiClip ( const juce::ValueTree v,
EditItemID  id,
ClipOwner targetParent 
)

Definition at line 84 of file tracktion_MidiClip.cpp.

◆ ~MidiClip()

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

Definition at line 125 of file tracktion_MidiClip.cpp.

Member Function Documentation

◆ addTake()

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

Definition at line 451 of file tracktion_MidiClip.cpp.

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

Definition at line 138 of file tracktion_MidiClip.h.

◆ canBeAddedTo()

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

Tests whether this clip can go on the given parent.

Implements tracktion::engine::Clip.

Definition at line 682 of file tracktion_MidiClip.cpp.

◆ canLoop()

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

Returns true if this clip is capable of looping.

Reimplemented from tracktion::engine::Clip.

Definition at line 136 of file tracktion_MidiClip.h.

◆ canUseProxy()

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

Retuns true if this clip can use a proxy sequence.

Definition at line 46 of file tracktion_MidiClip.h.

◆ clearTakes()

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

Clears any takes this clip has.

Reimplemented from tracktion::engine::Clip.

Definition at line 498 of file tracktion_MidiClip.cpp.

◆ cloneFrom()

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

Clones the given clip to this clip.

Reimplemented from tracktion::engine::Clip.

Definition at line 194 of file tracktion_MidiClip.cpp.

◆ createSequenceLooped()

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

Definition at line 278 of file tracktion_MidiClip.cpp.

◆ deleteAllUnusedTakesConfirmingWithUser()

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

Definition at line 588 of file tracktion_MidiClip.cpp.

◆ disableLooping()

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

Disables all looping.

Reimplemented from tracktion::engine::Clip.

Definition at line 708 of file tracktion_MidiClip.cpp.

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

Definition at line 303 of file tracktion_MidiClip.cpp.

◆ getAudioTrack()

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

Definition at line 687 of file tracktion_MidiClip.cpp.

◆ getCompManager()

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

Definition at line 416 of file tracktion_MidiClip.cpp.

◆ getCurrentTake()

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

Returns the current take index.

Reimplemented from tracktion::engine::Clip.

Definition at line 130 of file tracktion_MidiClip.h.

◆ getDefaultColour()

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

Returns the default colour for this clip.

Implements tracktion::engine::Clip.

Definition at line 233 of file tracktion_MidiClip.cpp.

◆ getFollowActions()

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

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

Reimplemented from tracktion::engine::Clip.

Definition at line 407 of file tracktion_MidiClip.cpp.

◆ getGrooveStrength()

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

Definition at line 84 of file tracktion_MidiClip.h.

◆ getGrooveTemplate()

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

Definition at line 79 of file tracktion_MidiClip.h.

◆ getLaunchHandle()

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

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

Reimplemented from tracktion::engine::Clip.

Definition at line 391 of file tracktion_MidiClip.cpp.

◆ getLaunchQuantisation()

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

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

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

Reimplemented from tracktion::engine::Clip.

Definition at line 399 of file tracktion_MidiClip.cpp.

◆ getLiveClipLevel()

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

Definition at line 773 of file tracktion_MidiClip.cpp.

◆ getLoopLength()

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

Returns the length of loop in seconds.

Reimplemented from tracktion::engine::Clip.

Definition at line 761 of file tracktion_MidiClip.cpp.

◆ getLoopLengthBeats()

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

Returns the length of loop in beats.

Reimplemented from tracktion::engine::Clip.

Definition at line 144 of file tracktion_MidiClip.h.

◆ getLoopStart()

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

Returns the start time of the loop start point.

Reimplemented from tracktion::engine::Clip.

Definition at line 756 of file tracktion_MidiClip.cpp.

◆ getLoopStartBeats()

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

Returns the beat position of the loop start point.

Reimplemented from tracktion::engine::Clip.

Definition at line 143 of file tracktion_MidiClip.h.

◆ getMidiChannel()

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

Definition at line 65 of file tracktion_MidiClip.h.

◆ getMPEMode()

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

Definition at line 70 of file tracktion_MidiClip.h.

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

Definition at line 537 of file tracktion_MidiClip.cpp.

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

Definition at line 878 of file tracktion_MidiClip.cpp.

◆ getQuantisation()

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

Definition at line 76 of file tracktion_MidiClip.h.

◆ getSelectableDescription()

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

Subclasses must return a description of what they are.

Implements tracktion::engine::Selectable.

Definition at line 228 of file tracktion_MidiClip.cpp.

◆ getSelectedEvents()

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

Definition at line 36 of file tracktion_MidiClip.h.

◆ getSequence()

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

Definition at line 251 of file tracktion_MidiClip.cpp.

◆ getSequenceLooped()

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

Definition at line 264 of file tracktion_MidiClip.cpp.

◆ getTakeDescriptions()

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

Returns the descriptions of any takes.

Reimplemented from tracktion::engine::Clip.

Definition at line 545 of file tracktion_MidiClip.cpp.

◆ getTakeSequence()

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

Definition at line 134 of file tracktion_MidiClip.h.

◆ getVolumeDb()

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

Definition at line 106 of file tracktion_MidiClip.h.

◆ hasAnyTakes()

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

Returns true if this clip has any takes.

Reimplemented from tracktion::engine::Clip.

Definition at line 126 of file tracktion_MidiClip.h.

◆ hasValidSequence()

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

Definition at line 63 of file tracktion_MidiClip.h.

◆ initialise()

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

Initialises the Clip.

Called once automatically after construction.

Reimplemented from tracktion::engine::Clip.

Definition at line 131 of file tracktion_MidiClip.cpp.

◆ isCurrentTakeComp()

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

Returns true if the current take is a comp.

Reimplemented from tracktion::engine::Clip.

Definition at line 580 of file tracktion_MidiClip.cpp.

◆ isLooping()

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

Returns true if this clip is currently looping.

Reimplemented from tracktion::engine::Clip.

Definition at line 137 of file tracktion_MidiClip.h.

◆ isMidi()

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

Returns true if this is a MidiClip.

Implements tracktion::engine::Clip.

Definition at line 119 of file tracktion_MidiClip.h.

◆ isMuted()

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

Returns true if the clip is muted.

Implements tracktion::engine::Clip.

Definition at line 112 of file tracktion_MidiClip.h.

◆ isRhythm()

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

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

MIDI channel 10)

Definition at line 73 of file tracktion_MidiClip.h.

◆ isSendingBankChanges()

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

Definition at line 109 of file tracktion_MidiClip.h.

◆ legatoNote()

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

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.

Definition at line 332 of file tracktion_MidiClip.cpp.

◆ mergeInMidiSequence()

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

Definition at line 659 of file tracktion_MidiClip.cpp.

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

Definition at line 887 of file tracktion_MidiClip.cpp.

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

Definition at line 187 of file tracktion_MidiClip.cpp.

◆ scaleVerticallyToFit()

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

Definition at line 431 of file tracktion_MidiClip.cpp.

◆ setCurrentTake()

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

Sets a given take index to be the current take.

Reimplemented from tracktion::engine::Clip.

Definition at line 574 of file tracktion_MidiClip.cpp.

◆ setGrooveStrength()

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

Definition at line 85 of file tracktion_MidiClip.h.

◆ setGrooveTemplate()

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

Definition at line 80 of file tracktion_MidiClip.h.

◆ setLoopRange()

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

Sets the loop range the clip should use in seconds.

Reimplemented from tracktion::engine::Clip.

Definition at line 744 of file tracktion_MidiClip.cpp.

◆ setLoopRangeBeats()

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

Sets the loop range the clip should use in beats.

Reimplemented from tracktion::engine::Clip.

Definition at line 725 of file tracktion_MidiClip.cpp.

◆ setMidiChannel()

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

Definition at line 66 of file tracktion_MidiClip.h.

◆ setMPEMode()

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

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

Definition at line 69 of file tracktion_MidiClip.h.

◆ setMuted()

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

Mutes or unmutes the clip.

Reimplemented from tracktion::engine::Clip.

Definition at line 113 of file tracktion_MidiClip.h.

◆ setNumberOfLoops()

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

Sets the clip looping a number of times.

Reimplemented from tracktion::engine::Clip.

Definition at line 693 of file tracktion_MidiClip.cpp.

◆ setQuantisation()

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

Definition at line 384 of file tracktion_MidiClip.cpp.

◆ setSendingBankChanges()

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

Definition at line 767 of file tracktion_MidiClip.cpp.

◆ setUsesGlobalLaunchQuatisation()

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

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

See also
getLaunchQuantisation, Edit::getLaunchQuantisation

Reimplemented from tracktion::engine::Clip.

Definition at line 52 of file tracktion_MidiClip.h.

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

Definition at line 43 of file tracktion_MidiClip.h.

◆ setVolumeDb()

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

Definition at line 107 of file tracktion_MidiClip.h.

◆ trimBeyondEnds()

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

Definition at line 314 of file tracktion_MidiClip.cpp.

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

Definition at line 599 of file tracktion_MidiClip.cpp.

◆ usesGlobalLaunchQuatisation()

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

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

See also
getLaunchQuantisation, Edit::getLaunchQuantisation

Reimplemented from tracktion::engine::Clip.

Definition at line 54 of file tracktion_MidiClip.h.

◆ usesGrooveStrength()

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

Definition at line 238 of file tracktion_MidiClip.cpp.

◆ valueTreeChildAdded()

void tracktion::engine::MidiClip::valueTreeChildAdded ( juce::ValueTree p,
juce::ValueTree c 
)
overrideprotectedvirtual

Reimplemented from juce::ValueTree::Listener.

Definition at line 836 of file tracktion_MidiClip.cpp.

◆ valueTreeChildRemoved()

void tracktion::engine::MidiClip::valueTreeChildRemoved ( juce::ValueTree p,
juce::ValueTree c,
int   
)
overrideprotectedvirtual

Reimplemented from juce::ValueTree::Listener.

Definition at line 847 of file tracktion_MidiClip.cpp.

◆ valueTreePropertyChanged()

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

Reimplemented from tracktion::engine::Clip.

Definition at line 778 of file tracktion_MidiClip.cpp.

Friends And Related Symbol Documentation

◆ MidiNote

friend class MidiNote
friend

Definition at line 181 of file tracktion_MidiClip.h.

Member Data Documentation

◆ loopedSequenceType

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

Definition at line 154 of file tracktion_MidiClip.h.


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