TracktionEngine
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
engine::ARAFileReader Class Reference

Manages an ARA plugin instance for an audio clip. More...

#include <tracktion_ARAFileReader.h>

Inherits juce::ReferenceCountedObject, and juce::ChangeBroadcaster.

Classes

struct  ARAChunkInfo
 Parsed info from an ARA audio file chunk embedded in iXML. More...
 

Public Types

using Ptr = juce::ReferenceCountedObjectPtr< ARAFileReader >
 

Public Member Functions

 ARAFileReader (Edit &, AudioClipBase &)
 
 ARAFileReader (Edit &, AudioClipBase &, ARAFileReader &oneToClone)
 
 ~ARAFileReader ()
 
bool isValid () const noexcept
 
ExternalPlugingetPlugin ()
 
void showPluginWindow ()
 
void hidePluginWindow ()
 
void notifyViewSelection ()
 Sends the clip's playback regions and region sequence as the current view selection to every instance bound to the same document whose plugin UI is currently showing (other clips' instances and e.g.
 
int getNumPlaybackRegions () const
 Returns the number of ARA playback regions currently created for the clip (one per loop repeat for looping clips).
 
bool isAnalysingContent ()
 
juce::MidiMessageSequence getAnalysedMIDISequence ()
 
void sourceClipChanged ()
 
void contentHasChanged ()
 Notifies that the ARA content has changed (e.g.
 
juce::MemoryBlock storeARAArchiveForCopy ()
 Store a partial ARA archive of this clip's plugin edits for copy/paste.
 
void restoreARAArchiveForPaste (const juce::MemoryBlock &data, const juce::String &archivedSourceID, const juce::String &archivedModID, const juce::String &documentArchiveID={})
 Restore a partial ARA archive into this clip after paste.
 
juce::String getAudioSourcePersistentID () const
 Returns the persistent ID of the current audio source, or empty if ARA is not active.
 
juce::String getAudioModificationPersistentID () const
 Returns the persistent ID of the current audio modification, or empty if ARA is not active.
 
juce::String getDocumentArchiveID () const
 Returns the document archive ID from the ARA factory, or empty if ARA is not active.
 
TimeDuration getHead () const
 Returns extra time before the playback region start reported by the ARA plugin.
 
TimeDuration getTail () const
 Returns extra time after the playback region end reported by the ARA plugin.
 
juce::CriticalSection & getProcessLock () noexcept
 Serialises audio-thread rendering of the plugin against message-thread renderer deactivation (ARA playback-region changes require the plugin to not be in render-state).
 

Static Public Member Functions

static void cleanUpOnShutdown ()
 
static juce::String readRawIXMLFromSourceFile (const juce::File &)
 Reads the raw iXML chunk from a WAV or AIFF file.
 
static juce::Array< ARAChunkInfoparseARAAudioFileChunksFromIXML (const juce::String &ixmlString)
 Parses ARA audio file chunks from a raw iXML string.
 
static juce::PluginDescription findPluginForARAArchiveID (Engine &, const juce::String &archiveID, const juce::String &suggestedPlugInName={})
 Finds an installed ARA plugin whose factory matches the given archive ID.
 

Detailed Description

Manages an ARA plugin instance for an audio clip.

This class handles the ARA (Audio Random Access) integration, allowing plugins like Melodyne to provide advanced audio analysis and manipulation.

Member Typedef Documentation

◆ Ptr

using engine::ARAFileReader::Ptr = juce::ReferenceCountedObjectPtr<ARAFileReader>

Constructor & Destructor Documentation

◆ ARAFileReader() [1/2]

engine::ARAFileReader::ARAFileReader ( Edit ,
AudioClipBase  
)

◆ ARAFileReader() [2/2]

engine::ARAFileReader::ARAFileReader ( Edit ,
AudioClipBase ,
ARAFileReader oneToClone 
)

◆ ~ARAFileReader()

engine::ARAFileReader::~ARAFileReader ( )

Member Function Documentation

◆ cleanUpOnShutdown()

static void engine::ARAFileReader::cleanUpOnShutdown ( )
static

◆ readRawIXMLFromSourceFile()

static juce::String engine::ARAFileReader::readRawIXMLFromSourceFile ( const juce::File &  )
static

Reads the raw iXML chunk from a WAV or AIFF file.

◆ parseARAAudioFileChunksFromIXML()

static juce::Array< ARAChunkInfo > engine::ARAFileReader::parseARAAudioFileChunksFromIXML ( const juce::String &  ixmlString)
static

Parses ARA audio file chunks from a raw iXML string.

◆ findPluginForARAArchiveID()

static juce::PluginDescription engine::ARAFileReader::findPluginForARAArchiveID ( Engine ,
const juce::String &  archiveID,
const juce::String &  suggestedPlugInName = {} 
)
static

Finds an installed ARA plugin whose factory matches the given archive ID.

If suggestedPlugInName is given (e.g. from an ARA audio file chunk), only plugins with that name are considered - this avoids loading the module of every installed ARA plugin just to compare archive IDs.

◆ isValid()

bool engine::ARAFileReader::isValid ( ) const
noexcept

◆ getPlugin()

ExternalPlugin * engine::ARAFileReader::getPlugin ( )

◆ showPluginWindow()

void engine::ARAFileReader::showPluginWindow ( )

◆ hidePluginWindow()

void engine::ARAFileReader::hidePluginWindow ( )

◆ notifyViewSelection()

void engine::ARAFileReader::notifyViewSelection ( )

Sends the clip's playback regions and region sequence as the current view selection to every instance bound to the same document whose plugin UI is currently showing (other clips' instances and e.g.

the browser panel instance). Call when the arrangement selection changes so open plugin UIs can follow it.

◆ getNumPlaybackRegions()

int engine::ARAFileReader::getNumPlaybackRegions ( ) const

Returns the number of ARA playback regions currently created for the clip (one per loop repeat for looping clips).

◆ isAnalysingContent()

bool engine::ARAFileReader::isAnalysingContent ( )

◆ getAnalysedMIDISequence()

juce::MidiMessageSequence engine::ARAFileReader::getAnalysedMIDISequence ( )

◆ sourceClipChanged()

void engine::ARAFileReader::sourceClipChanged ( )

◆ contentHasChanged()

void engine::ARAFileReader::contentHasChanged ( )

Notifies that the ARA content has changed (e.g.

notes edited in Melodyne). This re-reads the content and broadcasts a change message.

◆ storeARAArchiveForCopy()

juce::MemoryBlock engine::ARAFileReader::storeARAArchiveForCopy ( )

Store a partial ARA archive of this clip's plugin edits for copy/paste.

Returns an empty MemoryBlock if ARA is not active.

◆ restoreARAArchiveForPaste()

void engine::ARAFileReader::restoreARAArchiveForPaste ( const juce::MemoryBlock &  data,
const juce::String &  archivedSourceID,
const juce::String &  archivedModID,
const juce::String &  documentArchiveID = {} 
)

Restore a partial ARA archive into this clip after paste.

Parameters
dataThe archive data (from storeARAArchiveForCopy)
archivedSourceIDThe audio source persistent ID from when the archive was created
archivedModIDThe audio modification persistent ID from when the archive was created

◆ getAudioSourcePersistentID()

juce::String engine::ARAFileReader::getAudioSourcePersistentID ( ) const

Returns the persistent ID of the current audio source, or empty if ARA is not active.

◆ getAudioModificationPersistentID()

juce::String engine::ARAFileReader::getAudioModificationPersistentID ( ) const

Returns the persistent ID of the current audio modification, or empty if ARA is not active.

◆ getDocumentArchiveID()

juce::String engine::ARAFileReader::getDocumentArchiveID ( ) const

Returns the document archive ID from the ARA factory, or empty if ARA is not active.

◆ getHead()

TimeDuration engine::ARAFileReader::getHead ( ) const

Returns extra time before the playback region start reported by the ARA plugin.

◆ getTail()

TimeDuration engine::ARAFileReader::getTail ( ) const

Returns extra time after the playback region end reported by the ARA plugin.

◆ getProcessLock()

juce::CriticalSection & engine::ARAFileReader::getProcessLock ( )
noexcept

Serialises audio-thread rendering of the plugin against message-thread renderer deactivation (ARA playback-region changes require the plugin to not be in render-state).

The audio thread try-locks this and outputs silence if held.


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