Base class representing an ARA audio modification. More...
#include <juce_ARAModelObjects.h>


Public Types | |
| using | Listener = ARAAudioModificationListener |
| using | PropertiesPtr = ARA::PlugIn::PropertiesPtr< ARA::ARAAudioModificationProperties > |
Public Member Functions | |
| void | addListener (ARAAudioModificationListener *l) |
Subscribe l to notified by changes to the object. | |
| template<typename AudioSource_t = ARAAudioSource> | |
| AudioSource_t * | getAudioSource () const noexcept |
| Returns the result of ARA::PlugIn::AudioModification::getAudioSource() with the pointer cast to ARAAudioSource*. | |
| ARAObject * | getChild (size_t index) override |
| Returns the child object associated with the given index. | |
| size_t | getNumChildren () const noexcept override |
| Returns the number of ARA model objects aggregated by this object. | |
| ARAObject * | getParent () 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::AudioModification::getPlaybackRegions() with the pointers within cast to ARAPlaybackRegion*. | |
| void | notifyContentChanged (ARAContentUpdateScopes scopeFlags, bool notifyARAHost) |
| Notify the ARA host and any listeners of a content update initiated by the plug-in. | |
| void | notifyListeners (Callback &&callback) |
| Call the provided callback for each of the added listeners. | |
| void | removeListener (ARAAudioModificationListener *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< ARAAudioModificationListener > | listeners |
| using juce::ARAAudioModification::PropertiesPtr = ARA::PlugIn::PropertiesPtr<ARA::ARAAudioModificationProperties> |
|
inlineinherited |
Subscribe l to notified by changes to the object.
| l | The listener instance. |
|
inlinenoexcept |
Returns the result of ARA::PlugIn::AudioModification::getAudioSource() with the pointer cast to ARAAudioSource*.
If you have overridden ARADocumentControllerSpecialisation::doCreateAudioSource(), then you can use the template parameter to cast the pointers to your subclass of ARAAudioSource.
|
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.
|
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.
|
inlineoverridevirtual |
Returns the ARA model object that aggregates this object.
Returns nullptr for the ARADocument root object.
Implements juce::ARAObject.
|
inlinenoexcept |
Returns the result of ARA::PlugIn::AudioModification::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.
| void juce::ARAAudioModification::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 editing the pitch of a note. 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. notifyARAHost must be false if the updated content is being restored from an archive.
| scopeFlags | The scope of the content update. |
| notifyARAHost | If true, the ARA host will be notified of the content change. |
|
inlineinherited |
Call the provided callback for each of the added listeners.
|
inlineinherited |
Unsubscribe l from object notifications.
| l | The listener instance. |
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().
|
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::visitAudioModification().
|
privateinherited |