mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Add ARA support
This commit is contained in:
parent
6c2881ce30
commit
31b2a86559
31 changed files with 1021 additions and 68 deletions
|
|
@ -156,6 +156,9 @@ void Project::updateTitleDependencies()
|
|||
pluginAUExportPrefixValue.setDefault (build_tools::makeValidIdentifier (projectName, false, true, false) + "AU");
|
||||
pluginAAXIdentifierValue. setDefault (getDefaultAAXIdentifierString());
|
||||
pluginLV2URIValue. setDefault (getDefaultLV2URI());
|
||||
pluginARAFactoryIDValue. setDefault (getDefaultARAFactoryIDString());
|
||||
pluginARAArchiveIDValue. setDefault (getDefaultARADocumentArchiveID());
|
||||
pluginARACompatibleArchiveIDsValue.setDefault (getDefaultARACompatibleArchiveIDs());
|
||||
}
|
||||
|
||||
String Project::getDocumentTitle()
|
||||
|
|
@ -166,7 +169,10 @@ String Project::getDocumentTitle()
|
|||
void Project::updateCompanyNameDependencies()
|
||||
{
|
||||
bundleIdentifierValue.setDefault (getDefaultBundleIdentifierString());
|
||||
companyWebsiteValue.setDefault (getDefaultCompanyWebsiteString());
|
||||
pluginAAXIdentifierValue.setDefault (getDefaultAAXIdentifierString());
|
||||
pluginARAFactoryIDValue.setDefault (getDefaultARAFactoryIDString());
|
||||
pluginARAArchiveIDValue.setDefault (getDefaultARADocumentArchiveID());
|
||||
pluginManufacturerValue.setDefault (getDefaultPluginManufacturerString());
|
||||
|
||||
updateLicenseWarning();
|
||||
|
|
@ -273,7 +279,7 @@ void Project::initialiseProjectValues()
|
|||
|
||||
companyNameValue.referTo (projectRoot, Ids::companyName, getUndoManager());
|
||||
companyCopyrightValue.referTo (projectRoot, Ids::companyCopyright, getUndoManager());
|
||||
companyWebsiteValue.referTo (projectRoot, Ids::companyWebsite, getUndoManager());
|
||||
companyWebsiteValue.referTo (projectRoot, Ids::companyWebsite, getUndoManager(), getDefaultCompanyWebsiteString());
|
||||
companyEmailValue.referTo (projectRoot, Ids::companyEmail, getUndoManager());
|
||||
|
||||
projectTypeValue.referTo (projectRoot, Ids::projectType, getUndoManager(), build_tools::ProjectType_GUIApp::getTypeName());
|
||||
|
|
@ -329,6 +335,8 @@ void Project::initialiseAudioPluginValues()
|
|||
pluginCodeValue.referTo (projectRoot, Ids::pluginCode, getUndoManager(), makeValid4CC (getProjectUIDString() + getProjectUIDString()));
|
||||
pluginChannelConfigsValue.referTo (projectRoot, Ids::pluginChannelConfigs, getUndoManager());
|
||||
pluginAAXIdentifierValue.referTo (projectRoot, Ids::aaxIdentifier, getUndoManager(), getDefaultAAXIdentifierString());
|
||||
pluginARAFactoryIDValue.referTo (projectRoot, Ids::araFactoryID, getUndoManager(), getDefaultARAFactoryIDString());
|
||||
pluginARAArchiveIDValue.referTo (projectRoot, Ids::araDocumentArchiveID, getUndoManager(), getDefaultARADocumentArchiveID());
|
||||
pluginAUExportPrefixValue.referTo (projectRoot, Ids::pluginAUExportPrefix, getUndoManager(),
|
||||
build_tools::makeValidIdentifier (getProjectNameString(), false, true, false) + "AU");
|
||||
|
||||
|
|
@ -338,6 +346,11 @@ void Project::initialiseAudioPluginValues()
|
|||
pluginVST3CategoryValue.referTo (projectRoot, Ids::pluginVST3Category, getUndoManager(), getDefaultVST3Categories(), ",");
|
||||
pluginAAXCategoryValue.referTo (projectRoot, Ids::pluginAAXCategory, getUndoManager(), getDefaultAAXCategories(), ",");
|
||||
|
||||
pluginEnableARA.referTo (projectRoot, Ids::enableARA, getUndoManager(), shouldEnableARA(), ",");
|
||||
pluginARAAnalyzableContentValue.referTo (projectRoot, Ids::pluginARAAnalyzableContent, getUndoManager(), getDefaultARAContentTypes(), ",");
|
||||
pluginARATransformFlagsValue.referTo (projectRoot, Ids::pluginARATransformFlags, getUndoManager(), getDefaultARATransformationFlags(), ",");
|
||||
pluginARACompatibleArchiveIDsValue.referTo (projectRoot, Ids::araCompatibleArchiveIDs, getUndoManager(), getDefaultARACompatibleArchiveIDs());
|
||||
|
||||
pluginVSTNumMidiInputsValue.referTo (projectRoot, Ids::pluginVSTNumMidiInputs, getUndoManager(), 16);
|
||||
pluginVSTNumMidiOutputsValue.referTo (projectRoot, Ids::pluginVSTNumMidiOutputs, getUndoManager(), 16);
|
||||
|
||||
|
|
@ -504,6 +517,24 @@ void Project::updatePluginCategories()
|
|||
pluginVSTCategoryValue.resetToDefault();
|
||||
}
|
||||
|
||||
{
|
||||
const auto araAnalyzableContent = projectRoot.getProperty (Ids::pluginARAAnalyzableContent, {}).toString();
|
||||
|
||||
if (getAllARAContentTypeVars().contains (araAnalyzableContent))
|
||||
pluginARAAnalyzableContentValue = araAnalyzableContent;
|
||||
else if (getAllARAContentTypeStrings().contains (araAnalyzableContent))
|
||||
pluginARAAnalyzableContentValue = Array<var> (getAllARAContentTypeVars()[getAllARAContentTypeStrings().indexOf (araAnalyzableContent)]);
|
||||
}
|
||||
|
||||
{
|
||||
const auto araTransformationFlags = projectRoot.getProperty (Ids::pluginARATransformFlags, {}).toString();
|
||||
|
||||
if (getAllARATransformationFlagVars().contains (araTransformationFlags))
|
||||
pluginARATransformFlagsValue = araTransformationFlags;
|
||||
else if (getAllARATransformationFlagStrings().contains (araTransformationFlags))
|
||||
pluginARATransformFlagsValue = Array<var> (getAllARATransformationFlagVars()[getAllARATransformationFlagStrings().indexOf (araTransformationFlags)]);
|
||||
}
|
||||
|
||||
{
|
||||
auto auMainType = projectRoot.getProperty (Ids::pluginAUMainType, {}).toString();
|
||||
|
||||
|
|
@ -1081,6 +1112,9 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope
|
|||
pluginVSTCategoryValue.setDefault (getDefaultVSTCategories());
|
||||
pluginVST3CategoryValue.setDefault (getDefaultVST3Categories());
|
||||
pluginAAXCategoryValue.setDefault (getDefaultAAXCategories());
|
||||
pluginEnableARA.setDefault (getDefaultEnableARA());
|
||||
pluginARAAnalyzableContentValue.setDefault (getDefaultARAContentTypes());
|
||||
pluginARATransformFlagsValue.setDefault (getDefaultARATransformationFlags());
|
||||
|
||||
if (shouldWriteLegacyPluginCharacteristicsSettings)
|
||||
writeLegacyPluginCharacteristicsSettings();
|
||||
|
|
@ -1427,14 +1461,23 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
|
|||
|
||||
void Project::createAudioPluginPropertyEditors (PropertyListBuilder& props)
|
||||
{
|
||||
props.add (new MultiChoicePropertyComponent (pluginFormatsValue, "Plugin Formats",
|
||||
{ "VST3", "AU", "AUv3", "AAX", "Standalone", "LV2", "Unity", "Enable IAA", "VST (Legacy)" },
|
||||
{ Ids::buildVST3.toString(), Ids::buildAU.toString(), Ids::buildAUv3.toString(),
|
||||
Ids::buildAAX.toString(), Ids::buildStandalone.toString(),
|
||||
Ids::buildLV2.toString(), Ids::buildUnity.toString(), Ids::enableIAA.toString(), Ids::buildVST.toString() }),
|
||||
"Plugin formats to build. If you have selected \"VST (Legacy)\" then you will need to ensure that you have a VST2 SDK "
|
||||
"in your header search paths. The VST2 SDK can be obtained from the vstsdk3610_11_06_2018_build_37 (or older) VST3 SDK "
|
||||
"or JUCE version 5.3.2. You also need a VST2 license from Steinberg to distribute VST2 plug-ins.");
|
||||
{
|
||||
StringArray pluginFormatChoices { "VST3", "AU", "AUv3", "AAX", "Standalone", "LV2", "Unity", "Enable IAA", "VST (Legacy)" };
|
||||
Array<var> pluginFormatChoiceValues { Ids::buildVST3.toString(), Ids::buildAU.toString(), Ids::buildAUv3.toString(),
|
||||
Ids::buildAAX.toString(), Ids::buildStandalone.toString(),
|
||||
Ids::buildLV2.toString(), Ids::buildUnity.toString(), Ids::enableIAA.toString(), Ids::buildVST.toString() };
|
||||
if (! getProjectType().isARAAudioPlugin())
|
||||
{
|
||||
pluginFormatChoices.add ("Enable ARA");
|
||||
pluginFormatChoiceValues.add (Ids::enableARA.toString());
|
||||
}
|
||||
props.add (new MultiChoicePropertyComponent (pluginFormatsValue, "Plugin Formats", pluginFormatChoices, pluginFormatChoiceValues),
|
||||
"Plugin formats to build. If you have selected \"VST (Legacy)\" then you will need to ensure that you have a VST2 SDK "
|
||||
"in your header search paths. The VST2 SDK can be obtained from the vstsdk3610_11_06_2018_build_37 (or older) VST3 SDK "
|
||||
"or JUCE version 5.3.2. You also need a VST2 license from Steinberg to distribute VST2 plug-ins. If you enable ARA you "
|
||||
"will have to obtain the ARA SDK by recursively cloning https://github.com/Celemony/ARA_SDK and checking out the tag "
|
||||
"releases/2.1.0.");
|
||||
}
|
||||
props.add (new MultiChoicePropertyComponent (pluginCharacteristicsValue, "Plugin Characteristics",
|
||||
{ "Plugin is a Synth", "Plugin MIDI Input", "Plugin MIDI Output", "MIDI Effect Plugin", "Plugin Editor Requires Keyboard Focus",
|
||||
"Disable AAX Bypass", "Disable AAX Multi-Mono" },
|
||||
|
|
@ -1515,6 +1558,25 @@ void Project::createAudioPluginPropertyEditors (PropertyListBuilder& props)
|
|||
"This acts as a unique identifier for this plugin. "
|
||||
"If you make any incompatible changes to your plugin (remove parameters, reorder parameters, change preset format etc.) "
|
||||
"you MUST change this value. LV2 hosts will assume that any plugins with the same URI are interchangeable.");
|
||||
|
||||
if (shouldEnableARA())
|
||||
{
|
||||
props.add (new MultiChoicePropertyComponent (pluginARAAnalyzableContentValue, "Plugin ARA Analyzeable Content Types", getAllARAContentTypeStrings(), getAllARAContentTypeVars()),
|
||||
"ARA Analyzeable Content Types.");
|
||||
|
||||
props.add (new MultiChoicePropertyComponent (pluginARATransformFlagsValue, "Plugin ARA Transformation Flags", getAllARATransformationFlagStrings(), getAllARATransformationFlagVars()),
|
||||
"ARA Transformation Flags.");
|
||||
|
||||
props.add (new TextPropertyComponent (pluginARAFactoryIDValue, "Plugin ARA Factory ID", 256, false),
|
||||
"ARA Factory ID.");
|
||||
|
||||
props.add (new TextPropertyComponent (pluginARAArchiveIDValue, "Plugin ARA Document Archive ID", 256, false),
|
||||
"ARA Document Archive ID.");
|
||||
|
||||
props.add (new TextPropertyComponent (pluginARACompatibleArchiveIDsValue, "Plugin ARA Compatible Document Archive IDs", 1024, true),
|
||||
"List of compatible ARA Document Archive IDs - one per line");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -2110,11 +2172,31 @@ String Project::getDefaultBundleIdentifierString() const
|
|||
+ "." + build_tools::makeValidIdentifier (getProjectNameString(), false, true, false);
|
||||
}
|
||||
|
||||
String Project::getDefaultCompanyWebsiteString() const
|
||||
{
|
||||
return "www." + build_tools::makeValidIdentifier (getCompanyNameOrDefault (getCompanyNameString()), false, true, false) + ".com";
|
||||
}
|
||||
|
||||
String Project::getDefaultPluginManufacturerString() const
|
||||
{
|
||||
return getCompanyNameOrDefault (getCompanyNameString());
|
||||
}
|
||||
|
||||
String Project::getDefaultARAFactoryIDString() const
|
||||
{
|
||||
return getDefaultBundleIdentifierString() + ".factory";
|
||||
}
|
||||
|
||||
String Project::getDefaultARADocumentArchiveID() const
|
||||
{
|
||||
return getDefaultBundleIdentifierString() + ".aradocumentarchive." + getVersionString();
|
||||
}
|
||||
|
||||
String Project::getDefaultARACompatibleArchiveIDs() const
|
||||
{
|
||||
return String();
|
||||
}
|
||||
|
||||
String Project::getAUMainTypeString() const noexcept
|
||||
{
|
||||
auto v = pluginAUMainTypeValue.get();
|
||||
|
|
@ -2222,6 +2304,32 @@ String Project::getIAAPluginName() const
|
|||
return s;
|
||||
}
|
||||
|
||||
int Project::getARAContentTypes() const noexcept
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
if (auto* arr = pluginARAAnalyzableContentValue.get().getArray())
|
||||
{
|
||||
for (auto c : *arr)
|
||||
res |= (int) c;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
int Project::getARATransformationFlags() const noexcept
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
if (auto* arr = pluginARATransformFlagsValue.get().getArray())
|
||||
{
|
||||
for (auto c : *arr)
|
||||
res |= (int) c;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
bool Project::isAUPluginHost()
|
||||
{
|
||||
|
|
@ -2243,6 +2351,16 @@ bool Project::isLV2PluginHost()
|
|||
return getEnabledModules().isModuleEnabled ("juce_audio_processors") && isConfigFlagEnabled ("JUCE_PLUGINHOST_LV2", false);
|
||||
}
|
||||
|
||||
bool Project::isARAPluginHost()
|
||||
{
|
||||
return (isVST3PluginHost() || isAUPluginHost()) && isConfigFlagEnabled ("JUCE_PLUGINHOST_ARA", false);
|
||||
}
|
||||
|
||||
void Project::disableStandaloneForARAPlugIn()
|
||||
{
|
||||
pluginFormatsValue.referTo (projectRoot, Ids::pluginFormats, getUndoManager(), Array<var> (Ids::buildVST3.toString(), Ids::buildAU.toString()), ",");
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
StringArray Project::getAllAUMainTypeStrings() noexcept
|
||||
{
|
||||
|
|
@ -2332,6 +2450,67 @@ Array<var> Project::getDefaultAAXCategories() const noexcept
|
|||
return getAllAAXCategoryVars()[getAllAAXCategoryStrings().indexOf ("AAX_ePlugInCategory_None")];
|
||||
}
|
||||
|
||||
bool Project::getDefaultEnableARA() const noexcept
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
StringArray Project::getAllARAContentTypeStrings() noexcept
|
||||
{
|
||||
static StringArray araContentTypes { "Notes",
|
||||
"Tempo Entries",
|
||||
"Bar Signatures",
|
||||
"Static Tuning",
|
||||
"Dynamic Tuning Offsets",
|
||||
"Key Signatures",
|
||||
"Sheet Chords" };
|
||||
return araContentTypes;
|
||||
}
|
||||
|
||||
Array<var> Project::getAllARAContentTypeVars() noexcept
|
||||
{
|
||||
static Array<var> araContentVars {
|
||||
/*kARAContentTypeNotes =*/ 1 << 0,
|
||||
/*kARAContentTypeTempoEntries =*/ 1 << 1,
|
||||
/*kARAContentTypeBarSignatures =*/ 1 << 2,
|
||||
/*kARAContentTypeStaticTuning =*/ 1 << 3,
|
||||
/*kARAContentTypeDynamicTuningOffsets =*/ 1 << 4,
|
||||
/*kARAContentTypeKeySignatures =*/ 1 << 5,
|
||||
/*kARAContentTypeSheetChords =*/ 1 << 6,
|
||||
};
|
||||
return araContentVars;
|
||||
}
|
||||
|
||||
Array<var> Project::getDefaultARAContentTypes() const noexcept
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
StringArray Project::getAllARATransformationFlagStrings() noexcept
|
||||
{
|
||||
static StringArray araTransformationFlags { "Time Stretch",
|
||||
"Time Stretch (reflecting tempo)",
|
||||
"Content Based Fades At Tail",
|
||||
"Content Based Fades At Head" };
|
||||
return araTransformationFlags;
|
||||
}
|
||||
|
||||
Array<var> Project::getAllARATransformationFlagVars() noexcept
|
||||
{
|
||||
static Array<var> araContentVars {
|
||||
/*kARAPlaybackTransformationTimestretch =*/ 1 << 0,
|
||||
/*kARAPlaybackTransformationTimestretchReflectingTempo =*/ 1 << 1,
|
||||
/*kARAPlaybackTransformationContentBasedFadesAtTail =*/ 1 << 2,
|
||||
/*kARAPlaybackTransformationContentBasedFadesAtHead =*/ 1 << 3
|
||||
};
|
||||
return araContentVars;
|
||||
}
|
||||
|
||||
Array<var> Project::getDefaultARATransformationFlags() const noexcept
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
EnabledModulesList& Project::getEnabledModules()
|
||||
{
|
||||
|
|
@ -2587,6 +2766,7 @@ StringPairArray Project::getAudioPluginFlags() const
|
|||
flags.set ("JucePlugin_Build_Unity", boolToString (shouldBuildUnityPlugin()));
|
||||
flags.set ("JucePlugin_Build_LV2", boolToString (shouldBuildLV2()));
|
||||
flags.set ("JucePlugin_Enable_IAA", boolToString (shouldEnableIAA()));
|
||||
flags.set ("JucePlugin_Enable_ARA", boolToString (shouldEnableARA()));
|
||||
flags.set ("JucePlugin_Name", toStringLiteral (getPluginNameString()));
|
||||
flags.set ("JucePlugin_Desc", toStringLiteral (getPluginDescriptionString()));
|
||||
flags.set ("JucePlugin_Manufacturer", toStringLiteral (getPluginManufacturerString()));
|
||||
|
|
@ -2622,6 +2802,11 @@ StringPairArray Project::getAudioPluginFlags() const
|
|||
flags.set ("JucePlugin_IAAName", toStringLiteral (getIAAPluginName()));
|
||||
flags.set ("JucePlugin_VSTNumMidiInputs", getVSTNumMIDIInputsString());
|
||||
flags.set ("JucePlugin_VSTNumMidiOutputs", getVSTNumMIDIOutputsString());
|
||||
flags.set ("JucePlugin_ARAContentTypes", String (getARAContentTypes()));
|
||||
flags.set ("JucePlugin_ARATransformationFlags", String (getARATransformationFlags()));
|
||||
flags.set ("JucePlugin_ARAFactoryID", toStringLiteral(getARAFactoryIDString()));
|
||||
flags.set ("JucePlugin_ARADocumentArchiveID", toStringLiteral(getARADocumentArchiveIDString()));
|
||||
flags.set ("JucePlugin_ARACompatibleArchiveIDs", toStringLiteral(getARACompatibleArchiveIDStrings()));
|
||||
|
||||
{
|
||||
String plugInChannelConfig = getPluginChannelConfigsString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue