Initial release
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15.0)
|
||||
|
||||
project(smtg-vst3-utf16name
|
||||
VERSION ${vstsdk_VERSION}.0
|
||||
DESCRIPTION "Steinberg VST 3 UTF16-Name example"
|
||||
)
|
||||
|
||||
smtg_add_vst3plugin(utf16-name
|
||||
source/version.h
|
||||
source/utf16namecids.h
|
||||
source/utf16nameprocessor.h
|
||||
source/utf16nameprocessor.cpp
|
||||
source/utf16namecontroller.h
|
||||
source/utf16namecontroller.cpp
|
||||
source/utf16nameentry.cpp
|
||||
README.md
|
||||
)
|
||||
|
||||
smtg_target_setup_as_vst3_example(utf16-name)
|
||||
@@ -0,0 +1,24 @@
|
||||
// SDKInclusion: Vst3Sdk
|
||||
|
||||
# UTF16Name
|
||||
|
||||
## Introduction
|
||||
|
||||
As part of the [VST 3 Plug-ins Examples](https://steinbergmedia.github.io/vst3_dev_portal/pages/What+is+the+VST+3+SDK/Plug-in+Examples.html),
|
||||
[UTF16Name](https://steinbergmedia.github.io/vst3_dev_portal/pages/What+is+the+VST+3+SDK/Plug-in+Examples.html?#utf16name) is a simple FX plug-in with [UTF16](https://en.wikipedia.org/wiki/UTF-16) characters in plug-in and company name:
|
||||
|
||||
- #define stringPluginNameU u"UTF16Name öüäéèê-やあ-مرحبًا"
|
||||
- #define stringCompanyNameU u"Steinberg Media Technologies - öüäéèê-やあ-مرحبًا"
|
||||
|
||||
> See also: [Online Documentation](https://steinbergmedia.github.io/vst3_dev_portal/pages/What+is+the+VST+3+SDK/Plug-in+Examples.html#utf16name).
|
||||
|
||||
## Getting Started
|
||||
|
||||
This plug-in is part of the VST 3 SDK package. It is created with the VST 3 SDK root project.
|
||||
|
||||
> See the top-level README of the VST 3 SDK: https://github.com/steinbergmedia/vst3sdk.git
|
||||
|
||||
## Getting Help
|
||||
|
||||
* Read through the SDK documentation on the **[VST 3 Developer Portal](https://steinbergmedia.github.io/vst3_dev_portal/pages/index.html)**
|
||||
* Ask some real people in the official **[VST 3 Developer Forum](https://forums.steinberg.net/c/developer/103)**
|
||||
@@ -0,0 +1,45 @@
|
||||
#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
|
||||
VALUE "ProductVersion", FULL_VERSION_STR
|
||||
VALUE "OriginalFilename", stringOriginalFilename
|
||||
VALUE "FileDescription", stringFileDescription
|
||||
VALUE "InternalName", stringFileDescription
|
||||
VALUE "ProductName", stringFileDescription
|
||||
VALUE "CompanyName", stringCompanyName
|
||||
VALUE "LegalCopyright", stringLegalCopyright
|
||||
VALUE "LegalTrademarks", stringLegalTrademarks
|
||||
//VALUE "PrivateBuild", " \0"
|
||||
//VALUE "SpecialBuild", " \0"
|
||||
//VALUE "Comments", " \0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x400, 1252
|
||||
END
|
||||
END
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/utf16name/source/utf16namecids.h
|
||||
// Created by : Steinberg, 11/2023
|
||||
// Description : UTF16Name Example for VST 3
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pluginterfaces/base/funknown.h"
|
||||
#include "pluginterfaces/vst/vsttypes.h"
|
||||
|
||||
namespace Steinberg {
|
||||
//------------------------------------------------------------------------
|
||||
static const Steinberg::FUID kUTF16NameProcessorUID (0x04F0CA5C, 0x1A1650F6, 0x9F2EE4F3, 0xC216D8B5);
|
||||
static const Steinberg::FUID kUTF16NameControllerUID (0xB6F0EFA6, 0x5EAB57DF, 0x9965FCF8, 0x026EA04D);
|
||||
|
||||
#define UTF16NameVST3Category "Fx"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Steinberg
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/utf16name/source/utf16namecontroller.cpp
|
||||
// Created by : Steinberg, 11/2023
|
||||
// Description : UTF16Name Example for VST 3
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "utf16namecontroller.h"
|
||||
#include "utf16namecids.h"
|
||||
#include "pluginterfaces/base/ustring.h"
|
||||
#include "pluginterfaces/vst/ivstunits.h"
|
||||
|
||||
namespace Steinberg {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// UTF16NameController Implementation
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameController::initialize (FUnknown* context)
|
||||
{
|
||||
// Here the Plug-in will be instantiated
|
||||
|
||||
//---do not forget to call parent ------
|
||||
tresult result = EditControllerEx1::initialize (context);
|
||||
if (result != kResultOk)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
// Here you could register some parameters
|
||||
|
||||
//--- Create Units-------------
|
||||
Vst::UnitInfo unitInfo {};
|
||||
unitInfo.id = 1;
|
||||
unitInfo.parentUnitId = Vst::kRootUnitId; // attached to the root unit
|
||||
unitInfo.programListId = Vst::kNoProgramListId;
|
||||
|
||||
// English
|
||||
UString (unitInfo.name, str16BufferSize (Vst::String128)).assign (STR16 ("Folder 1"));
|
||||
auto unit = new Vst::Unit (unitInfo);
|
||||
addUnit (unit);
|
||||
|
||||
// Japanese
|
||||
unitInfo.id++;
|
||||
UString (unitInfo.name, str16BufferSize (Vst::String128)).assign (STR16 ("フォルダー2"));
|
||||
unit = new Vst::Unit (unitInfo);
|
||||
addUnit (unit);
|
||||
|
||||
// Korean
|
||||
unitInfo.id++;
|
||||
UString (unitInfo.name, str16BufferSize (Vst::String128)).assign (STR16 ("폴더 3"));
|
||||
unit = new Vst::Unit (unitInfo);
|
||||
addUnit (unit);
|
||||
|
||||
// Arabic
|
||||
unitInfo.id++;
|
||||
UString (unitInfo.name, str16BufferSize (Vst::String128)).assign (STR16 ("المجلد 4"));
|
||||
unit = new Vst::Unit (unitInfo);
|
||||
addUnit (unit);
|
||||
|
||||
// Persian
|
||||
unitInfo.id++;
|
||||
UString (unitInfo.name, str16BufferSize (Vst::String128)).assign (STR16 ("پوشه 5"));
|
||||
unit = new Vst::Unit (unitInfo);
|
||||
addUnit (unit);
|
||||
|
||||
//---Create Parameters------------
|
||||
int32 stepCount = 0;
|
||||
Vst::ParamValue defaultVal = 0;
|
||||
int32 flags = Vst::ParameterInfo::kNoFlags;
|
||||
int32 tag = 100;
|
||||
Vst::UnitID unitId = 1;
|
||||
|
||||
// English
|
||||
parameters.addParameter (STR16 ("Hello"), nullptr, stepCount, defaultVal, flags, tag, unitId);
|
||||
|
||||
// Japanese
|
||||
tag++;
|
||||
unitId++;
|
||||
parameters.addParameter (STR16 ("こんにちは"), nullptr, stepCount, defaultVal, flags, tag, unitId);
|
||||
|
||||
// Korean
|
||||
tag++;
|
||||
unitId++;
|
||||
parameters.addParameter (STR16 ("안녕하세요"), nullptr, stepCount, defaultVal, flags, tag, unitId);
|
||||
|
||||
flags = Vst::ParameterInfo::kCanAutomate;
|
||||
|
||||
// Arabic
|
||||
tag++;
|
||||
unitId++;
|
||||
parameters.addParameter (STR16 ("مرحبا"), nullptr, stepCount, defaultVal, flags, tag, unitId);
|
||||
|
||||
// Persian
|
||||
tag++;
|
||||
unitId++;
|
||||
parameters.addParameter (STR16 ("سلام"), nullptr, stepCount, defaultVal, flags, tag, unitId);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameController::terminate ()
|
||||
{
|
||||
// Here the Plug-in will be de-instantiated, last possibility to remove some memory!
|
||||
|
||||
//---do not forget to call parent ------
|
||||
return EditControllerEx1::terminate ();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameController::setComponentState (IBStream* state)
|
||||
{
|
||||
// Here you get the state of the component (Processor part)
|
||||
if (!state)
|
||||
return kResultFalse;
|
||||
|
||||
return kResultOk;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameController::setState (IBStream* state)
|
||||
{
|
||||
// Here you get the state of the controller
|
||||
|
||||
return kResultTrue;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameController::getState (IBStream* state)
|
||||
{
|
||||
// Here you are asked to deliver the state of the controller (if needed)
|
||||
// Note: the real state of your plug-in is saved in the processor
|
||||
|
||||
return kResultTrue;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
IPlugView* PLUGIN_API UTF16NameController::createView (FIDString name)
|
||||
{
|
||||
// Here the Host wants to open your editor (if you have one)
|
||||
if (FIDStringsEqual (name, Vst::ViewType::kEditor))
|
||||
{
|
||||
// create your editor here and return a IPlugView ptr of it
|
||||
return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameController::setParamNormalized (Vst::ParamID tag, Vst::ParamValue value)
|
||||
{
|
||||
// called by host to update your parameters
|
||||
tresult result = EditControllerEx1::setParamNormalized (tag, value);
|
||||
return result;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameController::getParamStringByValue (Vst::ParamID tag,
|
||||
Vst::ParamValue valueNormalized,
|
||||
Vst::String128 string)
|
||||
{
|
||||
// called by host to get a string for given normalized value of a specific parameter
|
||||
// (without having to set the value!)
|
||||
return EditControllerEx1::getParamStringByValue (tag, valueNormalized, string);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameController::getParamValueByString (Vst::ParamID tag, Vst::TChar* string,
|
||||
Vst::ParamValue& valueNormalized)
|
||||
{
|
||||
// called by host to get a normalized value from a string representation of a specific parameter
|
||||
// (without having to set the value!)
|
||||
return EditControllerEx1::getParamValueByString (tag, string, valueNormalized);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Steinberg
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/utf16name/source/utf16namecontroller.h
|
||||
// Created by : Steinberg, 11/2023
|
||||
// Description : UTF16Name Example for VST 3
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "public.sdk/source/vst/vsteditcontroller.h"
|
||||
|
||||
namespace Steinberg {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// UTF16NameController
|
||||
//------------------------------------------------------------------------
|
||||
class UTF16NameController : public Vst::EditControllerEx1
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
UTF16NameController () = default;
|
||||
~UTF16NameController () SMTG_OVERRIDE = default;
|
||||
|
||||
// Create function
|
||||
static FUnknown* createInstance (void* /*context*/)
|
||||
{
|
||||
return (Vst::IEditController*)new UTF16NameController;
|
||||
}
|
||||
|
||||
// IPluginBase
|
||||
tresult PLUGIN_API initialize (FUnknown* context) SMTG_OVERRIDE;
|
||||
tresult PLUGIN_API terminate () SMTG_OVERRIDE;
|
||||
|
||||
// EditController
|
||||
tresult PLUGIN_API setComponentState (IBStream* state) SMTG_OVERRIDE;
|
||||
IPlugView* PLUGIN_API createView (FIDString name) SMTG_OVERRIDE;
|
||||
tresult PLUGIN_API setState (IBStream* state) SMTG_OVERRIDE;
|
||||
tresult PLUGIN_API getState (IBStream* state) SMTG_OVERRIDE;
|
||||
tresult PLUGIN_API setParamNormalized (Vst::ParamID tag, Vst::ParamValue value) SMTG_OVERRIDE;
|
||||
tresult PLUGIN_API getParamStringByValue (Vst::ParamID tag, Vst::ParamValue valueNormalized,
|
||||
Vst::String128 string) SMTG_OVERRIDE;
|
||||
tresult PLUGIN_API getParamValueByString (Vst::ParamID tag, Vst::TChar* string,
|
||||
Vst::ParamValue& valueNormalized) SMTG_OVERRIDE;
|
||||
|
||||
//---Interface---------
|
||||
DEFINE_INTERFACES
|
||||
// Here you can add more supported VST3 interfaces
|
||||
// DEF_INTERFACE (Vst::IXXX)
|
||||
END_DEFINE_INTERFACES (EditControllerEx1)
|
||||
DELEGATE_REFCOUNT (EditControllerEx1)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
protected:
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Steinberg
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/utf16name/source/utf16nameentry.cpp
|
||||
// Created by : Steinberg, 11/2023
|
||||
// Description : UTF16Name Example for VST 3
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "utf16nameprocessor.h"
|
||||
#include "utf16namecontroller.h"
|
||||
#include "utf16namecids.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "public.sdk/source/main/pluginfactory.h"
|
||||
|
||||
// name with UTF characters
|
||||
#define stringPluginNameU u"UTF16Name öüäéèê-やあ-مرحبًا"
|
||||
#define stringCompanyNameU u"Steinberg Media Technologies - öüäéèê-やあ-مرحبًا"
|
||||
|
||||
using namespace Steinberg::Vst;
|
||||
|
||||
#define CONCAT(prefix, text) prefix##text
|
||||
#define U(text) CONCAT(u, text)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// VST Plug-in Entry
|
||||
//------------------------------------------------------------------------
|
||||
// Windows: do not forget to include a .def file in your project to export
|
||||
// GetPluginFactory function!
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
BEGIN_FACTORY_DEF (stringCompanyName, stringCompanyWeb, stringCompanyEmail)
|
||||
|
||||
//---First Plug-in included in this factory-------
|
||||
// its kVstAudioEffectClass component
|
||||
DEF_CLASS_W2 (INLINE_UID_FROM_FUID(kUTF16NameProcessorUID),
|
||||
PClassInfo::kManyInstances, // cardinality
|
||||
kVstAudioEffectClass, // the component category (do not change this)
|
||||
stringPluginNameU, // here the Plug-in name (to be changed)
|
||||
Vst::kDistributable, // means that component and controller could be distributed on different computers
|
||||
UTF16NameVST3Category, // Subcategory for this Plug-in (to be changed)
|
||||
stringCompanyNameU,
|
||||
U(FULL_VERSION_STR), // Plug-in version (to be changed)
|
||||
U(kVstVersionString), // the VST 3 SDK version (do not change this, use always this define)
|
||||
UTF16NameProcessor::createInstance) // function pointer called when this component should be instantiated
|
||||
|
||||
// its kVstComponentControllerClass component
|
||||
DEF_CLASS_W2 (INLINE_UID_FROM_FUID (kUTF16NameControllerUID),
|
||||
PClassInfo::kManyInstances, // cardinality
|
||||
kVstComponentControllerClass,// the Controller category (do not changed this)
|
||||
stringPluginNameU, // controller name (could be the same than component name)
|
||||
0, // not used here
|
||||
"", // not used here
|
||||
U(""), // not used here
|
||||
U(FULL_VERSION_STR), // Plug-in version (to be changed)
|
||||
U(kVstVersionString), // the VST 3 SDK version (do not changed this, use always this define)
|
||||
UTF16NameController::createInstance)// function pointer called when this component should be instantiated
|
||||
END_FACTORY
|
||||
|
||||
#define TEXT "toto"
|
||||
#define UTEXT u##TEXT
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/utf16name/source/utf16nameprocessor.cpp
|
||||
// Created by : Steinberg, 11/2023
|
||||
// Description : UTF16Name Example for VST 3
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "utf16nameprocessor.h"
|
||||
#include "utf16namecids.h"
|
||||
|
||||
#include "base/source/fstreamer.h"
|
||||
#include "pluginterfaces/vst/ivstparameterchanges.h"
|
||||
|
||||
namespace Steinberg {
|
||||
//------------------------------------------------------------------------
|
||||
// UTF16NameProcessor
|
||||
//------------------------------------------------------------------------
|
||||
UTF16NameProcessor::UTF16NameProcessor ()
|
||||
{
|
||||
//--- set the wanted controller for our processor
|
||||
setControllerClass (kUTF16NameControllerUID);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
UTF16NameProcessor::~UTF16NameProcessor ()
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameProcessor::initialize (FUnknown* context)
|
||||
{
|
||||
// Here the Plug-in will be instantiated
|
||||
|
||||
//---always initialize the parent-------
|
||||
tresult result = AudioEffect::initialize (context);
|
||||
// if everything Ok, continue
|
||||
if (result != kResultOk)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//--- create Audio IO ------
|
||||
addAudioInput (STR16 ("Stereo In-öüäéèê-やあ-مرحبًا"), Steinberg::Vst::SpeakerArr::kStereo);
|
||||
addAudioOutput (STR16 ("Stereo Out-öüäéèê-やあ-مرحبًا"), Steinberg::Vst::SpeakerArr::kStereo);
|
||||
|
||||
/* If you don't need an event bus, you can remove the next line */
|
||||
addEventInput (STR16 ("Event In-öüäéèê-やあ-مرحبًا"), 1);
|
||||
|
||||
return kResultOk;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameProcessor::terminate ()
|
||||
{
|
||||
// Here the Plug-in will be de-instantiated, last possibility to remove some memory!
|
||||
|
||||
//---do not forget to call parent ------
|
||||
return AudioEffect::terminate ();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameProcessor::setActive (TBool state)
|
||||
{
|
||||
//--- called when the Plug-in is enable/disable (On/Off) -----
|
||||
return AudioEffect::setActive (state);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameProcessor::process (Vst::ProcessData& data)
|
||||
{
|
||||
//--- First : Read inputs parameter changes-----------
|
||||
|
||||
/*if (data.inputParameterChanges)
|
||||
{
|
||||
int32 numParamsChanged = data.inputParameterChanges->getParameterCount ();
|
||||
for (int32 index = 0; index < numParamsChanged; index++)
|
||||
{
|
||||
if (auto* paramQueue = data.inputParameterChanges->getParameterData (index))
|
||||
{
|
||||
Vst::ParamValue value;
|
||||
int32 sampleOffset;
|
||||
int32 numPoints = paramQueue->getPointCount ();
|
||||
switch (paramQueue->getParameterId ())
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//--- Here you have to implement your processing
|
||||
|
||||
return kResultOk;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameProcessor::setupProcessing (Vst::ProcessSetup& newSetup)
|
||||
{
|
||||
//--- called before any processing ----
|
||||
return AudioEffect::setupProcessing (newSetup);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameProcessor::canProcessSampleSize (int32 symbolicSampleSize)
|
||||
{
|
||||
// by default kSample32 is supported
|
||||
if (symbolicSampleSize == Vst::kSample32)
|
||||
return kResultTrue;
|
||||
|
||||
// disable the following comment if your processing support kSample64
|
||||
/* if (symbolicSampleSize == Vst::kSample64)
|
||||
return kResultTrue; */
|
||||
|
||||
return kResultFalse;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameProcessor::setState (IBStream* state)
|
||||
{
|
||||
// called when we load a preset, the model has to be reloaded
|
||||
IBStreamer streamer (state, kLittleEndian);
|
||||
|
||||
return kResultOk;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API UTF16NameProcessor::getState (IBStream* state)
|
||||
{
|
||||
// here we need to save the model
|
||||
IBStreamer streamer (state, kLittleEndian);
|
||||
|
||||
return kResultOk;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Steinberg
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/utf16name/source/utf16nameprocessor.h
|
||||
// Created by : Steinberg, 11/2023
|
||||
// Description : UTF16Name Example for VST 3
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "public.sdk/source/vst/vstaudioeffect.h"
|
||||
|
||||
namespace Steinberg {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// UTF16NameProcessor
|
||||
//------------------------------------------------------------------------
|
||||
class UTF16NameProcessor : public Vst::AudioEffect
|
||||
{
|
||||
public:
|
||||
UTF16NameProcessor ();
|
||||
~UTF16NameProcessor () SMTG_OVERRIDE;
|
||||
|
||||
// Create function
|
||||
static FUnknown* createInstance (void* /*context*/)
|
||||
{
|
||||
return (Vst::IAudioProcessor*)new UTF16NameProcessor;
|
||||
}
|
||||
|
||||
//--- ---------------------------------------------------------------------
|
||||
// AudioEffect overrides:
|
||||
//--- ---------------------------------------------------------------------
|
||||
/** Called at first after constructor */
|
||||
tresult PLUGIN_API initialize (FUnknown* context) SMTG_OVERRIDE;
|
||||
|
||||
/** Called at the end before destructor */
|
||||
tresult PLUGIN_API terminate () SMTG_OVERRIDE;
|
||||
|
||||
/** Switch the Plug-in on/off */
|
||||
tresult PLUGIN_API setActive (TBool state) SMTG_OVERRIDE;
|
||||
|
||||
/** Will be called before any process call */
|
||||
tresult PLUGIN_API setupProcessing (Vst::ProcessSetup& newSetup) SMTG_OVERRIDE;
|
||||
|
||||
/** Asks if a given sample size is supported see SymbolicSampleSizes. */
|
||||
tresult PLUGIN_API canProcessSampleSize (int32 symbolicSampleSize) SMTG_OVERRIDE;
|
||||
|
||||
/** Here we go...the process call */
|
||||
tresult PLUGIN_API process (Vst::ProcessData& data) SMTG_OVERRIDE;
|
||||
|
||||
/** For persistence */
|
||||
tresult PLUGIN_API setState (IBStream* state) SMTG_OVERRIDE;
|
||||
tresult PLUGIN_API getState (IBStream* state) SMTG_OVERRIDE;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
protected:
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Steinberg
|
||||
@@ -0,0 +1,34 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/utf16name/source/version.h
|
||||
// Created by : Steinberg, 11/2023
|
||||
// Description : UTF16Name Example for VST 3
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "pluginterfaces/base/fplatform.h"
|
||||
|
||||
// Plain project version file generated by cmake
|
||||
#include "projectversion.h"
|
||||
|
||||
#define stringOriginalFilename "UTF16Name.vst3"
|
||||
#if SMTG_PLATFORM_64
|
||||
#define stringFileDescription "UTF16Name VST3 (64Bit)"
|
||||
#else
|
||||
#define stringFileDescription "UTF16Name VST3"
|
||||
#endif
|
||||
#define stringCompanyWeb "http://www.steinberg.net"
|
||||
#define stringCompanyEmail "mailto:info@steinberg.de"
|
||||
#define stringCompanyName "Steinberg Media Technologies"
|
||||
#define stringLegalCopyright "� 2024 Steinberg Media Technologies"
|
||||
#define stringLegalTrademarks "VST is a trademark of Steinberg Media Technologies GmbH"
|
||||
Reference in New Issue
Block a user