Support for writing and hosting ARA enabled plugins is now out on the preview branch.
Plugins with ARA capabilities enabled can communicate with ARA enabled hosts to gain “offline” access to a lot of information about the DAW project that they are a part of, including random access to all the audio source data.
1. Getting the SDK and enabling it in JUCE
In order to use the ARA features in JUCE you have to obtain the 2.1.0 version of the ARA_SDK separately. The easiest way to do this is to use the following git command, which will check out the SDK into the ARA_SDK directory.
git clone --recursive --branch releases/2.1.0 https://github.com/Celemony/ARA_SDK
Then you need to specify the SDK path in either
- CMake: use the
juce_set_ara_sdk_path
function in your CMakeLists file,
- or the Projucer: add the path to the Global Paths settings.
If you are building the examples and extras with CMake from the JUCE repo directory, you can also specify the -DJUCE_GLOBAL_ARA_SDK_PATH=/your/path/to/ARA_SDK
parameter to CMake to enable ARA.
2. Building the AudioPluginHost with ARA
The AudioPluginHost now has simple ARA hosting capabilities, but you need to explicitly enable this support. You can do this in the following ways
- CMake: set
JUCE_PLUGINHOST_ARA=1
inside AudioPluginHost/CMakeLists.txt
- Projucer: after opening
AudioPluginHost.jucer
go to Modules → juce_audio_processors and enable the JUCE_PLUGINHOST_ARA setting.
ARA capable plugins will now have two entries in the Create plugin menu, and the one saying (ARA) will activate additional ARA features. If you right click on the plugin in the graph, you can use the “Show ARA host control” item to assign an audio file that the plugin can read through the ARA interfaces.
3. Building the ARAPluginDemo
If you are using CMake and provide the -DJUCE_BUILD_EXAMPLES=ON -DJUCE_GLOBAL_ARA_SDK_PATH=/your/path/to/ARA_SDK
options to CMake, then you should be able to build the enabled ARAPluginDemo target.
You can also open the Plugins/ARAPluginDemo example in the Projucer.
4. Getting to know ARA
ARA provides an extensive API that allows you to exchange information with the host in completely new ways. To understand the basics and to build up your knowledge it’s best to read the official ARA documentation, which has approachable introductory sections. You can find the documentation in the SDK directory at ARA_SDK/ARA_Library/html_docs/index.html.
5. Adding ARA features to existing plugins
- CMake: add the property
IS_ARA_EFFECT TRUE
to your juce_add_plugin
call.
- Projucer: check the Enable ARA option in the Plugin Formats settings. ARA is an extension to VST3 and AU plugins, hence you need to have at least one of those options enabled too for valid build targets.
In addition to the createPluginFilter()
function that is needed for all audio plugins, you will now need to provide an implementation to the createARAFactory()
function as well. You can do this by inheriting from juce::ARADocumentControllerSpecialisation
and using its helper function. The class documentation should make this clear by also providing an example. You can also find an example in the ARAPluginDemo.