clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 7bdb16d69378ad7bd55ffe668053bb30a9d41e3e
parent dc85082c5cc303902311124e836b2a74a1f9ac2d
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Sat, 22 May 2021 22:22:32 +0200

Begin plugin example

Diffstat:
MCMakeLists.txt | 2++
Rexamples/host/.clang-format -> examples/.clang-format | 0
Mexamples/CMakeLists.txt | 8++++++++
Aexamples/plugins/CMakeLists.txt | 0
Aexamples/synaesthesis/CMakeLists.txt | 6++++++
Aexamples/synaesthesis/module.hh | 6++++++
Aexamples/synaesthesis/parameter.hh | 13+++++++++++++
Aexamples/synaesthesis/plugin.cc | 2++
Aexamples/synaesthesis/plugin.hh | 11+++++++++++
Aexamples/synaesthesis/processor.hh | 16++++++++++++++++
10 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.20) project(CLAP C CXX) set(ENABLE_CLAP_HOST FALSE CACHE BOOL "Enables the example host") +set(ENABLE_CLAP_PLUGINS FALSE CACHE BOOL "Enables the example plugins") +set(ENABLE_CLAP_SYNAESTHESIS FALSE CACHE BOOL "Enables Synaesthesis, the plugin framework") include_directories(include) diff --git a/examples/host/.clang-format b/examples/.clang-format diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt @@ -1,3 +1,11 @@ if (ENABLE_CLAP_HOST) add_subdirectory(host) +endif() + +if (ENABLE_CLAP_SYNAESTHESIS OR ENABLE_CLAP_PLUGINS) + add_subdirectory(synaesthesis) +endif() + +if (ENABLE_CLAP_PLUGINS) + add_subdirectory(plugins) endif() \ No newline at end of file diff --git a/examples/plugins/CMakeLists.txt b/examples/plugins/CMakeLists.txt diff --git a/examples/synaesthesis/CMakeLists.txt b/examples/synaesthesis/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(synaesthesis + plugin.cc + plugin.hh + parameter.hh +) +\ No newline at end of file diff --git a/examples/synaesthesis/module.hh b/examples/synaesthesis/module.hh @@ -0,0 +1,5 @@ +#pragma once + +namespace synaesthesis { + class Module {}; +} // namespace synaesthesis +\ No newline at end of file diff --git a/examples/synaesthesis/parameter.hh b/examples/synaesthesis/parameter.hh @@ -0,0 +1,12 @@ +#pragma once + +#include <clap/all.h> + +namespace synaesthesis { + class Parameter { + private: + clap_param_info info_; + clap_param_value value_; + clap_param_value modulated_value_; + }; +} // namespace synaesthesis +\ No newline at end of file diff --git a/examples/synaesthesis/plugin.cc b/examples/synaesthesis/plugin.cc @@ -0,0 +1 @@ +#include "plugin.hh" +\ No newline at end of file diff --git a/examples/synaesthesis/plugin.hh b/examples/synaesthesis/plugin.hh @@ -0,0 +1,10 @@ +#pragma once + +#include <clap/all.h> + +namespace synaesthesis { + class Plugin { + public: + private: + }; +} // namespace synaesthesis +\ No newline at end of file diff --git a/examples/synaesthesis/processor.hh b/examples/synaesthesis/processor.hh @@ -0,0 +1,15 @@ +#pragma once + +#include <clap/all.h> + +namespace synaesthesis { + class Processor { + public: + Processor(int sampleRate); + + virtual void process(uint32_t voiceIndex) = 0; + + protected: + const int sampleRate_; + }; +} // namespace synaesthesis +\ No newline at end of file