JUCE: ARAPlaybackRegion Class Reference

JUCE

Public Types | Public Member Functions | List of all members
ARAPlaybackRegion Class Reference
juce_audio_processors » utilities

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

`#include <juce_ARAModelObjects.h>`

Inheritance diagram for ARAPlaybackRegion:

## Public Types
enum class | IncludeHeadAndTail { no , yes }
| Used in getTimeRange to indicate whether the head and tail times should be included in the result. More...
using | PropertiesPtr = ARA::PlugIn::PropertiesPtr< ARA::ARAPlaybackRegionProperties >
using | Listener = ARAPlaybackRegionListener

## Public Member Functions
template<typename AudioModification_t = ARAAudioModification>
AudioModification_t * | getAudioModification () const noexcept
| Returns the result of ARA::PlugIn::PlaybackRegion::getAudioModification() with the pointer cast to ARAAudioModification*. More...
template<typename RegionSequence_t = ARARegionSequence>
RegionSequence_t * | getRegionSequence () const noexcept
| Returns the result of ARA::PlugIn::PlaybackRegion::getRegionSequence() with the pointer cast to ARARegionSequence*. More...
size_t | getNumChildren () const noexcept override
| Returns the number of ARA model objects aggregated by this object. More...
ARAObject * | getChild (size_t) override
| Returns the child object associated with the given index. More...
ARAObject * | getParent () override
| Returns the ARA model object that aggregates this object. More...
void | visit (ARAObjectVisitor &visitor) override
| Allows the retrieval of the concrete type of a model object. More...
Range< double > | getTimeRange (IncludeHeadAndTail includeHeadAndTail=IncludeHeadAndTail::no) const
| Returns the playback time range of this playback region. More...
Range< int64 > | getSampleRange (double sampleRate, IncludeHeadAndTail includeHeadAndTail=IncludeHeadAndTail::no) const
| Returns the playback sample range of this playback region. More...
double | getHeadTime () const
| Get the head length in seconds before the start of the region's playback time. More...
double | getTailTime () const
| Get the tail length in seconds after the end of the region's playback time. More...
void | notifyContentChanged (ARAContentUpdateScopes scopeFlags, bool notifyARAHost)
| Notify the ARA host and any listeners of a content update initiated by the plug-in. More...
Public Member Functions inherited from ARAListenableModelClass< ARAPlaybackRegionListener >
| ARAListenableModelClass ()=default
| Constructor. More...
virtual | ~ARAListenableModelClass ()=default
| Destructor. More...
void | addListener (ARAPlaybackRegionListener *l)
| Subscribe `l` to notified by changes to the object. More...
void | removeListener (ARAPlaybackRegionListener *l)
| Unsubscribe `l` from object notifications. More...
void | notifyListeners (Callback &&callback)
| Call the provided callback for each of the added listeners. More...
Public Member Functions inherited from ARAObject
virtual | ~ARAObject ()=default
| Destructor. More...
virtual size_t | getNumChildren () const noexcept=0
| Returns the number of ARA model objects aggregated by this object. More...
virtual ARAObject * | getChild (size_t index)=0
| Returns the child object associated with the given index. More...
virtual ARAObject * | getParent ()=0
| Returns the ARA model object that aggregates this object. More...
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. More...
virtual void | visit (ARAObjectVisitor &visitor)=0
| Allows the retrieval of the concrete type of a model object. More...

## Detailed Description

Base class representing an ARA playback region.

## Member Typedef Documentation

## ◆ PropertiesPtr

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

## ◆ Listener

using ARAPlaybackRegion::Listener = ARAPlaybackRegionListener

## Member Enumeration Documentation

## ◆ IncludeHeadAndTail

enum class 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 * ARAPlaybackRegion::getAudioModification | ( |  | ) | const
| noexcept

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.

## ◆ getRegionSequence()

template<typename RegionSequence_t = ARARegionSequence>

RegionSequence_t * ARAPlaybackRegion::getRegionSequence | ( |  | ) | const
| noexcept

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.

## ◆ getNumChildren()

size_t ARAPlaybackRegion::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 ARAObject.

## ◆ getChild()

ARAObject * ARAPlaybackRegion::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 ARAObject.

## ◆ getParent()

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

Returns the ARA model object that aggregates this object.

Returns nullptr for the ARADocument root object.

Implements ARAObject.

## ◆ visit()

void ARAPlaybackRegion::visit | ( | ARAObjectVisitor & | visitor | ) |
| overridevirtual

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

References ARAObjectVisitor::visitPlaybackRegion().

## ◆ getTimeRange()

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

Returns the playback time range of this playback region.

Parameters

  includeHeadAndTail | Whether or not the range includes the head and tail time of all playback regions in the sequence.

## ◆ getSampleRange()

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

Returns the playback sample range of this playback region.

Parameters

  sampleRate | The rate at which the sample position should be calculated from the time range.
  includeHeadAndTail | Whether or not the range includes the head and tail time of all playback regions in the sequence.

## ◆ getHeadTime()

double ARAPlaybackRegion::getHeadTime | ( |  | ) | const

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

## ◆ getTailTime()

double ARAPlaybackRegion::getTailTime | ( |  | ) | const

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

## ◆ notifyContentChanged()

void 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

  scopeFlags | The scope of the content update.
  notifyARAHost | If true, the ARA host will be notified of the content change.

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

- juce_ARAModelObjects.h