Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ SortIncludes: false
NamespaceIndentation: None
ReflowComments: false
AllowShortFunctionsOnASingleLine: None
DerivePointerAlignment: false
PointerAlignment: Right
---
Language: ObjC
Expand All @@ -31,5 +32,6 @@ SortIncludes: false
NamespaceIndentation: None
ReflowComments: false
AllowShortFunctionsOnASingleLine: None
DerivePointerAlignment: false
PointerAlignment: Right
...
25 changes: 13 additions & 12 deletions .github/workflows/pullreq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
include:
- os: windows-latest
- os: windows-2022
name: Windows External SDK (VST3.7.7)
vst_ver: v3.7.7_build_19
- os: macos-latest
Expand All @@ -23,7 +23,7 @@ jobs:
name: Linux External SDK (VST3.7.7)
vst_ver: v3.7.7_build_19

- os: windows-latest
- os: windows-2022
name: Windows External SDK (VST3.8.0)
vst_ver: v3.8.0_build_66
- os: macos-latest
Expand All @@ -43,6 +43,7 @@ jobs:
mkdir deps
cd deps
git clone https://github.com/free-audio/clap
git clone https://github.com/audiosdk/aax
git clone https://github.com/steinbergmedia/vst3sdk
cd vst3sdk
# temporary workaround, switch to vst3 sdk 3.7.7
Expand All @@ -52,7 +53,7 @@ jobs:

- name: Build project
run: |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCLAP_SDK_ROOT=deps/clap -DVST3_SDK_ROOT=deps/vst3sdk -DCLAP_WRAPPER_OUTPUT_NAME=testplug
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCLAP_SDK_ROOT=deps/clap -DVST3_SDK_ROOT=deps/vst3sdk -DAAX_SDK_ROOT=deps/aax -DCLAP_WRAPPER_OUTPUT_NAME=testplug
cmake --build ./build --config Debug

- name: Show Build Results
Expand All @@ -68,43 +69,43 @@ jobs:
strategy:
matrix:
include:
- os: windows-latest
- os: windows-2022
cmakeargs: -A x64
install_ninja: false
run_aptget: false
name: Windows 64bit MSVC

- os: windows-latest
- os: windows-2022
cmakeargs: -A x64 -T ClangCL -G"Visual Studio 17 2022"
install_ninja: false
run_aptget: false
name: Windows 64bit VS ClangCL

- os: windows-latest
- os: windows-2022
cmakeargs: -A arm64ec
install_ninja: false
run_aptget: false
name: Windows arm64ec MSVC

- os: windows-latest
- os: windows-2022
cmakeargs: -A arm64
install_ninja: false
run_aptget: false
name: Windows arm64 MSVC

- os: windows-latest
- os: windows-2022
cmakeargs: -A x64 -DCLAP_WRAPPER_CXX_STANDARD=20
install_ninja: false
run_aptget: false
name: Windows 64bit C++20 MSVC

- os: windows-latest
- os: windows-2022
cmakeargs: -GNinja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
install_ninja: true
run_aptget: false
name: Windows gcc/minGW

#- os: windows-latest
#- os: windows-2022
# cmakeargs: -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
# install_ninja: true
# run_aptget: false
Expand Down Expand Up @@ -200,7 +201,7 @@ jobs:
strategy:
matrix:
include:
- os: windows-latest
- os: windows-2022
cmakeargs: -A x64
install_ninja: false
run_aptget: false
Expand All @@ -210,7 +211,7 @@ jobs:
name: ClapFirst Windows 64bit Single File MSVC


- os: windows-latest
- os: windows-2022
cmakeargs: -A x64 -DEXAMPLE_USE_WINDOWS_FOLDER=TRUE
install_ninja: false
run_aptget: false
Expand Down
84 changes: 67 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,79 @@
#
# clap-wrapper project
# clap-wrapper project
#
# Copyright (c) 2022-2024 Timo Kaluza (defiantnerd)
# Copyright (c) 2022-2026 Timo Kaluza (defiantnerd)
# Paul Walker (baconpaul)
#
# There are a variety of advanced options to configure and build this wrapper, but
# for the simple case of single plugin in a single clap, here are some relevant
# cmake-time options which this wrapper will use. See the documentation for a more
# complete description
# for the simple case of a single plugin in a single clap, here are the relevant
# cmake-time options which this wrapper will use. See the wiki
# (https://github.com/free-audio/clap-wrapper/wiki) for a more complete description.
#
# CLAP_SDK_ROOT The location of the clap library. Defaults to ../clap
# VST3_SDK_ROOT The location of the VST3 sdk. Defaults tp ../vst3sdk
# SDK locations
# -------------
# Each SDK is resolved in this order:
# 1. an explicitly set <FOO>_SDK_ROOT cache variable
# 2. if CLAP_WRAPPER_DOWNLOAD_DEPENDENCIES is ON, a CPM download from github
# 3. a search for the SDK directory in ./libs/<name>, ./<name> and ../<name>
#
# CLAP_WRAPPER_OUTPUT_NAME The name of the resulting .vst3 or .component
# CLAP_SUPPORTS_ALL_NOTE_EXPRESSIONS The wrapper will forward all VST3 note expressions to your CLAP
# CLAP_VST3_TUID_STRING The VST3 component ::iid as a string; absent this wrapper hashes clap id
# CLAP_WRAPPER_BUNDLE_IDENTIFIER the macOS Bundle Identifier. Absent this it is 'org.cleveraudio.wrapper.(name)'
# CLAP_WRAPPER_BUNDLE_VERSION the macOS Bundle Version. Defaults to 1.0
# CLAP_WRAPPER_WINDOWS_SINGLE_FILE if set to TRUE (default) the windows .vst3 is a single file; false a 3.7 spec folder
# CLAP_WRAPPER_DOWNLOAD_DEPENDENCIES if set will download the needed SDKs using CPM from github
# CLAP_WRAPPER_COPY_AFTER_BUILD if included mac and lin will copy to ~/... (lin t/k)
# CLAP_SDK_ROOT The location of the CLAP SDK (directory name 'clap')
# VST3_SDK_ROOT The location of the VST3 SDK (directory name 'vst3sdk')
# AUDIOUNIT_SDK_ROOT The location of Apple's AudioUnitSDK (directory name
# 'AudioUnitSDK'); only needed for AUv2 builds. AUv3 uses
# system frameworks only and needs no extra SDK.
# AAX_SDK_ROOT The location of the AAX SDK (directory name 'aax');
# only needed for AAX builds
# RTAUDIO_SDK_ROOT The location of RtAudio (directory name 'rtaudio');
# only needed for standalone builds
# RTMIDI_SDK_ROOT The location of RtMidi (directory name 'rtmidi');
# only needed for standalone builds
# WIL_SDK_ROOT The location of the Windows Implementation Library
# (directory name 'wil'); only needed for standalone
# builds on Windows
#
# Which formats are built
# -----------------------
# When this project is the top level, a VST3 wrapper is always built, and AAX
# is built whenever the toolchain supports it (macOS, or Windows with MSVC on
# x64). The other formats are opt-in:
#
# CLAP_WRAPPER_BUILD_AUV2 Build the AUv2 wrapper (.component); requires the AudioUnitSDK
# CLAP_WRAPPER_BUILD_AUV3 Build the AUv3 app extension (.appex) plus its standalone
# host app; requires the Xcode generator (-G Xcode)
# CLAP_WRAPPER_BUILD_STANDALONE Build a simple standalone executable hosting the CLAP
# CLAP_WRAPPER_BUILD_TESTS Build the test CLAP wrappers
#
# Naming and packaging
# --------------------
# CLAP_WRAPPER_OUTPUT_NAME The name of the resulting .vst3/.component/.appex/executable;
# also the name of the .clap the wrapper loads. Defaults to
# 'clapasvst3' (with a warning)
# CLAP_WRAPPER_BUNDLE_IDENTIFIER The macOS/iOS bundle identifier. Defaults to
# 'org.cleveraudio.wrapper.(name)(.suffix)'; AUv3 appends
# '.auv3' (appex) and '.auv3standalone' (host app)
# CLAP_WRAPPER_BUNDLE_VERSION The macOS/iOS bundle version. Defaults to 1.0
# CLAP_WRAPPER_WINDOWS_SINGLE_FILE If TRUE (default) the windows .vst3 is a single file;
# if FALSE, a VST3 3.7-spec folder bundle
#
# Behavior and build environment
# ------------------------------
# CLAP_SUPPORTS_ALL_NOTE_EXPRESSIONS Forward all VST3 note expressions to your CLAP
# without asking it via the wrapper extension
# CLAP_VST3_TUID_STRING The VST3 component ::iid as a string; absent this, the
# wrapper hashes the clap id
# CLAP_WRAPPER_DOWNLOAD_DEPENDENCIES Download the needed SDKs at configure time using
# CPM from github
# CLAP_WRAPPER_COPY_AFTER_BUILD After building, copy the plugin into the user's
# plugin directory (~/Library/Audio/Plug-Ins/... on
# macOS, ~/.vst3 on Linux)
# CLAP_WRAPPER_CXX_STANDARD The C++ standard to compile with. Defaults to 17


cmake_minimum_required(VERSION 3.21)
cmake_policy(SET CMP0091 NEW)
cmake_policy(SET CMP0149 NEW)
if (NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
message(STATUS "[clap-wrapper]: OSX_DEPLOYEMNT_TARGET is undefined. Setting to 10.13")
message(STATUS "[clap-wrapper]: OSX_DEPLOYMENT_TARGET is undefined. Setting to 10.13")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "Minimum macOS version")
endif()
if (NOT DEFINED CMAKE_OSX_ARCHITECTURES)
Expand All @@ -48,7 +95,7 @@ option(CLAP_WRAPPER_BUILD_TESTS "Build test CLAP wrappers" OFF)

project(clap-wrapper
LANGUAGES C CXX
VERSION 0.12.1
VERSION 0.15.0
DESCRIPTION "CLAP-as-X wrappers"
)
set(CLAP_WRAPPER_VERSION "${PROJECT_VERSION}" CACHE STRING "Version of the wrapper project")
Expand All @@ -65,6 +112,9 @@ if (PROJECT_IS_TOP_LEVEL)
else()
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
if(MSVC)
add_compile_options(/std:c++17 /Zc:__cplusplus)
endif()
elseif ( ${CMAKE_CXX_STANDARD} VERSION_LESS 17)
message(WARNING "CMAKE_CXX_STANDARD of ${CMAKE_CXX_STANDARD} < 17 not well tested")
endif()
Expand Down
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Currently the `clap-wrapper` supports projecting a CLAP into

- VST3
- Audio Unit v2 (AUv2)
- Audio Unit v3 (AUv3, on macOS and iOS)
- AAX
- A Simple Standalone

The `clap-wrapper` also provides a variety of deployment,
Expand All @@ -29,7 +31,7 @@ will load your CLAP using a variety of techniques.
or standalone executable which implements the format to the host
or OS, but uses that host to load your clap.

And with that, voila, your CLAP can appear in a VST3 or AUv2
And with that, voila, your CLAP can appear in a VST3, AUv2 or AUv3
host or can appear to be a self contained standalone executable.
Available features in CLAP are transposed to equivalent features
in the target format.
Expand All @@ -55,10 +57,41 @@ cmake -B build \
```
If you'd like to also build for AUv2 include `-DCLAP_WRAPPER_BUILD_AUV2=ON` and the SDK in the folder `AudioUnitSDK`.

To build an AUv3 app extension include `-DCLAP_WRAPPER_BUILD_AUV3=ON`.
AUv3 builds require the Xcode generator (`-G Xcode`) — the `.appex` is
linked as an app-extension product and signed by Xcode; other generators
stop at configure time with an explanatory error. In the clap-first flow,
add `AUV3` to `PLUGIN_FORMATS` instead. On iOS the hosted CLAP is
statically linked into the appex (single-plugin); see the wiki for the
current AUv3 feature status.

## Licensing

The `clap-wrapper` project is released under the MIT license.
Please note that using the `clap-wrapper` project to wrap
a VST3 requires either (1) you use the VST3 SDK under the GPL3
license, and as such are open source or (2) you agree to the
VST3 license to generate the wrapper.
The SDKs and libraries it references remain under their respective
licenses:

| SDK / Library | Used for | License |
|---|---|---|
| [CLAP SDK](https://github.com/free-audio/clap) | all wrappers | MIT |
| [VST3 SDK](https://github.com/steinbergmedia/vst3sdk) (Steinberg) | VST3 wrapper | MIT (use of the VST trademark/logo per Steinberg's guidelines) |
| [AudioUnitSDK](https://github.com/apple/AudioUnitSDK) (Apple) | AUv2 wrapper | Apache 2.0 |
| AAX SDK (Avid) | AAX wrapper | GPL3 **or** commercial Avid AAX SDK License Agreement |
| [RtAudio](https://github.com/thestk/rtaudio) | standalone audio I/O | MIT-like (RtAudio license) |
| [RtMidi](https://github.com/thestk/rtmidi) | standalone MIDI I/O | MIT-like (RtMidi license) |
| [WIL](https://github.com/microsoft/wil) (Microsoft) | standalone, Windows only | MIT |
| [gulrak/filesystem](https://github.com/gulrak/filesystem) | std::filesystem fallback on older toolchains | MIT |
| [{fmt}](https://github.com/fmtlib/fmt) (vendored in `libs/fmt`) | string formatting | MIT |
| [PreSonus plugin extensions](https://github.com/fenderdigital/presonus-plugin-extension) (vendored in `libs/psl`) | gain-reduction extension in VST3 | Public domain |

The AUv3 wrapper uses only Apple system frameworks (AudioToolbox,
AVFoundation, CoreAudioKit) and needs no additional SDK.

Please note that AAX is dual-licensed: the Avid AAX SDK is available
either under the GPL3 or under the commercial
[Avid AAX SDK License Agreement](https://developer.avid.com/aax). So
to wrap an AAX plugin you must either release it under the GPL3 or
agree to Avid's SDK license — and joining the Avid developer program
is required in practice anyway, since AAX binaries must be signed
with Avid/PACE tooling to load in commercial Pro Tools releases.

34 changes: 34 additions & 0 deletions cmake/aax_Info.plist.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
</dict>
</plist>
Loading
Loading