JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::ARARegionSequence Class Reference

Base class representing an ARA region sequence. More...

#include <juce_ARAModelObjects.h>

Inheritance diagram for juce::ARARegionSequence:
Collaboration diagram for juce::ARARegionSequence:

Public Types

using Listener = ARARegionSequenceListener
 
using PropertiesPtr = ARA::PlugIn::PropertiesPtr< ARA::ARARegionSequenceProperties >
 

Public Member Functions

void addListener (ARARegionSequenceListener *l)
 Subscribe l to notified by changes to the object.
 
ARAObjectgetChild (size_t index) override
 Returns the child object associated with the given index.
 
double getCommonSampleRate () const
 If all audio sources used by the playback regions in this region sequence have the same sample rate, this rate is returned here, otherwise 0.0 is returned.
 
template<typename Document_t = ARADocument>
Document_t * getDocument () const noexcept
 Returns the result of ARA::PlugIn::RegionSequence::getDocument() with the pointer cast to ARADocument*.
 
template<typename MusicalContext_t = ARAMusicalContext>
MusicalContext_t * getMusicalContext () const noexcept
 Returns the result of ARA::PlugIn::RegionSequence::getMusicalContext() with the pointer cast to ARAMusicalContext*.
 
size_t getNumChildren () const noexcept override
 Returns the number of ARA model objects aggregated by this object.
 
ARAObjectgetParent () override
 Returns the ARA model object that aggregates this object.
 
template<typename PlaybackRegion_t = ARAPlaybackRegion>
const std::vector< PlaybackRegion_t * > & getPlaybackRegions () const noexcept
 Returns the result of ARA::PlugIn::RegionSequence::getPlaybackRegions() with the pointers within cast to ARAPlaybackRegion*.
 
Range< double > getTimeRange (ARAPlaybackRegion::IncludeHeadAndTail includeHeadAndTail=ARAPlaybackRegion::IncludeHeadAndTail::no) const
 Returns the playback time range covered by the regions in this sequence.
 
void notifyListeners (Callback &&callback)
 Call the provided callback for each of the added listeners.
 
void removeListener (ARARegionSequenceListener *l)
 Unsubscribe l from object notifications.
 
template<typename Fn >
void traverse (Fn &&fn)
 Implements a depth first traversal of the ARA model graph starting from the current object, and visiting its children recursively.
 
void visit (ARAObjectVisitor &visitor) override
 Allows the retrieval of the concrete type of a model object.
 

Private Attributes

ListenerList< ARARegionSequenceListenerlisteners
 

Detailed Description

Base class representing an ARA region sequence.

@tags{ARA}

Member Typedef Documentation

◆ Listener

◆ PropertiesPtr

using juce::ARARegionSequence::PropertiesPtr = ARA::PlugIn::PropertiesPtr<ARA::ARARegionSequenceProperties>

Member Function Documentation

◆ addListener()

Subscribe l to notified by changes to the object.

Parameters
lThe listener instance.

◆ getChild()

ARAObject * juce::ARARegionSequence::getChild ( size_t  index)
overridevirtual

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.

◆ getCommonSampleRate()

double juce::ARARegionSequence::getCommonSampleRate ( ) const

If all audio sources used by the playback regions in this region sequence have the same sample rate, this rate is returned here, otherwise 0.0 is returned.

If the region sequence has no playback regions, this also returns 0.0.

◆ getDocument()

template<typename Document_t = ARADocument>
Document_t * juce::ARARegionSequence::getDocument ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::RegionSequence::getDocument() with the pointer cast to ARADocument*.

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

◆ getMusicalContext()

template<typename MusicalContext_t = ARAMusicalContext>
MusicalContext_t * juce::ARARegionSequence::getMusicalContext ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::RegionSequence::getMusicalContext() with the pointer cast to ARAMusicalContext*.

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

◆ getNumChildren()

size_t juce::ARARegionSequence::getNumChildren ( ) const
overridevirtualnoexcept

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::ARARegionSequence::getParent ( )
inlineoverridevirtual

Returns the ARA model object that aggregates this object.

Returns nullptr for the ARADocument root object.

Implements juce::ARAObject.

◆ getPlaybackRegions()

template<typename PlaybackRegion_t = ARAPlaybackRegion>
const std::vector< PlaybackRegion_t * > & juce::ARARegionSequence::getPlaybackRegions ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::RegionSequence::getPlaybackRegions() with the pointers within cast to ARAPlaybackRegion*.

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

◆ getTimeRange()

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

Returns the playback time range covered by the regions in this sequence.

Parameters
includeHeadAndTailWhether or not the range includes the playback region's head and tail time.

◆ notifyListeners()

void juce::ARAListenableModelClass< ARARegionSequenceListener >::notifyListeners ( Callback &&  callback)
inlineinherited

Call the provided callback for each of the added listeners.

◆ removeListener()

void juce::ARAListenableModelClass< ARARegionSequenceListener >::removeListener ( ARARegionSequenceListener l)
inlineinherited

Unsubscribe l from object notifications.

Parameters
lThe listener instance.

◆ traverse()

template<typename Fn >
void juce::ARAObject::traverse ( Fn &&  fn)
inlineinherited

Implements a depth first traversal of the ARA model graph starting from the current object, and visiting its children recursively.

The provided function should accept a single ARAObject& parameter.

References juce::ARAObject::getChild(), juce::ARAObject::getNumChildren(), and juce::ARAObject::traverse().

Referenced by juce::ARAObject::traverse().

◆ visit()

void juce::ARARegionSequence::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.

References juce::ARAObjectVisitor::visitRegionSequence().

Member Data Documentation

◆ listeners


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