Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
42dea5b
Initial support for audio plugin hosting
kunitoki May 15, 2026
22c6fe7
Fix audio allocations
kunitoki May 16, 2026
0cec889
Fixes to AU
kunitoki May 16, 2026
36137dd
Listbox fixes
kunitoki May 16, 2026
aa30292
More plugin host fixes
kunitoki May 16, 2026
28562e5
Fix audio processor
kunitoki May 16, 2026
2e1f795
Cleanup compiler support
kunitoki May 17, 2026
132df18
Audio graph
kunitoki May 17, 2026
bdc4984
Update readme
kunitoki May 17, 2026
e738e7e
Fix native renderer resize
kunitoki May 17, 2026
1b01b95
Improved node graph
kunitoki May 17, 2026
1a4b6b5
Fix slider bars in demo
kunitoki May 17, 2026
580b01a
More fixes
kunitoki May 17, 2026
e223743
More fixes
kunitoki May 17, 2026
500226b
Remove invalid min c++ standard
kunitoki May 17, 2026
48ba99d
Removed deprectaed macros mess in XmlElement
kunitoki May 17, 2026
61cdbdb
Fix agents
kunitoki May 17, 2026
e704710
More fixes
kunitoki May 17, 2026
b7d14d4
Split graph in smaller chunks
kunitoki May 18, 2026
ea79de8
More fixes
kunitoki May 18, 2026
6e1f41f
More tests
kunitoki May 18, 2026
de4ec9b
Improved audiograph and added separate app
kunitoki May 18, 2026
387cfbf
Fix mouse handling
kunitoki May 18, 2026
3ed79e8
Fix issues
kunitoki May 18, 2026
e52820e
More tweaks
kunitoki May 18, 2026
ce9125e
Disable denormals tests in wasm
kunitoki May 18, 2026
3f57f8f
Fix windows
kunitoki May 18, 2026
49a73dd
More theme work
kunitoki May 18, 2026
5dafcf7
Missing inclusion of <concepts>
kunitoki May 18, 2026
e49b585
Fix NDK issues
kunitoki May 18, 2026
8d42b88
Fix windows
kunitoki May 18, 2026
2bcaef9
More windows fixes
kunitoki May 19, 2026
a0b0616
Typo error
kunitoki May 19, 2026
4c2bac7
Enable SSE on windows x64
kunitoki May 19, 2026
99c357a
Fix hosting vst and clap on mac
kunitoki May 19, 2026
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
5 changes: 2 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ For main module headers (e.g., `yup_graphics.h`), include this declaration block
description: Brief module description
website: https://github.com/kunitoki/yup
license: ISC
minimumCppStandard: 17

dependencies: yup_graphics [other_dependencies]
searchpaths: native
Expand Down Expand Up @@ -337,9 +336,9 @@ yup::Result performOperation()
yup::ResultValue<int> maybeGetInteger()
{
if (preconditionFailed)
return yup::ResultValue<int>::fail ("Precondition not met");
return yup::makeResultValueFail ("Precondition not met");

return 1;
return 1; // or yup::makeResultValueOk (1)
}

// Use assertions for programming errors
Expand Down
5 changes: 2 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ For main module headers (e.g., `yup_graphics.h`), include this declaration block
description: Brief module description
website: https://github.com/kunitoki/yup
license: ISC
minimumCppStandard: 17

dependencies: yup_graphics [other_dependencies]
searchpaths: native
Expand Down Expand Up @@ -337,9 +336,9 @@ yup::Result performOperation()
yup::ResultValue<int> maybeGetInteger()
{
if (preconditionFailed)
return yup::ResultValue<int>::fail ("Precondition not met");
return yup::makeResultValueFail ("Precondition not met");

return 1;
return 1; // or yup::makeResultValueOk (1)
}

// Use assertions for programming errors
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ if (YUP_BUILD_EXAMPLES)
add_subdirectory (examples/graphics)
if (YUP_PLATFORM_DESKTOP)
add_subdirectory (examples/plugin)
add_subdirectory (examples/audiograph)
endif()
endif()

Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@
<a href="./examples/graphics/source/examples/ColorLab.h"><img src="./docs/images/yup_color_picker.png" style="width:51.8%;" /></a>
</div>

<div style="display: flex; width: 100%; flex-wrap: nowrap;">
<a href="./examples/graphics/source/examples/AudioGraph.h"><img src="./docs/images/yup_audio_graph.png" style="width:49%;" /></a>
<a href="./examples/graphics/source/examples/AudioFileDemo.h"><img src="./docs/images/yup_audio_waveform.png" style="width:49%;" /></a>
</div>

<div style="display: flex; width: 100%; flex-wrap: nowrap;">
<a href="./examples/graphics/source/examples/AudioHost.h"><img src="./docs/images/yup_audio_host.png" style="width:99%;" /></a>
</div>

<div style="display: flex; width: 100%; flex-wrap: nowrap;">
<a href="./examples/graphics/source/examples/FilterDemo.h"><img src="./docs/images/yup_dsp_filter_rbj.png" style="width:26.5%;" /></a>
<a href="./examples/graphics/source/examples/FilterDemo.h"><img src="./docs/images/yup_dsp_filter_butter.png" style="width:26.5%;" /></a>
Expand Down Expand Up @@ -113,6 +122,14 @@ YUP brings a suite of powerful features, including:
| **Linux** | :construction: | :construction: | | | | | |


## Supported Plugin Hosting Formats
| | **CLAP** | **VST3** | **VST2** | **AUv3** | **AUv2** | **AAX** | **LV2** |
|--------------------------|:------------------:|:------------------:|:------------------:|:------------------:|:-------------------------:|:---------------------:|:---------------------:|
| **Windows** | :construction: | :construction: | | | | | |
| **macOS** | :construction: | :construction: | | | :white_check_mark: | | |
| **Linux** | :construction: | :construction: | | | | | |


## Supported Sound Formats

| | **Wav** | **Wav64** | **Mp3** | **OGG** | **Flac** | **Opus** | **AAC** | **WMF** |
Expand All @@ -130,6 +147,7 @@ YUP brings a suite of powerful features, including:
| **iOS** (enc) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| **iOS** (dec) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |


## Prerequisites
Before building, ensure you have a:
- C++20-compliant compiler
Expand Down
34 changes: 12 additions & 22 deletions cmake/yup_audio_plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,19 @@ function (yup_audio_plugin)
_yup_fetch_sdl2()
list (APPEND additional_libraries sdl2::sdl2)

_yup_target_list_contains ("${YUP_ARG_MODULES}" yup_audio_plugin_host has_audio_plugin_host)
if (has_audio_plugin_host)
_yup_collect_audio_plugin_host_dependencies ("${YUP_ARG_DEFINITIONS}" audio_plugin_host_libraries)
list (APPEND additional_libraries ${audio_plugin_host_libraries})
if (audio_plugin_host_libraries)
target_link_libraries (${target_name}_shared INTERFACE
${audio_plugin_host_libraries})
endif()
endif()

# ==== Fetch clap SDK and build clap target
if (YUP_ARG_PLUGIN_CREATE_CLAP)
_yup_message (STATUS "Fetching CLAP SDK")
_yup_fetchcontent_declare (clap
GIT_REPOSITORY https://github.com/free-audio/clap.git
GIT_TAG main)
FetchContent_MakeAvailable (clap)
set_target_properties (clap-tests PROPERTIES FOLDER "Tests")
_yup_fetch_clap()

_yup_message (STATUS "Setting up CLAP plugin client")
_yup_module_setup_plugin_client (
Expand Down Expand Up @@ -144,22 +149,7 @@ function (yup_audio_plugin)

# ==== Fetch vst3 SDK and build vst3 target
if (YUP_ARG_PLUGIN_CREATE_VST3)
_yup_message (STATUS "Fetching VST3 SDK")
set (SMTG_CREATE_MODULE_INFO OFF)
set (SMTG_ADD_VST3_UTILITIES OFF)
set (SMTG_ENABLE_VST3_HOSTING_EXAMPLES OFF)
set (SMTG_ENABLE_VST3_PLUGIN_EXAMPLES OFF)
set (SMTG_ENABLE_VSTGUI_SUPPORT OFF)
set (SMTG_CREATE_PLUGIN_LINK OFF)
if (NOT YUP_PLATFORM_MAC OR XCODE)
set (SMTG_RUN_VST_VALIDATOR ON)
else()
set (SMTG_RUN_VST_VALIDATOR OFF)
endif()
_yup_fetchcontent_declare (vst3sdk
GIT_REPOSITORY https://github.com/steinbergmedia/vst3sdk.git
GIT_TAG master)
FetchContent_MakeAvailable (vst3sdk)
_yup_fetch_vst3sdk()

_yup_message (STATUS "Setting up VST3 plugin client")
smtg_enable_vst3_sdk()
Expand Down
151 changes: 151 additions & 0 deletions cmake/yup_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,157 @@ endfunction()

#==============================================================================

function (_yup_fetch_clap)
if (NOT TARGET clap)
_yup_message (STATUS "Fetching CLAP SDK")
_yup_fetchcontent_declare (clap
GIT_REPOSITORY https://github.com/free-audio/clap.git
GIT_TAG main)

FetchContent_MakeAvailable (clap)
endif()

if (TARGET clap-tests)
set_target_properties (clap-tests PROPERTIES FOLDER "Tests")
endif()
endfunction()

#==============================================================================

function (_yup_fetch_vst3sdk)
if (NOT TARGET sdk)
_yup_message (STATUS "Fetching VST3 SDK")

set (SMTG_CREATE_MODULE_INFO OFF)
set (SMTG_ADD_VST3_UTILITIES OFF)
set (SMTG_ENABLE_VST3_HOSTING_EXAMPLES OFF)
set (SMTG_ENABLE_VST3_PLUGIN_EXAMPLES OFF)
set (SMTG_ENABLE_VSTGUI_SUPPORT OFF)
set (SMTG_CREATE_PLUGIN_LINK OFF)
if (NOT YUP_PLATFORM_MAC OR XCODE)
set (SMTG_RUN_VST_VALIDATOR ON)
else()
set (SMTG_RUN_VST_VALIDATOR OFF)
endif()

_yup_fetchcontent_declare (vst3sdk
GIT_REPOSITORY https://github.com/steinbergmedia/vst3sdk.git
GIT_TAG master)

FetchContent_MakeAvailable (vst3sdk)
endif()

if (NOT TARGET yup_audio_plugin_host_vst3sdk)
add_library (yup_audio_plugin_host_vst3sdk INTERFACE)
target_link_libraries (yup_audio_plugin_host_vst3sdk INTERFACE sdk)

set (vst3sdk_source_dir "")
if (DEFINED vst3sdk_SOURCE_DIR)
set (vst3sdk_source_dir "${vst3sdk_SOURCE_DIR}")
elseif (TARGET sdk)
get_target_property (vst3sdk_source_dir sdk SOURCE_DIR)
endif()

set (vst3sdk_memorystream_source "${vst3sdk_source_dir}/public.sdk/source/common/memorystream.cpp")
if (vst3sdk_source_dir AND EXISTS "${vst3sdk_memorystream_source}")
target_sources (yup_audio_plugin_host_vst3sdk INTERFACE "${vst3sdk_memorystream_source}")
endif()

set (vst3sdk_parameterchanges_source "${vst3sdk_source_dir}/public.sdk/source/vst/hosting/parameterchanges.cpp")
if (vst3sdk_source_dir AND EXISTS "${vst3sdk_parameterchanges_source}")
target_sources (yup_audio_plugin_host_vst3sdk INTERFACE "${vst3sdk_parameterchanges_source}")
endif()

set (vst3sdk_eventlist_source "${vst3sdk_source_dir}/public.sdk/source/vst/hosting/eventlist.cpp")
if (vst3sdk_source_dir AND EXISTS "${vst3sdk_eventlist_source}")
target_sources (yup_audio_plugin_host_vst3sdk INTERFACE "${vst3sdk_eventlist_source}")
endif()
endif()
endfunction()

#==============================================================================

function (_yup_target_list_contains target_list target_name output_variable)
foreach (target IN LISTS target_list)
if ("${target}" STREQUAL "${target_name}" OR "${target}" STREQUAL "yup::${target_name}")
set (${output_variable} ON PARENT_SCOPE)
return()
endif()

if (TARGET "${target}")
get_target_property (aliased_target "${target}" ALIASED_TARGET)
if ("${aliased_target}" STREQUAL "${target_name}")
set (${output_variable} ON PARENT_SCOPE)
return()
endif()
endif()
endforeach()

set (${output_variable} OFF PARENT_SCOPE)
endfunction()

#==============================================================================

function (_yup_definitions_enable definitions definition_name output_variable)
set (enabled OFF)

foreach (definition IN LISTS definitions)
string (REGEX REPLACE "^-D" "" normalized_definition "${definition}")

if (normalized_definition MATCHES "^${definition_name}($|=)")
set (enabled ON)

if (normalized_definition MATCHES "^${definition_name}=")
string (REGEX REPLACE "^${definition_name}=(.*)$" "\\1" definition_value "${normalized_definition}")
string (STRIP "${definition_value}" definition_value)
string (REGEX REPLACE "^\"(.*)\"$" "\\1" definition_value "${definition_value}")
string (REGEX REPLACE "^'(.*)'$" "\\1" definition_value "${definition_value}")
string (TOUPPER "${definition_value}" definition_value)

if ("${definition_value}" STREQUAL "0"
OR "${definition_value}" STREQUAL "OFF"
OR "${definition_value}" STREQUAL "FALSE"
OR "${definition_value}" STREQUAL "NO")
set (enabled OFF)
endif()
endif()
endif()
endforeach()

set (${output_variable} "${enabled}" PARENT_SCOPE)
endfunction()

#==============================================================================

function (_yup_collect_audio_plugin_host_dependencies definitions output_variable)
set (dependencies "")

_yup_definitions_enable ("${definitions}" YUP_AUDIO_PLUGIN_HOST_ENABLE_CLAP enable_clap)
if (enable_clap)
_yup_fetch_clap()
list (APPEND dependencies clap)
endif()

_yup_definitions_enable ("${definitions}" YUP_AUDIO_PLUGIN_HOST_ENABLE_VST3 enable_vst3)
if (enable_vst3)
_yup_fetch_vst3sdk()
list (APPEND dependencies yup_audio_plugin_host_vst3sdk)
endif()

_yup_definitions_enable ("${definitions}" YUP_AUDIO_PLUGIN_HOST_ENABLE_AU enable_au)
if (enable_au AND YUP_PLATFORM_MAC)
list (APPEND dependencies
"-framework AudioUnit"
"-framework AudioToolbox"
"-framework CoreAudio"
"-framework CoreFoundation")
endif()

set (${output_variable} "${dependencies}" PARENT_SCOPE)
endfunction()

#==============================================================================

function (_yup_fetch_perfetto)
if (TARGET perfetto::perfetto)
return()
Expand Down
5 changes: 5 additions & 0 deletions cmake/yup_modules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,11 @@ function (yup_add_module module_path modules_definitions module_group)
list (APPEND module_defines ${module_definition})
endforeach()

if ("${module_name}" STREQUAL "yup_audio_plugin_host")
_yup_collect_audio_plugin_host_dependencies ("${module_defines}" audio_plugin_host_dependencies)
list (APPEND module_dependencies ${audio_plugin_host_dependencies})
endif()

# ==== Prepare include paths
get_filename_component (module_include_path ${module_path} DIRECTORY)
list (APPEND module_include_paths "${module_include_path}" "${module_path}")
Expand Down
8 changes: 8 additions & 0 deletions cmake/yup_standalone.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ function (yup_standalone_app)
list (APPEND additional_libraries perfetto::perfetto)
endif()

if (YUP_PLATFORM_DESKTOP)
_yup_target_list_contains ("${YUP_ARG_MODULES}" yup_audio_plugin_host has_audio_plugin_host)
if (has_audio_plugin_host)
_yup_collect_audio_plugin_host_dependencies ("${YUP_ARG_DEFINITIONS}" audio_plugin_host_libraries)
list (APPEND additional_libraries ${audio_plugin_host_libraries})
endif()
endif()

# ==== Prepare executable
set (executable_options "")
if (NOT "${target_console}")
Expand Down
Binary file added docs/images/yup_audio_graph.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 docs/images/yup_audio_host.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 docs/images/yup_audio_waveform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions examples/audiograph/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# ==============================================================================
#
# This file is part of the YUP library.
# Copyright (c) 2026 - kunitoki@gmail.com
#
# YUP is an open source library subject to open-source licensing.
#
# The code included in this file is provided under the terms of the ISC license
# http://www.isc.org/downloads/software-support-policy/isc-license. Permission
# to use, copy, modify, and/or distribute this software for any purpose with or
# without fee is hereby granted provided that the above copyright notice and
# this permission notice appear in all copies.
#
# YUP IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
# EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
# DISCLAIMED.
#
# ==============================================================================

cmake_minimum_required (VERSION 3.31)

set (target_name example_audiograph)
set (target_version "1.0.0")

project (${target_name} VERSION ${target_version})

yup_standalone_app (
TARGET_NAME ${target_name}
TARGET_VERSION ${target_version}
TARGET_IDE_GROUP "Examples"
TARGET_APP_ID "org.yup.${target_name}"
TARGET_APP_NAMESPACE "org.yup"
DEFINITIONS
YUP_AUDIO_PLUGIN_HOST_ENABLE_CLAP=1
YUP_AUDIO_PLUGIN_HOST_ENABLE_AU=1
YUP_AUDIO_PLUGIN_HOST_ENABLE_VST3=1
MODULES
yup::yup_core
yup::yup_audio_basics
yup::yup_audio_devices
yup::yup_dsp
yup::yup_events
yup::yup_graphics
yup::yup_gui
yup::yup_audio_formats
yup::yup_audio_gui
yup::yup_audio_processors
yup::yup_audio_graph
yup::yup_audio_plugin_host)

file (GLOB_RECURSE sources
"${CMAKE_CURRENT_LIST_DIR}/source/*.cpp"
"${CMAKE_CURRENT_LIST_DIR}/source/*.h")
source_group (TREE ${CMAKE_CURRENT_LIST_DIR}/ FILES ${sources})
target_sources (${target_name} PRIVATE ${sources})
Loading
Loading