-
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.
- Loading branch information
Showing
176 changed files
with
5,255 additions
and
311 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
68 changes: 68 additions & 0 deletions
68
.vst3_tutorials/advanced-techniques-tutorial/CMakeLists.txt
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,68 @@ | ||
cmake_minimum_required(VERSION 3.14.0) | ||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "") | ||
|
||
if(NOT vst3sdk_SOURCE_DIR) | ||
message(FATAL_ERROR "Path to VST3 SDK is empty! Please specify the vst3sdk_SOURCE_DIR cmake cache entry") | ||
endif() | ||
|
||
project(advanced-techniques-tutorial | ||
# 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.0.0.0 | ||
DESCRIPTION "advanced-techniques-tutorial VST 3 Plug-in" | ||
) | ||
|
||
set(SMTG_ENABLE_VST3_HOSTING_EXAMPLES 0) | ||
set(SMTG_ENABLE_VST3_PLUGIN_EXAMPLES 0) | ||
set(SMTG_ENABLE_VSTGUI_SUPPORT 0) | ||
|
||
set(SMTG_VSTGUI_ROOT "${vst3sdk_SOURCE_DIR}") | ||
|
||
add_subdirectory(${vst3sdk_SOURCE_DIR} ${PROJECT_BINARY_DIR}/vst3sdk) | ||
smtg_enable_vst3_sdk() | ||
|
||
smtg_add_vst3plugin(advanced-techniques-tutorial | ||
README.md | ||
source/cids.h | ||
source/controller.cpp | ||
source/entry.cpp | ||
source/pids.h | ||
source/processor.cpp | ||
source/version.h | ||
) | ||
|
||
target_compile_features(advanced-techniques-tutorial | ||
PUBLIC | ||
cxx_std_17 | ||
) | ||
|
||
target_link_libraries(advanced-techniques-tutorial | ||
PRIVATE | ||
sdk | ||
) | ||
|
||
smtg_target_configure_version_file(advanced-techniques-tutorial) | ||
|
||
if(SMTG_MAC) | ||
smtg_target_set_bundle(advanced-techniques-tutorial | ||
BUNDLE_IDENTIFIER com.steinberg.vst3.tutorial.dataexchange | ||
COMPANY_NAME "Steinberg Media Technologies" | ||
) | ||
smtg_target_set_debug_executable(advanced-techniques-tutorial | ||
"/Applications/VST3PluginTestHost.app" | ||
"--pluginfolder;$(BUILT_PRODUCTS_DIR)" | ||
) | ||
elseif(SMTG_WIN) | ||
target_sources(advanced-techniques-tutorial PRIVATE | ||
resource/win32resource.rc | ||
) | ||
if(MSVC) | ||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT advanced-techniques-tutorial) | ||
|
||
smtg_target_set_debug_executable(advanced-techniques-tutorial | ||
"$(ProgramW6432)/Steinberg/VST3PluginTestHost/VST3PluginTestHost.exe" | ||
"--pluginfolder \"$(OutDir)/\"" | ||
) | ||
endif() | ||
endif(SMTG_MAC) |
19 changes: 19 additions & 0 deletions
19
.vst3_tutorials/advanced-techniques-tutorial/source/cids.h
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,19 @@ | ||
//------------------------------------------------------------------------ | ||
// Copyright(c) 2023 Steinberg Media Technologies. | ||
//------------------------------------------------------------------------ | ||
|
||
#pragma once | ||
|
||
#include "pluginterfaces/base/funknown.h" | ||
#include "pluginterfaces/vst/vsttypes.h" | ||
|
||
namespace Steinberg::Tutorial { | ||
//------------------------------------------------------------------------ | ||
static const FUID ProcessorUID (0xC18D3C1E, 0x719E4E29, 0x924D3ECA, 0xA5E4DA18); | ||
static const FUID ControllerUID (0xC244B7E6, 0x24084E20, 0xA24A8C43, 0xF84C8BE8); | ||
|
||
#define DataExchangeVST3Category "Fx" | ||
|
||
//------------------------------------------------------------------------ | ||
} // namespace Steinberg::Tutorial | ||
|
59 changes: 59 additions & 0 deletions
59
.vst3_tutorials/advanced-techniques-tutorial/source/controller.cpp
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,59 @@ | ||
//------------------------------------------------------------------------ | ||
// Copyright(c) 2023 Steinberg Media Technologies. | ||
//------------------------------------------------------------------------ | ||
|
||
#include "pids.h" | ||
#include "public.sdk/source/vst/vsteditcontroller.h" | ||
#include "base/source/fstreamer.h" | ||
|
||
//------------------------------------------------------------------------ | ||
namespace Steinberg::Tutorial { | ||
|
||
using namespace Steinberg::Vst; | ||
|
||
//------------------------------------------------------------------------ | ||
class Controller : public EditController | ||
{ | ||
tresult PLUGIN_API initialize (FUnknown* context) SMTG_OVERRIDE; | ||
tresult PLUGIN_API setComponentState (IBStream* state) SMTG_OVERRIDE; | ||
}; | ||
|
||
//------------------------------------------------------------------------ | ||
tresult PLUGIN_API Controller::initialize (FUnknown* context) | ||
{ | ||
tresult result = EditController::initialize (context); | ||
if (result != kResultOk) | ||
{ | ||
return result; | ||
} | ||
parameters.addParameter (STR ("Gain"), STR ("%"), 0, 1., ParameterInfo::kCanAutomate, | ||
ParameterID::Gain); | ||
return kResultOk; | ||
} | ||
|
||
//------------------------------------------------------------------------ | ||
tresult PLUGIN_API Controller::setComponentState (IBStream* state) | ||
{ | ||
if (!state) | ||
return kInvalidArgument; | ||
|
||
IBStreamer streamer (state, kLittleEndian); | ||
|
||
ParamValue value; | ||
if (!streamer.readDouble (value)) | ||
return kResultFalse; | ||
|
||
if (auto param = parameters.getParameter (ParameterID::Gain)) | ||
param->setNormalized (value); | ||
return kResultTrue; | ||
} | ||
|
||
//------------------------------------------------------------------------ | ||
FUnknown* createControllerInstance (void*) | ||
{ | ||
return static_cast<IEditController*> (new Controller); | ||
} | ||
|
||
//------------------------------------------------------------------------ | ||
} // Steinberg::Tutorial | ||
|
60 changes: 60 additions & 0 deletions
60
.vst3_tutorials/advanced-techniques-tutorial/source/entry.cpp
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,60 @@ | ||
//------------------------------------------------------------------------ | ||
// Copyright(c) 2023 Steinberg Media Technologies. | ||
//------------------------------------------------------------------------ | ||
|
||
#include "cids.h" | ||
#include "version.h" | ||
|
||
#include "public.sdk/source/main/pluginfactory.h" | ||
#include "pluginterfaces/vst/ivsteditcontroller.h" | ||
#include "pluginterfaces/vst/ivstaudioprocessor.h" | ||
|
||
#define stringPluginName "advanced-techniques-tutorial" | ||
|
||
using namespace Steinberg; | ||
using namespace Steinberg::Vst; | ||
using namespace Steinberg::Tutorial; | ||
|
||
//------------------------------------------------------------------------ | ||
namespace Steinberg::Tutorial { | ||
FUnknown* createProcessorInstance (void*); | ||
FUnknown* createControllerInstance (void*); | ||
} | ||
|
||
//------------------------------------------------------------------------ | ||
// VST Plug-in Entry | ||
//------------------------------------------------------------------------ | ||
// Windows: do not forget to include a .def file in your project to export | ||
// GetPluginFactory function! | ||
//------------------------------------------------------------------------ | ||
|
||
BEGIN_FACTORY_DEF ("Steinberg Media Technologies", | ||
"https://steinberg.net", | ||
"mailto:[email protected]") | ||
|
||
//---First Plug-in included in this factory------- | ||
// its kVstAudioEffectClass component | ||
DEF_CLASS2 (INLINE_UID_FROM_FUID(ProcessorUID), | ||
PClassInfo::kManyInstances, // cardinality | ||
kVstAudioEffectClass, // the component category (do not changed this) | ||
stringPluginName, // here the Plug-in name (to be changed) | ||
Vst::kDistributable, // means that component and controller could be distributed on different computers | ||
DataExchangeVST3Category, // Subcategory for this Plug-in (to be changed) | ||
FULL_VERSION_STR, // Plug-in version (to be changed) | ||
kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define) | ||
createProcessorInstance)// function pointer called when this component should be instantiated | ||
|
||
// its kVstComponentControllerClass component | ||
DEF_CLASS2 (INLINE_UID_FROM_FUID (ControllerUID), | ||
PClassInfo::kManyInstances, // cardinality | ||
kVstComponentControllerClass,// the Controller category (do not changed this) | ||
stringPluginName "Controller", // controller name (could be the same than component name) | ||
0, // not used here | ||
"", // not used here | ||
FULL_VERSION_STR, // Plug-in version (to be changed) | ||
kVstVersionString, // the VST 3 SDK version (do not changed this, use always this define) | ||
createControllerInstance)// function pointer called when this component should be instantiated | ||
|
||
//----for others Plug-ins contained in this factory, put like for the first Plug-in different DEF_CLASS2--- | ||
|
||
END_FACTORY |
17 changes: 17 additions & 0 deletions
17
.vst3_tutorials/advanced-techniques-tutorial/source/pids.h
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,17 @@ | ||
//------------------------------------------------------------------------ | ||
// Copyright(c) 2023 Steinberg Media Technologies. | ||
//------------------------------------------------------------------------ | ||
|
||
#pragma once | ||
|
||
//------------------------------------------------------------------------ | ||
namespace Steinberg::Tutorial { | ||
|
||
//------------------------------------------------------------------------ | ||
enum ParameterID | ||
{ | ||
Gain = 1, | ||
}; | ||
|
||
//------------------------------------------------------------------------ | ||
} // Steinberg::Tutorial |
Oops, something went wrong.