-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in VSTSDK/vst3_dev_portal from main to deploy * commit 'c10808fd665886dc9582420a9f523da5c5fe25c2': (38 commits) [update] doc + bitmap [update] doc [update] cleanup cmake parameters [update] cleanup cmake parameters [update] add missing toc + update cmake parameters [update] date [update] VST3 host [update] license [update] doc [update] replace string [update] doc [update] doc [update] doc [update] doc [update] doc [fix] optional param and link conflict Squashed 'src/.vst3_tutorials/' changes from 0a00e15..cb34a71 doc Revert "[update] doc" [update] doc ...
- Loading branch information
Showing
99 changed files
with
1,609 additions
and
454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
cmake_minimum_required(VERSION 3.14.0) | ||
|
||
option(SMTG_ENABLE_VST3_PLUGIN_EXAMPLES "Enable VST 3 Plug-in Examples" OFF) | ||
option(SMTG_ENABLE_VST3_HOSTING_EXAMPLES "Enable VST 3 Hosting Examples" OFF) | ||
|
||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "") | ||
|
||
set(vst3sdk_SOURCE_DIR "../../") | ||
if(NOT vst3sdk_SOURCE_DIR) | ||
message(FATAL_ERROR "Path to VST3 SDK is empty!") | ||
endif() | ||
|
||
project(VST3_AU_PlugIn | ||
# This is your plug-in version number. Change it here only. | ||
# Version number symbols usable in C++ can be found in | ||
# source/version.h and ${PROJECT_BINARY_DIR}/projectversion.h. | ||
VERSION 1.2.1.8 | ||
DESCRIPTION "VST3_AU_PlugIn VST 3 Plug-in" | ||
) | ||
|
||
# -- AudioUnitSDK -- | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
AudioUnitSDK | ||
GIT_REPOSITORY https://github.com/apple/AudioUnitSDK.git | ||
GIT_TAG HEAD | ||
) | ||
FetchContent_MakeAvailable(AudioUnitSDK) | ||
FetchContent_GetProperties( | ||
AudioUnitSDK | ||
SOURCE_DIR SMTG_AUDIOUNIT_SDK_PATH | ||
) | ||
# ------------------- | ||
|
||
set(SMTG_VSTGUI_ROOT "${vst3sdk_SOURCE_DIR}") | ||
|
||
add_subdirectory(${vst3sdk_SOURCE_DIR} ${PROJECT_BINARY_DIR}/vst3sdk) | ||
smtg_enable_vst3_sdk() | ||
|
||
smtg_add_vst3plugin(VST3_AU_PlugIn | ||
source/version.h | ||
source/cids.h | ||
source/processor.h | ||
source/processor.cpp | ||
source/controller.h | ||
source/controller.cpp | ||
source/entry.cpp | ||
) | ||
|
||
#- VSTGUI Wanted ---- | ||
if(SMTG_ENABLE_VSTGUI_SUPPORT) | ||
target_sources(VST3_AU_PlugIn | ||
PRIVATE | ||
resource/editor.uidesc | ||
) | ||
target_link_libraries(VST3_AU_PlugIn | ||
PRIVATE | ||
vstgui_support | ||
) | ||
smtg_target_add_plugin_resources(VST3_AU_PlugIn | ||
RESOURCES | ||
"resource/editor.uidesc" | ||
) | ||
endif(SMTG_ENABLE_VSTGUI_SUPPORT) | ||
# ------------------- | ||
|
||
smtg_target_add_plugin_snapshots (VST3_AU_PlugIn | ||
RESOURCES | ||
resource/301DF339AFA3533FB5053B1B41367137_snapshot.png | ||
resource/301DF339AFA3533FB5053B1B41367137_snapshot_2.0x.png | ||
) | ||
|
||
target_link_libraries(VST3_AU_PlugIn | ||
PRIVATE | ||
sdk | ||
) | ||
|
||
smtg_target_configure_version_file(VST3_AU_PlugIn) | ||
|
||
if(SMTG_MAC) | ||
smtg_target_set_bundle(VST3_AU_PlugIn | ||
BUNDLE_IDENTIFIER com.steinberg.vst3sdk.audiounit-tutorial | ||
COMPANY_NAME "Steinberg Media Technologies" | ||
) | ||
smtg_target_set_debug_executable(VST3_AU_PlugIn | ||
"/Applications/VST3PluginTestHost.app" | ||
"--pluginfolder;$(BUILT_PRODUCTS_DIR)" | ||
) | ||
elseif(SMTG_WIN) | ||
target_sources(VST3_AU_PlugIn PRIVATE | ||
resource/win32resource.rc | ||
) | ||
if(MSVC) | ||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT VST3_AU_PlugIn) | ||
|
||
smtg_target_set_debug_executable(VST3_AU_PlugIn | ||
"$(ProgramW6432)/Steinberg/VST3PluginTestHost/VST3PluginTestHost.exe" | ||
"--pluginfolder \"$(OutDir)/\"" | ||
) | ||
endif() | ||
endif(SMTG_MAC) | ||
|
||
# -- Add the AUv2 target | ||
if (SMTG_MAC AND XCODE AND SMTG_ENABLE_AUV2_BUILDS) | ||
list(APPEND CMAKE_MODULE_PATH "${vst3sdk_SOURCE_DIR}/cmake/modules") | ||
include(SMTG_AddVST3AuV2) | ||
smtg_target_add_auv2(VST3_AU_PlugIn_AU | ||
BUNDLE_NAME audiounit_tutorial | ||
BUNDLE_IDENTIFIER com.steinberg.vst3sdk.audiounit_tutorial.audiounit | ||
INFO_PLIST_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/resource/au-info.plist | ||
VST3_PLUGIN_TARGET VST3_AU_PlugIn) | ||
smtg_target_set_debug_executable(VST3_AU_PlugIn_AU "/Applications/Reaper.app") | ||
endif(SMTG_MAC AND XCODE AND SMTG_ENABLE_AUV2_BUILDS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# AudioUnit Version 2 Tutorial | ||
|
||
In this tutorial you will learn how to add AudioUnit Version 2 support to your **VST 3** plug-in. | ||
|
||
First of all, you need a **VST 3** plug-in project. For this tutorial we have generated one via the [VST 3 Project Generator](https://steinbergmedia.github.io/vst3_dev_portal/pages/What+is+the+VST+3+SDK/Project+Generator.html) from the SDK. | ||
|
||
# Adding the AudioUnit Version 2 Target | ||
|
||
## Obtaining the required AudioUnit SDK | ||
|
||
The *AudioUnit Version 2* target needs the official *AudioUnit SDK* from Apple. | ||
As of this writing you can find it on GitHub: [https://github.com/apple/AudioUnitSDK](https://github.com/apple/AudioUnitSDK) | ||
|
||
How you obtain and store the SDK is up to you, for the reproducibility of this tutorial, we will download it via *CMake* when generating the project. | ||
So we add the following text to the *CMakeLists.txt* directly before we include the **VST 3 SDK**. | ||
|
||
``` | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
AudioUnitSDK | ||
GIT_REPOSITORY https://github.com/apple/AudioUnitSDK.git | ||
GIT_TAG HEAD | ||
) | ||
FetchContent_MakeAvailable(AudioUnitSDK) | ||
FetchContent_GetProperties( | ||
AudioUnitSDK | ||
SOURCE_DIR SMTG_AUDIOUNIT_SDK_PATH | ||
) | ||
``` | ||
|
||
It is important to set the `SMTG_AUDIOUNIT_SDK_PATH` variable to tell the **VST 3 SDK** where to find the AudioUnit SDK. | ||
|
||
## Creating the property list | ||
|
||
For *AudioUnit Version 2* you need a manufacturer OSType registered with Apple. | ||
How to do this is out of the scope for this tutorial, please search the web on how this is done. | ||
|
||
Besides the manufacturer OSType you also need a subtype OSType which you can choose by yourself. | ||
Both the manufacturer and subtype account for the uniqueness of your *AudioUnit Version 2*. | ||
|
||
Now you can generate the required property list file: | ||
|
||
``` | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>BNDL</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>CSResourcesFileMapped</key> | ||
<string>yes</string> | ||
<key>AudioComponents</key> | ||
<array> | ||
<dict> | ||
<key>factoryFunction</key> | ||
<string>AUWrapperFactory</string> | ||
<key>description</key> | ||
<string>AudioUnit Tutorial</string> | ||
<key>manufacturer</key> | ||
<string>Stgb</string> | ||
<key>name</key> | ||
<string>Steinberg: AudioUnit Tutorial</string> | ||
<key>subtype</key> | ||
<string>0002</string> | ||
<key>type</key> | ||
<string>aufx</string> | ||
<key>version</key> | ||
<integer>1</integer> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> | ||
``` | ||
|
||
Make sure to change the strings for `description`, `manufacturer`, `name`, `subtype` and `type`. | ||
The type must be one of: | ||
- aufx (Audio Effect) | ||
- aumu (Instrument) | ||
- aumf (Audio Effect with MIDI Input/Output) | ||
|
||
If you build an audio effect you also need to add the supported channel layouts to the list: | ||
|
||
``` | ||
<key>AudioUnit SupportedNumChannels</key> | ||
<array> | ||
<dict> | ||
<key>Outputs</key> | ||
<string>2</string> | ||
<key>Inputs</key> | ||
<string>2</string> | ||
</dict> | ||
<dict> | ||
<key>Outputs</key> | ||
<string>2</string> | ||
<key>Inputs</key> | ||
<string>1</string> | ||
</dict> | ||
<dict> | ||
<key>Outputs</key> | ||
<string>1</string> | ||
<key>Inputs</key> | ||
<string>1</string> | ||
</dict> | ||
</array> | ||
``` | ||
|
||
Save it to a file called `au-info.plist` inside the resource directory. | ||
|
||
## Adding the AudioUnit Version 2 Target | ||
|
||
Now you can add the AudioUnit target to the end of your *CMakeLists.txt* file: | ||
|
||
``` | ||
if (SMTG_MAC AND XCODE AND SMTG_COREAUDIO_SDK_PATH) | ||
list(APPEND CMAKE_MODULE_PATH "${vst3sdk_SOURCE_DIR}/cmake/modules") | ||
include(SMTG_AddVST3AuV2) | ||
smtg_target_add_auv2(VST3_AU_PlugIn_AU | ||
BUNDLE_NAME audiounit_tutorial | ||
BUNDLE_IDENTIFIER com.steinberg.vst3sdk.audiounit_tutorial.audiounit | ||
INFO_PLIST_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/resource/au-info.plist | ||
VST3_PLUGIN_TARGET VST3_AU_PlugIn) | ||
smtg_target_set_debug_executable(VST3_AU_PlugIn_AU "/Applications/Reaper.app") | ||
endif(SMTG_MAC AND XCODE AND SMTG_COREAUDIO_SDK_PATH) | ||
``` | ||
|
||
Now after generating and building the project the "audiounit_tutorial" plug-in should be available in any AudioUnit host. |
Binary file added
BIN
+7.42 KB
...rials/audiounit-tutorial/resource/301DF339AFA3533FB5053B1B41367137_snapshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+21.2 KB
.../audiounit-tutorial/resource/301DF339AFA3533FB5053B1B41367137_snapshot_2.0x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions
64
src/.vst3_tutorials/audiounit-tutorial/resource/au-info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>BNDL</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>CSResourcesFileMapped</key> | ||
<string>yes</string> | ||
<key>AudioComponents</key> | ||
<array> | ||
<dict> | ||
<key>factoryFunction</key> | ||
<string>AUWrapperFactory</string> | ||
<key>description</key> | ||
<string>AudioUnit Tutorial</string> | ||
<key>manufacturer</key> | ||
<string>Stgb</string> | ||
<key>name</key> | ||
<string>Steinberg: AudioUnit Tutorial</string> | ||
<key>subtype</key> | ||
<string>0002</string> | ||
<key>type</key> | ||
<string>aufx</string> | ||
<key>version</key> | ||
<integer>1</integer> | ||
</dict> | ||
</array> | ||
<key>AudioUnit SupportedNumChannels</key> | ||
<array> | ||
<dict> | ||
<key>Outputs</key> | ||
<string>2</string> | ||
<key>Inputs</key> | ||
<string>2</string> | ||
</dict> | ||
<dict> | ||
<key>Outputs</key> | ||
<string>2</string> | ||
<key>Inputs</key> | ||
<string>1</string> | ||
</dict> | ||
<dict> | ||
<key>Outputs</key> | ||
<string>1</string> | ||
<key>Inputs</key> | ||
<string>1</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
9 changes: 9 additions & 0 deletions
9
src/.vst3_tutorials/audiounit-tutorial/resource/editor.uidesc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<vstgui-ui-description version="1"> | ||
<fonts> | ||
</fonts> | ||
<colors> | ||
</colors> | ||
<template background-color="~ BlackCColor" background-color-draw-style="filled and stroked" class="CViewContainer" mouse-enabled="true" name="view" opacity="1" origin="0, 0" size="300, 300" transparent="false" wants-focus="false"/> | ||
<bitmaps/> | ||
</vstgui-ui-description> |
44 changes: 44 additions & 0 deletions
44
src/.vst3_tutorials/audiounit-tutorial/resource/win32resource.rc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include <windows.h> | ||
#include "../source/version.h" | ||
|
||
#define APSTUDIO_READONLY_SYMBOLS | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// Version | ||
///////////////////////////////////////////////////////////////////////////// | ||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION MAJOR_VERSION_INT,SUB_VERSION_INT,RELEASE_NUMBER_INT,BUILD_NUMBER_INT | ||
PRODUCTVERSION MAJOR_VERSION_INT,SUB_VERSION_INT,RELEASE_NUMBER_INT,BUILD_NUMBER_INT | ||
FILEFLAGSMASK 0x3fL | ||
#ifdef _DEBUG | ||
FILEFLAGS 0x1L | ||
#else | ||
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS 0x40004L | ||
FILETYPE 0x1L | ||
FILESUBTYPE 0x0L | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040004e4" | ||
BEGIN | ||
VALUE "FileVersion", FULL_VERSION_STR"\0" | ||
VALUE "ProductVersion", FULL_VERSION_STR"\0" | ||
VALUE "OriginalFilename", stringOriginalFilename"\0" | ||
VALUE "FileDescription", stringFileDescription"\0" | ||
VALUE "InternalName", stringFileDescription"\0" | ||
VALUE "ProductName", stringFileDescription"\0" | ||
VALUE "CompanyName", stringCompanyName"\0" | ||
VALUE "LegalCopyright", stringLegalCopyright"\0" | ||
VALUE "LegalTrademarks", stringLegalTrademarks"\0" | ||
//VALUE "PrivateBuild", " \0" | ||
//VALUE "SpecialBuild", " \0" | ||
//VALUE "Comments", " \0" | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x400, 1252 | ||
END | ||
END |
Oops, something went wrong.