This class contains the customisation points for the JUCE provided ARA document controller implementation. More...
Public Member Functions | |
ARADocumentControllerSpecialisation (const ARA::PlugIn::PlugInEntry *entry, const ARA::ARADocumentControllerHostInstance *instance) | |
Constructor. | |
virtual | ~ARADocumentControllerSpecialisation () |
Destructor. | |
ARA::PlugIn::DocumentController * | getDocumentController () noexcept |
Returns the underlying DocumentController object that references this specialisation. | |
template<typename DocumentType = ARADocument> | |
DocumentType * | getDocument () |
Returns a pointer to the ARA document root maintained by this document controller. | |
![]() | |
virtual | ~ARADocumentListener ()=default |
Destructor. | |
virtual void | willBeginEditing (ARADocument *document) |
Called before the document enters an editing state. | |
virtual void | didEndEditing (ARADocument *document) |
Called after the document exits an editing state. | |
virtual void | willNotifyModelUpdates (ARADocument *document) |
Called before sending model updates do the host. | |
virtual void | didNotifyModelUpdates (ARADocument *document) |
Called after sending model updates do the host. | |
virtual void | willUpdateDocumentProperties (ARADocument *document, ARA::PlugIn::PropertiesPtr< ARA::ARADocumentProperties > newProperties) |
Called before the document's properties are updated. | |
virtual void | didUpdateDocumentProperties (ARADocument *document) |
Called after the document's properties are updated. | |
virtual void | didAddMusicalContextToDocument (ARADocument *document, ARAMusicalContext *musicalContext) |
Called after a musical context is added to the document. | |
virtual void | willRemoveMusicalContextFromDocument (ARADocument *document, ARAMusicalContext *musicalContext) |
Called before a musical context is removed from the document. | |
virtual void | didReorderMusicalContextsInDocument (ARADocument *document) |
Called after the musical contexts are reordered in an ARA document. | |
virtual void | didAddRegionSequenceToDocument (ARADocument *document, ARARegionSequence *regionSequence) |
Called after a region sequence is added to the document. | |
virtual void | willRemoveRegionSequenceFromDocument (ARADocument *document, ARARegionSequence *regionSequence) |
Called before a region sequence is removed from the document. | |
virtual void | didReorderRegionSequencesInDocument (ARADocument *document) |
Called after the region sequences are reordered in an ARA document. | |
virtual void | didAddAudioSourceToDocument (ARADocument *document, ARAAudioSource *audioSource) |
Called after an audio source is added to the document. | |
virtual void | willRemoveAudioSourceFromDocument (ARADocument *document, ARAAudioSource *audioSource) |
Called before an audio source is removed from the document. | |
virtual void | willDestroyDocument (ARADocument *document) |
Called before the document is destroyed by the ARA host. | |
![]() | |
virtual | ~ARAMusicalContextListener ()=default |
virtual void | willUpdateMusicalContextProperties (ARAMusicalContext *musicalContext, ARA::PlugIn::PropertiesPtr< ARA::ARAMusicalContextProperties > newProperties) |
Called before the musical context's properties are updated. | |
virtual void | didUpdateMusicalContextProperties (ARAMusicalContext *musicalContext) |
Called after the musical context's properties are updated by the host. | |
virtual void | doUpdateMusicalContextContent (ARAMusicalContext *musicalContext, ARAContentUpdateScopes scopeFlags) |
Called when the musical context's content (i.e tempo entries or chords) changes. | |
virtual void | didAddRegionSequenceToMusicalContext (ARAMusicalContext *musicalContext, ARARegionSequence *regionSequence) |
Called after a region sequence is added to the musical context. | |
virtual void | willRemoveRegionSequenceFromMusicalContext (ARAMusicalContext *musicalContext, ARARegionSequence *regionSequence) |
Called before a region sequence is removed from the musical context. | |
virtual void | didReorderRegionSequencesInMusicalContext (ARAMusicalContext *musicalContext) |
Called after the region sequences are reordered in an ARA MusicalContext. | |
virtual void | willDestroyMusicalContext (ARAMusicalContext *musicalContext) |
Called before the musical context is destroyed. | |
![]() | |
virtual | ~ARARegionSequenceListener ()=default |
Destructor. | |
virtual void | willUpdateRegionSequenceProperties (ARARegionSequence *regionSequence, ARA::PlugIn::PropertiesPtr< ARA::ARARegionSequenceProperties > newProperties) |
Called before the region sequence's properties are updated. | |
virtual void | didUpdateRegionSequenceProperties (ARARegionSequence *regionSequence) |
Called after the region sequence's properties are updated. | |
virtual void | willRemovePlaybackRegionFromRegionSequence (ARARegionSequence *regionSequence, ARAPlaybackRegion *playbackRegion) |
Called before a playback region is removed from the region sequence. | |
virtual void | didAddPlaybackRegionToRegionSequence (ARARegionSequence *regionSequence, ARAPlaybackRegion *playbackRegion) |
Called after a playback region is added to the region sequence. | |
virtual void | willDestroyRegionSequence (ARARegionSequence *regionSequence) |
Called before the region sequence is destroyed. | |
![]() | |
virtual | ~ARAAudioSourceListener ()=default |
Destructor. | |
virtual void | willUpdateAudioSourceProperties (ARAAudioSource *audioSource, ARA::PlugIn::PropertiesPtr< ARA::ARAAudioSourceProperties > newProperties) |
Called before the audio source's properties are updated. | |
virtual void | didUpdateAudioSourceProperties (ARAAudioSource *audioSource) |
Called after the audio source's properties are updated. | |
virtual void | doUpdateAudioSourceContent (ARAAudioSource *audioSource, ARAContentUpdateScopes scopeFlags) |
Called when the audio source's content (i.e. | |
virtual void | didUpdateAudioSourceAnalysisProgress (ARAAudioSource *audioSource, ARA::ARAAnalysisProgressState state, float progress) |
Called to notify progress when an audio source is being analyzed. | |
virtual void | willEnableAudioSourceSamplesAccess (ARAAudioSource *audioSource, bool enable) |
Called before access to an audio source's samples is enabled or disabled. | |
virtual void | didEnableAudioSourceSamplesAccess (ARAAudioSource *audioSource, bool enable) |
Called after access to an audio source's samples is enabled or disabled. | |
virtual void | willDeactivateAudioSourceForUndoHistory (ARAAudioSource *audioSource, bool deactivate) |
Called before an audio source is activated or deactivated when being removed / added from the host's undo history. | |
virtual void | didDeactivateAudioSourceForUndoHistory (ARAAudioSource *audioSource, bool deactivate) |
Called after an audio source is activated or deactivated when being removed / added from the host's undo history. | |
virtual void | didAddAudioModificationToAudioSource (ARAAudioSource *audioSource, ARAAudioModification *audioModification) |
Called after an audio modification is added to the audio source. | |
virtual void | willRemoveAudioModificationFromAudioSource (ARAAudioSource *audioSource, ARAAudioModification *audioModification) |
Called before an audio modification is removed from the audio source. | |
virtual void | willDestroyAudioSource (ARAAudioSource *audioSource) |
Called before the audio source is destroyed. | |
![]() | |
virtual | ~ARAAudioModificationListener ()=default |
Destructor. | |
virtual void | willUpdateAudioModificationProperties (ARAAudioModification *audioModification, ARA::PlugIn::PropertiesPtr< ARA::ARAAudioModificationProperties > newProperties) |
Called before the audio modification's properties are updated. | |
virtual void | didUpdateAudioModificationProperties (ARAAudioModification *audioModification) |
Called after the audio modification's properties are updated. | |
virtual void | didUpdateAudioModificationContent (ARAAudioModification *audioModification, ARAContentUpdateScopes scopeFlags) |
Called when the audio modification's content (i.e. | |
virtual void | willDeactivateAudioModificationForUndoHistory (ARAAudioModification *audioModification, bool deactivate) |
Called before an audio modification is activated or deactivated when being removed / added from the host's undo history. | |
virtual void | didDeactivateAudioModificationForUndoHistory (ARAAudioModification *audioModification, bool deactivate) |
Called after an audio modification is activated or deactivated when being removed / added from the host's undo history. | |
virtual void | didAddPlaybackRegionToAudioModification (ARAAudioModification *audioModification, ARAPlaybackRegion *playbackRegion) |
Called after a playback region is added to the audio modification. | |
virtual void | willRemovePlaybackRegionFromAudioModification (ARAAudioModification *audioModification, ARAPlaybackRegion *playbackRegion) |
Called before a playback region is removed from the audio modification. | |
virtual void | willDestroyAudioModification (ARAAudioModification *audioModification) |
Called before the audio modification is destroyed. | |
![]() | |
virtual | ~ARAPlaybackRegionListener ()=default |
Destructor. | |
virtual void | willUpdatePlaybackRegionProperties (ARAPlaybackRegion *playbackRegion, ARA::PlugIn::PropertiesPtr< ARA::ARAPlaybackRegionProperties > newProperties) |
Called before the playback region's properties are updated. | |
virtual void | didUpdatePlaybackRegionProperties (ARAPlaybackRegion *playbackRegion) |
Called after the playback region's properties are updated. | |
virtual void | didUpdatePlaybackRegionContent (ARAPlaybackRegion *playbackRegion, ARAContentUpdateScopes scopeFlags) |
Called when the playback region's content (i.e. | |
virtual void | willDestroyPlaybackRegion (ARAPlaybackRegion *playbackRegion) |
Called before the playback region is destroyed. | |
Static Public Member Functions | |
template<typename SpecialisationType> | |
static const ARA::ARAFactory * | createARAFactory () |
Helper function for implementing the global createARAFactory() function. | |
template<typename Specialisation = ARADocumentControllerSpecialisation> | |
static Specialisation * | getSpecialisedDocumentController (ARA::PlugIn::DocumentController *dc) |
Returns a pointer to the ARADocumentControllerSpecialisation instance that is referenced by the provided DocumentController. | |
Protected Member Functions | |
virtual bool | doRestoreObjectsFromStream (ARAInputStream &input, const ARARestoreObjectsFilter *filter)=0 |
Read an ARADocument archive from a juce::InputStream. | |
virtual bool | doStoreObjectsToStream (ARAOutputStream &output, const ARAStoreObjectsFilter *filter)=0 |
Write an ARADocument archive to a juce::OutputStream. | |
virtual ARAPlaybackRenderer * | doCreatePlaybackRenderer () |
Override to return a custom subclass instance of ARAPlaybackRenderer. | |
virtual ARAEditorRenderer * | doCreateEditorRenderer () |
Override to return a custom subclass instance of ARAEditorRenderer. | |
virtual ARAEditorView * | doCreateEditorView () |
Override to return a custom subclass instance of ARAEditorView. | |
virtual bool | doIsAudioSourceContentAvailable (const ARA::PlugIn::AudioSource *audioSource, ARA::ARAContentType type) |
Override to implement isAudioSourceContentAvailable() for all your supported content types - the default implementation always returns false, preventing any calls to doGetAudioSourceContentGrade() and doCreateAudioSourceContentReader(). | |
virtual ARA::ARAContentGrade | doGetAudioSourceContentGrade (const ARA::PlugIn::AudioSource *audioSource, ARA::ARAContentType type) |
Override to implement getAudioSourceContentGrade() for all your supported content types. | |
virtual ARA::PlugIn::ContentReader * | doCreateAudioSourceContentReader (ARA::PlugIn::AudioSource *audioSource, ARA::ARAContentType type, const ARA::ARAContentTimeRange *range) |
Override to implement createAudioSourceContentReader() for all your supported content types, returning a custom subclass instance of ContentReader providing data of the requested type. | |
virtual bool | doIsAudioModificationContentAvailable (const ARA::PlugIn::AudioModification *audioModification, ARA::ARAContentType type) |
Override to implement isAudioModificationContentAvailable() for all your supported content types - the default implementation always returns false. | |
virtual ARA::ARAContentGrade | doGetAudioModificationContentGrade (const ARA::PlugIn::AudioModification *audioModification, ARA::ARAContentType type) |
Override to implement getAudioModificationContentGrade() for all your supported content types. | |
virtual ARA::PlugIn::ContentReader * | doCreateAudioModificationContentReader (ARA::PlugIn::AudioModification *audioModification, ARA::ARAContentType type, const ARA::ARAContentTimeRange *range) |
Override to implement createAudioModificationContentReader() for all your supported content types, returning a custom subclass instance of ContentReader providing data of the requested type . | |
virtual bool | doIsPlaybackRegionContentAvailable (const ARA::PlugIn::PlaybackRegion *playbackRegion, ARA::ARAContentType type) |
Override to implement isPlaybackRegionContentAvailable() for all your supported content types - the default implementation always returns false. | |
virtual ARA::ARAContentGrade | doGetPlaybackRegionContentGrade (const ARA::PlugIn::PlaybackRegion *playbackRegion, ARA::ARAContentType type) |
Override to implement getPlaybackRegionContentGrade() for all your supported content types. | |
virtual ARA::PlugIn::ContentReader * | doCreatePlaybackRegionContentReader (ARA::PlugIn::PlaybackRegion *playbackRegion, ARA::ARAContentType type, const ARA::ARAContentTimeRange *range) |
Override to implement createPlaybackRegionContentReader() for all your supported content types, returning a custom subclass instance of ContentReader providing data of the requested type. | |
virtual void | doGetPlaybackRegionHeadAndTailTime (const ARA::PlugIn::PlaybackRegion *playbackRegion, ARA::ARATimeDuration *headTime, ARA::ARATimeDuration *tailTime) |
Override to implement getPlaybackRegionHeadAndTailTime(). | |
virtual bool | doIsAudioSourceContentAnalysisIncomplete (const ARA::PlugIn::AudioSource *audioSource, ARA::ARAContentType type) |
Override to implement isAudioSourceContentAnalysisIncomplete(). | |
virtual void | doRequestAudioSourceContentAnalysis (ARA::PlugIn::AudioSource *audioSource, std::vector< ARA::ARAContentType > const &contentTypes) |
Override to implement requestAudioSourceContentAnalysis(). | |
virtual ARA::ARAInt32 | doGetProcessingAlgorithmsCount () |
Override to implement getProcessingAlgorithmsCount(). | |
virtual const ARA::ARAProcessingAlgorithmProperties * | doGetProcessingAlgorithmProperties (ARA::ARAInt32 algorithmIndex) |
Override to implement getProcessingAlgorithmProperties(). | |
virtual ARA::ARAInt32 | doGetProcessingAlgorithmForAudioSource (const ARA::PlugIn::AudioSource *audioSource) |
Override to implement getProcessingAlgorithmForAudioSource(). | |
virtual void | doRequestProcessingAlgorithmForAudioSource (ARA::PlugIn::AudioSource *audioSource, ARA::ARAInt32 algorithmIndex) |
Override to implement requestProcessingAlgorithmForAudioSource(). | |
virtual ARADocument * | doCreateDocument () |
Override to return a custom subclass instance of ARADocument. | |
virtual ARAMusicalContext * | doCreateMusicalContext (ARADocument *document, ARA::ARAMusicalContextHostRef hostRef) |
Override to return a custom subclass instance of ARAMusicalContext. | |
virtual ARARegionSequence * | doCreateRegionSequence (ARADocument *document, ARA::ARARegionSequenceHostRef hostRef) |
Override to return a custom subclass instance of ARARegionSequence. | |
virtual ARAAudioSource * | doCreateAudioSource (ARADocument *document, ARA::ARAAudioSourceHostRef hostRef) |
Override to return a custom subclass instance of ARAAudioSource. | |
virtual ARAAudioModification * | doCreateAudioModification (ARAAudioSource *audioSource, ARA::ARAAudioModificationHostRef hostRef, const ARAAudioModification *optionalModificationToClone) |
Override to return a custom subclass instance of ARAAudioModification. | |
virtual ARAPlaybackRegion * | doCreatePlaybackRegion (ARAAudioModification *modification, ARA::ARAPlaybackRegionHostRef hostRef) |
Override to return a custom subclass instance of ARAPlaybackRegion. | |
This class contains the customisation points for the JUCE provided ARA document controller implementation.
Every ARA enabled plugin must provide its own document controller implementation. To do this, inherit from this class, and override its protected methods as needed. Then you need to implement a global function somewhere in your module called createARAFactory(). This function must return an ARAFactory* that will instantiate document controller objects using your specialisation. There are helper functions inside ARADocumentControllerSpecialisation, so the implementation of createARAFactory() can always be a simple one-liner. For example
Most member functions have a default implementation so you can build up your required feature set gradually. The protected functions of this class fall in three distinct groups:
On top of the pure virtual functions, you will probably want to override doCreatePlaybackRenderer() at the very least if you want your plugin to play any sound. This function belongs to the first group.
If your plugin has analysis capabilities and wants to allow the host to access these, functions in the second group should be overridden.
The default implementation of the ARA model object classes - i.e. ARADocument, ARAMusicalContext, ARARegionSequence, ARAAudioSource, ARAAudioModification, ARAPlaybackRegion - should be sufficient for maintaining a representation of the ARA model graph, hence overriding the model object creation functions e.g. doCreateMusicalContext() is considered an advanced use case. Hence you should be able to get a lot done without overriding functions in the third group.
In order to react to the various ARA state changes you can override any of the ARA model object Listener functions that ARADocumentControllerSpecialisation inherits from. Such listener functions can be attached to one particular model objects instance, but the listener functions inside ARADocumentControllerSpecialisation will respond to the events of all instances of the model objects.
ARADocumentControllerSpecialisation::ARADocumentControllerSpecialisation | ( | const ARA::PlugIn::PlugInEntry * | entry, |
const ARA::ARADocumentControllerHostInstance * | instance ) |
Constructor.
Used internally by the ARAFactory implementation.
|
virtual |
Destructor.
|
noexcept |
Returns the underlying DocumentController object that references this specialisation.
|
static |
Helper function for implementing the global createARAFactory() function.
For example
References createARAFactory().
Referenced by createARAFactory().
|
static |
Returns a pointer to the ARADocumentControllerSpecialisation instance that is referenced by the provided DocumentController.
You can use this function to access your specialisation from anywhere where you have access to ARA::PlugIn::DocumentController*.
DocumentType * ARADocumentControllerSpecialisation::getDocument | ( | ) |
Returns a pointer to the ARA document root maintained by this document controller.
|
protectedpure virtual |
Read an ARADocument archive from a juce::InputStream.
input | Data stream containing previously persisted data to be used when restoring the ARADocument |
filter | A filter to be applied to the stream |
Return true if the operation is successful.
|
protectedpure virtual |
Write an ARADocument archive to a juce::OutputStream.
output | Data stream that should be used to write the persistent ARADocument data |
filter | A filter to be applied to the stream |
Returns true if the operation is successful.
|
protectedvirtual |
Override to return a custom subclass instance of ARAPlaybackRenderer.
|
protectedvirtual |
Override to return a custom subclass instance of ARAEditorRenderer.
|
protectedvirtual |
Override to return a custom subclass instance of ARAEditorView.
|
protectedvirtual |
Override to implement isAudioSourceContentAvailable() for all your supported content types - the default implementation always returns false, preventing any calls to doGetAudioSourceContentGrade() and doCreateAudioSourceContentReader().
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doIsAudioSourceContentAvailable.
|
protectedvirtual |
Override to implement getAudioSourceContentGrade() for all your supported content types.
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doGetAudioSourceContentGrade.
|
protectedvirtual |
Override to implement createAudioSourceContentReader() for all your supported content types, returning a custom subclass instance of ContentReader providing data of the requested type.
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doCreateAudioSourceContentReader.
|
protectedvirtual |
Override to implement isAudioModificationContentAvailable() for all your supported content types - the default implementation always returns false.
For read-only data directly inherited from the underlying audio source you can just delegate the call to the audio source, but user-editable modification data must be specifically handled here.
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doIsAudioModificationContentAvailable.
|
protectedvirtual |
Override to implement getAudioModificationContentGrade() for all your supported content types.
For read-only data directly inherited from the underlying audio source you can just delegate the call to the audio source, but user-editable modification data must be specifically handled here.
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doGetAudioModificationContentGrade.
|
protectedvirtual |
Override to implement createAudioModificationContentReader() for all your supported content types, returning a custom subclass instance of ContentReader providing data of the requested type
.
For read-only data directly inherited from the underlying audio source you can just delegate the call to the audio source, but user-editable modification data must be specifically handled here.
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doCreateAudioModificationContentReader.
|
protectedvirtual |
Override to implement isPlaybackRegionContentAvailable() for all your supported content types - the default implementation always returns false.
Typically, this call can directly delegate to the underlying audio modification, since most plug-ins will apply their modification data to the playback region with a transformation that does not affect content availability.
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doIsPlaybackRegionContentAvailable.
|
protectedvirtual |
Override to implement getPlaybackRegionContentGrade() for all your supported content types.
Typically, this call can directly delegate to the underlying audio modification, since most plug-ins will apply their modification data to the playback region with a transformation that does not affect content grade.
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doGetPlaybackRegionContentGrade.
|
protectedvirtual |
Override to implement createPlaybackRegionContentReader() for all your supported content types, returning a custom subclass instance of ContentReader providing data of the requested type.
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doCreatePlaybackRegionContentReader.
|
protectedvirtual |
Override to implement getPlaybackRegionHeadAndTailTime().
This function is called within ARA::PlugIn::DocumentControllerDelegate::doGetPlaybackRegionHeadAndTailTime.
|
protectedvirtual |
Override to implement isAudioSourceContentAnalysisIncomplete().
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doIsAudioSourceContentAnalysisIncomplete.
|
protectedvirtual |
Override to implement requestAudioSourceContentAnalysis().
This function's called from ARA::PlugIn::DocumentControllerDelegate::doRequestAudioSourceContentAnalysis.
|
protectedvirtual |
Override to implement getProcessingAlgorithmsCount().
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doGetProcessingAlgorithmsCount.
|
protectedvirtual |
Override to implement getProcessingAlgorithmProperties().
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doGetProcessingAlgorithmProperties.
|
protectedvirtual |
Override to implement getProcessingAlgorithmForAudioSource().
This function's result is returned from ARA::PlugIn::DocumentControllerDelegate::doGetProcessingAlgorithmForAudioSource.
|
protectedvirtual |
Override to implement requestProcessingAlgorithmForAudioSource().
This function's called from ARA::PlugIn::DocumentControllerDelegate::doRequestProcessingAlgorithmForAudioSource.
|
protectedvirtual |
Override to return a custom subclass instance of ARADocument.
|
protectedvirtual |
Override to return a custom subclass instance of ARAMusicalContext.
|
protectedvirtual |
Override to return a custom subclass instance of ARARegionSequence.
|
protectedvirtual |
Override to return a custom subclass instance of ARAAudioSource.
|
protectedvirtual |
Override to return a custom subclass instance of ARAAudioModification.
|
protectedvirtual |
Override to return a custom subclass instance of ARAPlaybackRegion.