LMMS
Loading...
Searching...
No Matches
juce::ARAPlaybackRegion Class Reference

#include <juce_ARAModelObjects.h>

Inheritance diagram for juce::ARAPlaybackRegion:
juce::ARAListenableModelClass< ARAPlaybackRegionListener > juce::ARAObject

Public Types

enum class  IncludeHeadAndTail { no , yes }
using PropertiesPtr = ARA::PlugIn::PropertiesPtr<ARA::ARAPlaybackRegionProperties>
using Listener = ARAPlaybackRegionListener

Public Member Functions

template<typename AudioModification_t = ARAAudioModification>
AudioModification_t * getAudioModification () const noexcept
template<typename RegionSequence_t = ARARegionSequence>
RegionSequence_t * getRegionSequence () const noexcept
size_t getNumChildren () const noexcept override
ARAObjectgetChild (size_t) override
ARAObjectgetParent () override
void visit (ARAObjectVisitor &visitor) override
Range< double > getTimeRange (IncludeHeadAndTail includeHeadAndTail=IncludeHeadAndTail::no) const
Range< int64getSampleRange (double sampleRate, IncludeHeadAndTail includeHeadAndTail=IncludeHeadAndTail::no) const
double getHeadTime () const
double getTailTime () const
void notifyContentChanged (ARAContentUpdateScopes scopeFlags, bool notifyARAHost)
Public Member Functions inherited from juce::ARAListenableModelClass< ARAPlaybackRegionListener >
 ARAListenableModelClass ()=default
virtual ~ARAListenableModelClass ()=default
void addListener (ARAPlaybackRegionListener *l)
void removeListener (ARAPlaybackRegionListener *l)
void notifyListeners (Callback &&callback)
Public Member Functions inherited from juce::ARAObject
virtual ~ARAObject ()=default
template<typename Fn>
void traverse (Fn &&fn)

Detailed Description

Base class representing an ARA playback region.

@tags{ARA}

Member Typedef Documentation

◆ Listener

using juce::ARAPlaybackRegion::Listener = ARAPlaybackRegionListener

◆ PropertiesPtr

using juce::ARAPlaybackRegion::PropertiesPtr = ARA::PlugIn::PropertiesPtr<ARA::ARAPlaybackRegionProperties>

Member Enumeration Documentation

◆ IncludeHeadAndTail

enum class juce::ARAPlaybackRegion::IncludeHeadAndTail
strong

Used in getTimeRange to indicate whether the head and tail times should be included in the result.

Enumerator
no 
yes 

Member Function Documentation

◆ getAudioModification()

template<typename AudioModification_t = ARAAudioModification>
AudioModification_t * juce::ARAPlaybackRegion::getAudioModification ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::PlaybackRegion::getAudioModification() with the pointer cast to ARAAudioModification*.

If you have overridden ARADocumentControllerSpecialisation::doCreateAudioModification(), then you can use the template parameter to cast the pointers to your subclass of ARAAudioModification.

◆ getChild()

ARAObject * juce::ARAPlaybackRegion::getChild ( size_t index)
inlineoverridevirtual

Returns the child object associated with the given index.

The index should be smaller than the value returned by getNumChildren().

Note that the index of a particular object may change when the ARA model graph is edited.

Implements juce::ARAObject.

◆ getHeadTime()

double juce::ARAPlaybackRegion::getHeadTime ( ) const

Get the head length in seconds before the start of the region's playback time.

◆ getNumChildren()

size_t juce::ARAPlaybackRegion::getNumChildren ( ) const
inlineoverridevirtualnoexcept

Returns the number of ARA model objects aggregated by this object. Objects that are merely referred to, but not aggregated by the current object are not included in this count, e.g. a referenced RegionSequence does not count as a child of the referring PlaybackRegion.

See the ARA documentation's ARA Model Graph Overview for more details.

Implements juce::ARAObject.

◆ getParent()

ARAObject * juce::ARAPlaybackRegion::getParent ( )
overridevirtual

Returns the ARA model object that aggregates this object.

Returns nullptr for the ARADocument root object.

Implements juce::ARAObject.

◆ getRegionSequence()

template<typename RegionSequence_t = ARARegionSequence>
RegionSequence_t * juce::ARAPlaybackRegion::getRegionSequence ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::PlaybackRegion::getRegionSequence() with the pointer cast to ARARegionSequence*.

If you have overridden ARADocumentControllerSpecialisation::doCreateRegionSequence(), then you can use the template parameter to cast the pointers to your subclass of ARARegionSequence.

◆ getSampleRange()

Range< int64 > juce::ARAPlaybackRegion::getSampleRange ( double sampleRate,
IncludeHeadAndTail includeHeadAndTail = IncludeHeadAndTail::no ) const

Returns the playback sample range of this playback region.

Parameters
sampleRateThe rate at which the sample position should be calculated from the time range.
includeHeadAndTailWhether or not the range includes the head and tail time of all playback regions in the sequence.

◆ getTailTime()

double juce::ARAPlaybackRegion::getTailTime ( ) const

Get the tail length in seconds after the end of the region's playback time.

◆ getTimeRange()

Range< double > juce::ARAPlaybackRegion::getTimeRange ( IncludeHeadAndTail includeHeadAndTail = IncludeHeadAndTail::no) const

Returns the playback time range of this playback region.

Parameters
includeHeadAndTailWhether or not the range includes the head and tail time of all playback regions in the sequence.

◆ notifyContentChanged()

void juce::ARAPlaybackRegion::notifyContentChanged ( ARAContentUpdateScopes scopeFlags,
bool notifyARAHost )

Notify the ARA host and any listeners of a content update initiated by the plug-in. This must be called by the plug-in model management code on the message thread whenever updating the internal content representation, such as after the user edited the pitch of a note in the underlying audio modification. Listeners will be notified immediately. If notifyARAHost is true, a notification to the host will be enqueued and sent out the next time it polls for updates.

Parameters
scopeFlagsThe scope of the content update.
notifyARAHostIf true, the ARA host will be notified of the content change.

◆ visit()

void juce::ARAPlaybackRegion::visit ( ARAObjectVisitor & visitor)
inlineoverridevirtual

Allows the retrieval of the concrete type of a model object.

To use this, create a new class derived from ARAObjectVisitor and override its functions depending on which concrete types you are interested in.

Calling this function inside the function passed to ARAObject::traverse() allows you to map the entire ARA model graph.

Implements juce::ARAObject.


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