Initial release
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstattributes.h
|
||||
// Created by : Steinberg, 05/2006
|
||||
// Description : VST Attribute Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Attribute list used in IMessage and IStreamAttributes: Vst::IAttributeList
|
||||
\ingroup vstIHost vst300
|
||||
- [host imp]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
An attribute list associates values with a key (id: some predefined keys can be found in \ref
|
||||
presetAttributes).
|
||||
*/
|
||||
class IAttributeList : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** \ingroup vst3typedef */
|
||||
typedef const char* AttrID;
|
||||
|
||||
/** Sets integer value. */
|
||||
virtual tresult PLUGIN_API setInt (AttrID id /*in*/, int64 value /*in*/) = 0;
|
||||
|
||||
/** Gets integer value. */
|
||||
virtual tresult PLUGIN_API getInt (AttrID id /*in*/, int64& value /*out*/) = 0;
|
||||
|
||||
/** Sets float value. */
|
||||
virtual tresult PLUGIN_API setFloat (AttrID id /*in*/, double value /*in*/) = 0;
|
||||
|
||||
/** Gets float value. */
|
||||
virtual tresult PLUGIN_API getFloat (AttrID id /*in*/, double& value /*out*/) = 0;
|
||||
|
||||
/** Sets string value (UTF16) (must be null-terminated!). */
|
||||
virtual tresult PLUGIN_API setString (AttrID id /*in*/, const TChar* string /*in*/) = 0;
|
||||
|
||||
/** Gets string value (UTF16). Note that Size is in Byte, not the string Length!
|
||||
Do not forget to multiply the length by sizeof (TChar)! */
|
||||
virtual tresult PLUGIN_API getString (AttrID id /*in*/, TChar* string /*out*/,
|
||||
uint32 sizeInBytes /*in*/) = 0;
|
||||
|
||||
/** Sets binary data. */
|
||||
virtual tresult PLUGIN_API setBinary (AttrID id /*in*/, const void* data /*in*/,
|
||||
uint32 sizeInBytes /*in*/) = 0;
|
||||
|
||||
/** Gets binary data. */
|
||||
virtual tresult PLUGIN_API getBinary (AttrID id /*in*/, const void*& data /*out*/,
|
||||
uint32& sizeInBytes) = 0;
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IAttributeList, 0x1E5F0AEB, 0xCC7F4533, 0xA2544011, 0x38AD5EE4)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Meta attributes of a stream: Vst::IStreamAttributes
|
||||
\ingroup vstIHost vst360
|
||||
- [host imp]
|
||||
- [extends IBStream]
|
||||
- [released: 3.6.0]
|
||||
- [optional]
|
||||
|
||||
Interface to access preset meta information from stream, for example used in setState\getState
|
||||
in order to inform the plug-in about the current context in which the preset loading\saving occurs
|
||||
(Project context or Preset load\save (see \ref StateType)) or used to get the full file path of the
|
||||
loaded preset (if available).
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/ustring.h"
|
||||
#include "pluginterfaces/vst/vstpresetkeys.h"
|
||||
...
|
||||
|
||||
tresult PLUGIN_API MyPlugin::setState (IBStream* state)
|
||||
{
|
||||
FUnknownPtr<IStreamAttributes> stream (state);
|
||||
if (stream)
|
||||
{
|
||||
if (IAttributeList* list = stream->getAttributes ())
|
||||
{
|
||||
// get the current type (project/Default..) of this state
|
||||
String128 string;
|
||||
if (list->getString (PresetAttributes::kStateType, string, 128 * sizeof (TChar)) ==
|
||||
kResultTrue)
|
||||
{
|
||||
UString128 tmp (string);
|
||||
char ascii[128];
|
||||
tmp.toAscii (ascii, 128);
|
||||
if (strncmp (ascii, StateType::kProject, strlen (StateType::kProject)) == 0)
|
||||
{
|
||||
// we are in project loading context...
|
||||
}
|
||||
}
|
||||
|
||||
// get the full file path of this state
|
||||
TChar fullPath[1024];
|
||||
if (list->getString (PresetAttributes::kFilePathStringType, fullPath,
|
||||
1024 * sizeof (TChar)) == kResultTrue)
|
||||
{
|
||||
// here we have the full path ...
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//...read the state here.....
|
||||
return kResultTrue;
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class IStreamAttributes : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Gets filename (without file extension) of the stream. */
|
||||
virtual tresult PLUGIN_API getFileName (String128 name /*inout*/) = 0;
|
||||
|
||||
/** Gets meta information list. */
|
||||
virtual IAttributeList* PLUGIN_API getAttributes () = 0;
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IStreamAttributes, 0xD6CE2FFC, 0xEFAF4B8C, 0x9E74F1BB, 0x12DA44B4)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,471 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstaudioprocessor.h
|
||||
// Created by : Steinberg, 10/2005
|
||||
// Description : VST Audio Processing Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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 "ivstcomponent.h"
|
||||
#include "vstspeaker.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Class Category Name for Audio Processor Component */
|
||||
//------------------------------------------------------------------------
|
||||
#ifndef kVstAudioEffectClass
|
||||
#define kVstAudioEffectClass "Audio Module Class"
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
class IEventList;
|
||||
class IParameterChanges;
|
||||
struct ProcessContext;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Component Types used as subCategories in PClassInfo2 */
|
||||
namespace PlugType
|
||||
{
|
||||
/**
|
||||
* \defgroup plugType Plug-in Type used for subCategories
|
||||
* @{ */
|
||||
SMTG_CONSTEXPR const CString kFx = "Fx"; ///< others type (not categorized)
|
||||
SMTG_CONSTEXPR const CString kFxAnalyzer = "Fx|Analyzer"; ///< Scope, FFT-Display, Loudness Processing...
|
||||
SMTG_CONSTEXPR const CString kFxBass = "Fx|Bass"; ///< Tools dedicated to Bass Guitar
|
||||
SMTG_CONSTEXPR const CString kFxChannelStrip = "Fx|Channel Strip"; ///< Tools dedicated to Channel Strip
|
||||
SMTG_CONSTEXPR const CString kFxDelay = "Fx|Delay"; ///< Delay, Multi-tap Delay, Ping-Pong Delay...
|
||||
SMTG_CONSTEXPR const CString kFxDistortion = "Fx|Distortion"; ///< Amp Simulator, Sub-Harmonic, SoftClipper...
|
||||
SMTG_CONSTEXPR const CString kFxDrums = "Fx|Drums"; ///< Tools dedicated to Drums...
|
||||
SMTG_CONSTEXPR const CString kFxDynamics = "Fx|Dynamics"; ///< Compressor, Expander, Gate, Limiter, Maximizer, Tape Simulator, EnvelopeShaper...
|
||||
SMTG_CONSTEXPR const CString kFxEQ = "Fx|EQ"; ///< Equalization, Graphical EQ...
|
||||
SMTG_CONSTEXPR const CString kFxFilter = "Fx|Filter"; ///< WahWah, ToneBooster, Specific Filter,...
|
||||
SMTG_CONSTEXPR const CString kFxGenerator = "Fx|Generator"; ///< Tone Generator, Noise Generator...
|
||||
SMTG_CONSTEXPR const CString kFxGuitar = "Fx|Guitar"; ///< Tools dedicated to Guitar
|
||||
SMTG_CONSTEXPR const CString kFxInstrument = "Fx|Instrument"; ///< Fx which could be loaded as Instrument too
|
||||
SMTG_CONSTEXPR const CString kFxInstrumentExternal = "Fx|Instrument|External"; ///< Fx which could be loaded as Instrument too and is external (wrapped Hardware)
|
||||
SMTG_CONSTEXPR const CString kFxMastering = "Fx|Mastering"; ///< Dither, Noise Shaping,...
|
||||
SMTG_CONSTEXPR const CString kFxMicrophone = "Fx|Microphone"; ///< Tools dedicated to Microphone
|
||||
SMTG_CONSTEXPR const CString kFxModulation = "Fx|Modulation"; ///< Phaser, Flanger, Chorus, Tremolo, Vibrato, AutoPan, Rotary, Cloner...
|
||||
SMTG_CONSTEXPR const CString kFxNetwork = "Fx|Network"; ///< using Network
|
||||
SMTG_CONSTEXPR const CString kFxPitchShift = "Fx|Pitch Shift"; ///< Pitch Processing, Pitch Correction, Vocal Tuning...
|
||||
SMTG_CONSTEXPR const CString kFxRestoration = "Fx|Restoration"; ///< Denoiser, Declicker,...
|
||||
SMTG_CONSTEXPR const CString kFxReverb = "Fx|Reverb"; ///< Reverberation, Room Simulation, Convolution Reverb...
|
||||
SMTG_CONSTEXPR const CString kFxSpatial = "Fx|Spatial"; ///< MonoToStereo, StereoEnhancer,...
|
||||
SMTG_CONSTEXPR const CString kFxSurround = "Fx|Surround"; ///< dedicated to surround processing: LFE Splitter, Bass Manager...
|
||||
SMTG_CONSTEXPR const CString kFxTools = "Fx|Tools"; ///< Volume, Mixer, Tuner...
|
||||
SMTG_CONSTEXPR const CString kFxVocals = "Fx|Vocals"; ///< Tools dedicated to Vocals
|
||||
|
||||
SMTG_CONSTEXPR const CString kInstrument = "Instrument"; ///< Effect used as instrument (sound generator), not as insert
|
||||
SMTG_CONSTEXPR const CString kInstrumentDrum = "Instrument|Drum"; ///< Instrument for Drum sounds
|
||||
SMTG_CONSTEXPR const CString kInstrumentExternal = "Instrument|External";///< External Instrument (wrapped Hardware)
|
||||
SMTG_CONSTEXPR const CString kInstrumentPiano = "Instrument|Piano"; ///< Instrument for Piano sounds
|
||||
SMTG_CONSTEXPR const CString kInstrumentSampler = "Instrument|Sampler"; ///< Instrument based on Samples
|
||||
SMTG_CONSTEXPR const CString kInstrumentSynth = "Instrument|Synth"; ///< Instrument based on Synthesis
|
||||
SMTG_CONSTEXPR const CString kInstrumentSynthSampler = "Instrument|Synth|Sampler"; ///< Instrument based on Synthesis and Samples
|
||||
|
||||
SMTG_CONSTEXPR const CString kAmbisonics = "Ambisonics"; ///< used for Ambisonics channel (FX or Panner/Mixconverter/Up-Mixer/Down-Mixer when combined with other category)
|
||||
SMTG_CONSTEXPR const CString kAnalyzer = "Analyzer"; ///< Meter, Scope, FFT-Display, not selectable as insert plug-in
|
||||
SMTG_CONSTEXPR const CString kNoOfflineProcess = "NoOfflineProcess"; ///< will be NOT used for plug-in offline processing (will work as normal insert plug-in)
|
||||
SMTG_CONSTEXPR const CString kOnlyARA = "OnlyARA"; ///< used for plug-ins that require ARA to operate (will not work as normal insert plug-in)
|
||||
SMTG_CONSTEXPR const CString kOnlyOfflineProcess = "OnlyOfflineProcess"; ///< used for plug-in offline processing (will not work as normal insert plug-in)
|
||||
SMTG_CONSTEXPR const CString kOnlyRealTime = "OnlyRT"; ///< indicates that it supports only realtime process call, no processing faster than realtime
|
||||
SMTG_CONSTEXPR const CString kSpatial = "Spatial"; ///< used for SurroundPanner
|
||||
SMTG_CONSTEXPR const CString kSpatialFx = "Spatial|Fx"; ///< used for SurroundPanner and as insert effect
|
||||
SMTG_CONSTEXPR const CString kUpDownMix = "Up-Downmix"; ///< used for Mixconverter/Up-Mixer/Down-Mixer
|
||||
|
||||
SMTG_CONSTEXPR const CString kMono = "Mono"; ///< used for Mono only plug-in [optional]
|
||||
SMTG_CONSTEXPR const CString kStereo = "Stereo"; ///< used for Stereo only plug-in [optional]
|
||||
SMTG_CONSTEXPR const CString kSurround = "Surround"; ///< used for Surround only plug-in [optional]
|
||||
|
||||
/**@}*/
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Component Flags used as classFlags in PClassInfo2 */
|
||||
enum ComponentFlags
|
||||
{
|
||||
//------------------------------------------------------------------------
|
||||
kDistributable = 1 << 0, ///< Component can be run on remote computer
|
||||
kSimpleModeSupported = 1 << 1 ///< Component supports simple IO mode (or works in simple mode anyway) see \ref vst3IoMode
|
||||
//------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Symbolic sample size.
|
||||
* \see ProcessSetup, ProcessData
|
||||
*/
|
||||
enum SymbolicSampleSizes
|
||||
{
|
||||
kSample32, ///< 32-bit precision
|
||||
kSample64 ///< 64-bit precision
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Processing mode informs the plug-in about the context and at which frequency the process call is
|
||||
* called.
|
||||
* .
|
||||
* VST3 defines 3 modes:
|
||||
*
|
||||
* - kRealtime: each process call is called at a realtime frequency (defined by [numSamples of
|
||||
* ProcessData] / samplerate). The plug-in should always try to process as fast as possible in order
|
||||
* to let enough time slice to other plug-ins.
|
||||
*
|
||||
* - kPrefetch: each process call could be called at a variable frequency (jitter, slower /
|
||||
* faster than realtime), the plug-in should process at the same quality level than realtime,
|
||||
* plug-in must not slow down to realtime (e.g. disk streaming)! The host should avoid to process in
|
||||
* kPrefetch mode such sampler based plug-in.
|
||||
*
|
||||
* - kOffline: each process call could be faster than realtime or slower, higher quality than
|
||||
* realtime could be used. plug-ins using disk streaming should be sure that they have enough time
|
||||
* in the process call for streaming, if needed by slowing down to realtime or slower.
|
||||
* .
|
||||
* Note about Process Modes switching:
|
||||
* - Switching between kRealtime and kPrefetch process modes are done in realtime thread without
|
||||
* need of calling IAudioProcessor::setupProcessing, the plug-in should check in process call the
|
||||
* member processMode of ProcessData in order to know in which mode it is processed.
|
||||
* - Switching between kRealtime (or kPrefetch) and kOffline requires that the host calls
|
||||
* IAudioProcessor::setupProcessing in order to inform the plug-in about this mode change.
|
||||
* .
|
||||
* \see ProcessSetup, ProcessData
|
||||
*/
|
||||
enum ProcessModes
|
||||
{
|
||||
kRealtime, ///< realtime processing
|
||||
kPrefetch, ///< prefetch processing
|
||||
kOffline ///< offline processing
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** kNoTail
|
||||
*
|
||||
* to be returned by getTailSamples when no tail is wanted
|
||||
* \see IAudioProcessor::getTailSamples
|
||||
*/
|
||||
static const uint32 kNoTail = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** kInfiniteTail
|
||||
*
|
||||
* to be returned by getTailSamples when infinite tail is wanted
|
||||
* \see IAudioProcessor::getTailSamples
|
||||
*/
|
||||
static const uint32 kInfiniteTail = kMaxInt32u;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Audio processing setup.
|
||||
* \see IAudioProcessor::setupProcessing
|
||||
*/
|
||||
struct ProcessSetup
|
||||
{
|
||||
//------------------------------------------------------------------------
|
||||
int32 processMode; ///< \ref ProcessModes
|
||||
int32 symbolicSampleSize; ///< \ref SymbolicSampleSizes
|
||||
int32 maxSamplesPerBlock; ///< maximum number of samples per audio block
|
||||
SampleRate sampleRate; ///< sample rate
|
||||
//------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Processing buffers of an audio bus.
|
||||
This structure contains the processing buffer for each channel of an audio bus.
|
||||
|
||||
- The number of channels (numChannels) must always match the current bus arrangement. It could be
|
||||
set to value '0' when the host wants to flush the parameters (when the plug-in is not processed).
|
||||
|
||||
- The size of the channel buffer array must always match the number of channels. So the host must
|
||||
always supply an array for the channel buffers, regardless if the bus is active or not. However, if
|
||||
an audio bus is currently inactive, the actual sample buffer addresses are safe to be null.
|
||||
|
||||
- The silence flag is set when every sample of the according buffer has the value '0'. It is
|
||||
intended to be used as help for optimizations allowing a plug-in to reduce processing activities.
|
||||
But even if this flag is set for a channel, the channel buffers must still point to valid memory!
|
||||
This flag is optional. A host is free to support it or not.
|
||||
.
|
||||
\see ProcessData
|
||||
*/
|
||||
struct AudioBusBuffers
|
||||
{
|
||||
AudioBusBuffers () : numChannels (0), silenceFlags (0), channelBuffers64 (nullptr) {}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
int32 numChannels; ///< number of audio channels in bus
|
||||
uint64 silenceFlags; ///< Bitset of silence state per channel
|
||||
union
|
||||
{
|
||||
Sample32** channelBuffers32; ///< sample buffers to process with 32-bit precision
|
||||
Sample64** channelBuffers64; ///< sample buffers to process with 64-bit precision
|
||||
};
|
||||
//------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Any data needed in audio processing.
|
||||
* The host prepares AudioBusBuffers for each input/output bus,
|
||||
* regardless of the bus activation state. Bus buffer indices always match
|
||||
* with bus indices used in IComponent::getBusInfo of media type kAudio.
|
||||
* \see AudioBusBuffers, IParameterChanges, IEventList, ProcessContext, IProcessContextRequirements
|
||||
*/
|
||||
struct ProcessData
|
||||
{
|
||||
ProcessData ()
|
||||
: processMode (0)
|
||||
, symbolicSampleSize (kSample32)
|
||||
, numSamples (0)
|
||||
, numInputs (0)
|
||||
, numOutputs (0)
|
||||
, inputs (nullptr)
|
||||
, outputs (nullptr)
|
||||
, inputParameterChanges (nullptr)
|
||||
, outputParameterChanges (nullptr)
|
||||
, inputEvents (nullptr)
|
||||
, outputEvents (nullptr)
|
||||
, processContext (nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
int32 processMode; ///< processing mode - value of \ref ProcessModes
|
||||
int32 symbolicSampleSize; ///< sample size - value of \ref SymbolicSampleSizes
|
||||
int32 numSamples; ///< number of samples to process
|
||||
int32 numInputs; ///< number of audio input busses
|
||||
int32 numOutputs; ///< number of audio output busses
|
||||
AudioBusBuffers* inputs; ///< buffers of input busses
|
||||
AudioBusBuffers* outputs; ///< buffers of output busses
|
||||
|
||||
IParameterChanges* inputParameterChanges; ///< incoming parameter changes for this block
|
||||
IParameterChanges* outputParameterChanges; ///< outgoing parameter changes for this block (optional)
|
||||
IEventList* inputEvents; ///< incoming events for this block (optional)
|
||||
IEventList* outputEvents; ///< outgoing events for this block (optional)
|
||||
ProcessContext* processContext; ///< processing context (optional, but most welcome)
|
||||
//------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Audio processing interface: Vst::IAudioProcessor
|
||||
\ingroup vstIPlug vst300
|
||||
- [plug imp]
|
||||
- [extends IComponent]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
This interface must always be supported by audio processing plug-ins.
|
||||
*/
|
||||
class IAudioProcessor : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Try to set (host => plug-in) a wanted arrangement for inputs and outputs.
|
||||
* The host should always deliver the same number of input and output busses than the plug-in
|
||||
* needs (see \ref IComponent::getBusCount). The plug-in has 3 possibilities to react on this
|
||||
* setBusArrangements call:\n
|
||||
*
|
||||
* 1. The plug-in accepts these arrangements, then it should modify, if needed, its busses to
|
||||
* match these new arrangements (later on asked by the host with IComponent::getBusInfo () or
|
||||
* IAudioProcessor::getBusArrangement ()) and then should return kResultTrue.\n
|
||||
*
|
||||
* 2. The plug-in does not accept or support these requested arrangements for all
|
||||
* inputs/outputs or just for some or only one bus, but the plug-in can try to adapt its
|
||||
* current arrangements according to the requested ones (requested arrangements for kMain busses
|
||||
* should be handled with more priority than the ones for kAux busses), then it should modify
|
||||
* its busses arrangements and should return kResultFalse.\n
|
||||
*
|
||||
* 3. Same than the point 2 above the plug-in does not support these requested arrangements but
|
||||
* the plug-in cannot find corresponding arrangements, the plug-in could keep its current
|
||||
* arrangement or fall back to a default arrangement by modifying its busses arrangements and
|
||||
* should return kResultFalse.\n
|
||||
*
|
||||
* \param inputs pointer to an array of \ref SpeakerArrangement
|
||||
* \param numIns number of \ref SpeakerArrangement in inputs array
|
||||
* \param outputs pointer to an array of \ref SpeakerArrangement
|
||||
* \param numOuts number of \ref SpeakerArrangement in outputs array
|
||||
* Returns kResultTrue when Arrangements is supported and is the current one, else returns
|
||||
* kResultFalse.
|
||||
*
|
||||
* \note [UI-thread & (Initialized | Connected | Setup Done)] */
|
||||
virtual tresult PLUGIN_API setBusArrangements (SpeakerArrangement* inputs /*in*/,
|
||||
int32 numIns /*in*/,
|
||||
SpeakerArrangement* outputs /*in*/,
|
||||
int32 numOuts /*in*/) = 0;
|
||||
|
||||
/** Gets the bus arrangement for a given direction (input/output) and index.
|
||||
* Note: IComponent::getBusInfo () and IAudioProcessor::getBusArrangement () should be always
|
||||
* return the same information about the busses arrangements.
|
||||
* \note [UI-thread & (Initialized | Connected | Setup Done | Activated | Processing] */
|
||||
virtual tresult PLUGIN_API getBusArrangement (BusDirection dir /*in*/, int32 index /*in*/,
|
||||
SpeakerArrangement& arr /*inout*/) = 0;
|
||||
|
||||
/** Asks if a given sample size is supported see \ref SymbolicSampleSizes.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API canProcessSampleSize (int32 symbolicSampleSize /*in*/) = 0;
|
||||
|
||||
/** Gets the current Latency in samples.
|
||||
* The returned value defines the group delay or the latency of the plug-in. For example, if
|
||||
* the plug-in internally needs to look in advance (like compressors) 512 samples then this
|
||||
* plug-in should report 512 as latency. If during the use of the plug-in this latency change,
|
||||
* the plug-in has to inform the host by using IComponentHandler::restartComponent
|
||||
* (kLatencyChanged), this could lead to audio playback interruption because the host has to
|
||||
* recompute its internal mixer delay compensation. Note that for player live recording this
|
||||
* latency should be zero or small.
|
||||
* \note [UI-thread & Setup Done] */
|
||||
virtual uint32 PLUGIN_API getLatencySamples () = 0;
|
||||
|
||||
/** Called in disable state (setActive not called with true) before setProcessing is called and
|
||||
* processing will begin.
|
||||
* \note [UI-thread & (Initialized | Connected)]] */
|
||||
virtual tresult PLUGIN_API setupProcessing (ProcessSetup& setup /*in*/) = 0;
|
||||
|
||||
/** Informs the plug-in about the processing state. This will be called before any process calls
|
||||
* start with true and after with false.
|
||||
* Note that setProcessing (false) may be called after setProcessing (true) without any process
|
||||
* calls.
|
||||
* Note this function could be called in the UI or in Processing Thread, thats why the plug-in
|
||||
* should only light operation (no memory allocation or big setup reconfiguration),
|
||||
* this could be used to reset some buffers (like Delay line or Reverb).
|
||||
* The host has to be sure that it is called only when the plug-in is enable (setActive (true)
|
||||
* was called).
|
||||
* \note [(UI-thread or processing-thread) & Activated] */
|
||||
virtual tresult PLUGIN_API setProcessing (TBool state /*in*/) = 0;
|
||||
|
||||
/** The Process call, where all information (parameter changes, event, audio buffer) are passed.
|
||||
* \note [processing-thread & Processing] */
|
||||
virtual tresult PLUGIN_API process (ProcessData& data /*in*/) = 0;
|
||||
|
||||
/** Gets tail size in samples. For example, if the plug-in is a Reverb plug-in and it knows that
|
||||
* the maximum length of the Reverb is 2sec, then it has to return in getTailSamples ()
|
||||
* (in VST2 it was getGetTailSize ()): 2*sampleRate.
|
||||
* This information could be used by host for offline processing, process optimization and
|
||||
* downmix (avoiding signal cut (clicks)).
|
||||
* It should return:
|
||||
* - kNoTail when no tail
|
||||
* - x * sampleRate when x Sec tail.
|
||||
* - kInfiniteTail when infinite tail.
|
||||
*
|
||||
* \note [UI-thread & Setup Done] */
|
||||
virtual uint32 PLUGIN_API getTailSamples () = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IAudioProcessor, 0x42043F99, 0xB7DA453C, 0xA569E79D, 0x9AAEC33D)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended IAudioProcessor interface for a component: Vst::IAudioPresentationLatency
|
||||
\ingroup vstIPlug vst310
|
||||
- [plug imp]
|
||||
- [extends IAudioProcessor]
|
||||
- [released: 3.1.0]
|
||||
- [optional]
|
||||
|
||||
Inform the plug-in about how long from the moment of generation/acquiring (from file or from Input)
|
||||
it will take for its input to arrive, and how long it will take for its output to be presented (to
|
||||
output or to speaker).
|
||||
|
||||
Note for Input Presentation Latency: when reading from file, the first plug-in will have an input
|
||||
presentation latency set to zero. When monitoring audio input from an audio device, the initial
|
||||
input latency is the input latency of the audio device itself.
|
||||
|
||||
Note for Output Presentation Latency: when writing to a file, the last plug-in will have an output
|
||||
presentation latency set to zero. When the output of this plug-in is connected to an audio device,
|
||||
the initial output latency is the output latency of the audio device itself.
|
||||
|
||||
A value of zero either means no latency or an unknown latency.
|
||||
|
||||
Each plug-in adding a latency (returning a none zero value for IAudioProcessor::getLatencySamples)
|
||||
will modify the input presentation latency of the next plug-ins in the mixer routing graph and will
|
||||
modify the output presentation latency of the previous plug-ins.
|
||||
|
||||
\n
|
||||
\image html "iaudiopresentationlatency_usage.png"
|
||||
\n
|
||||
\see IAudioProcessor
|
||||
\see IComponent
|
||||
*/
|
||||
class IAudioPresentationLatency : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Informs the plug-in about the Audio Presentation Latency in samples for a given direction
|
||||
* (kInput/kOutput) and bus index.
|
||||
* \note [UI-thread & Activated] */
|
||||
virtual tresult PLUGIN_API setAudioPresentationLatencySamples (
|
||||
BusDirection dir /*in*/, int32 busIndex /*in*/, uint32 latencyInSamples /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IAudioPresentationLatency, 0x309ECE78, 0xEB7D4fae, 0x8B2225D9, 0x09FD08B6)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended IAudioProcessor interface for a component: Vst::IProcessContextRequirements
|
||||
\ingroup vstIPlug vst370
|
||||
- [plug imp]
|
||||
- [extends IAudioProcessor]
|
||||
- [released: 3.7.0]
|
||||
- [mandatory]
|
||||
|
||||
To get accurate process context information (Vst::ProcessContext), it is now required to implement
|
||||
this interface and return the desired bit mask of flags which your audio effect needs. If you do not
|
||||
implement this interface, you may not get any information at all of the process function!
|
||||
|
||||
The host asks for this information once between initialize and setActive (in Setup Done). It cannot
|
||||
be changed afterwards.
|
||||
|
||||
This gives the host the opportunity to better optimize the audio process graph when it knows which
|
||||
plug-ins need which information.
|
||||
|
||||
Plug-ins built with an earlier SDK version (< 3.7) will still get the old information, but the
|
||||
information may not be as accurate as when using this interface.
|
||||
*/
|
||||
class IProcessContextRequirements : public FUnknown
|
||||
{
|
||||
public:
|
||||
enum Flags
|
||||
{
|
||||
kNeedSystemTime = 1 << 0, // kSystemTimeValid
|
||||
kNeedContinousTimeSamples = 1 << 1, // kContTimeValid
|
||||
kNeedProjectTimeMusic = 1 << 2, // kProjectTimeMusicValid
|
||||
kNeedBarPositionMusic = 1 << 3, // kBarPositionValid
|
||||
kNeedCycleMusic = 1 << 4, // kCycleValid
|
||||
kNeedSamplesToNextClock = 1 << 5, // kClockValid
|
||||
kNeedTempo = 1 << 6, // kTempoValid
|
||||
kNeedTimeSignature = 1 << 7, // kTimeSigValid
|
||||
kNeedChord = 1 << 8, // kChordValid
|
||||
kNeedFrameRate = 1 << 9, // kSmpteValid
|
||||
kNeedTransportState = 1 << 10, // kPlaying, kCycleActive, kRecording
|
||||
};
|
||||
/** Allows the host to ask the plug-in what is really needed for the process context information
|
||||
* (Vst::ProcessContext).
|
||||
* \note [UI-thread & Setup Done] */
|
||||
virtual uint32 PLUGIN_API getProcessContextRequirements () = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IProcessContextRequirements, 0x2A654303, 0xEF764E3D, 0x95B5FE83, 0x730EF6D0)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,68 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstautomationstate.h
|
||||
// Created by : Steinberg, 02/2015
|
||||
// Description : VST Automation State Interface
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/vsttypes.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended plug-in interface IEditController: Vst::IAutomationState
|
||||
\ingroup vstIPlug vst365
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.6.5]
|
||||
- [optional]
|
||||
|
||||
Hosts can inform the plug-in about its current automation state (Read/Write/Nothing).
|
||||
*/
|
||||
class IAutomationState : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
enum AutomationStates : int32
|
||||
{
|
||||
kNoAutomation = 0, ///< Not Read and not Write
|
||||
kReadState = 1 << 0, ///< Read state
|
||||
kWriteState = 1 << 1, ///< Write state
|
||||
|
||||
kReadWriteState = kReadState | kWriteState, ///< Read and Write enable
|
||||
};
|
||||
|
||||
/** Sets the current Automation state.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API setAutomationState (int32 state /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IAutomationState, 0xB4E8287F, 0x1BB346AA, 0x83A46667, 0x68937BAB)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,269 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstchannelcontextinfo.h
|
||||
// Created by : Steinberg, 02/2014
|
||||
// Description : VST Channel Context Info Interface
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/vsttypes.h"
|
||||
#include "pluginterfaces/vst/ivstattributes.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
/** For Channel Context Info Interface */
|
||||
namespace ChannelContext {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------
|
||||
/** Channel context interface: Vst::IInfoListener
|
||||
\ingroup vstIHost vst365
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.6.5]
|
||||
- [optional]
|
||||
|
||||
Allows the host to inform the plug-in about the context in which the plug-in is instantiated,
|
||||
mainly channel based info (color, name, index,...). Index can be defined inside a namespace
|
||||
(for example, index start from 1 to N for Type Input/Output Channel (Index namespace) and index
|
||||
start from 1 to M for Type Audio Channel).\n
|
||||
As soon as the plug-in provides this IInfoListener interface, the host will call setChannelContextInfos
|
||||
for each change occurring to this channel (new name, new color, new indexation,...)
|
||||
|
||||
\section IChannelContextExample Example
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API MyPlugin::setChannelContextInfos (IAttributeList* list)
|
||||
{
|
||||
if (list)
|
||||
{
|
||||
// optional we can ask for the Channel Name Length
|
||||
int64 length;
|
||||
if (list->getInt (ChannelContext::kChannelNameLengthKey, length) == kResultTrue)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// get the Channel Name where we, as plug-in, are instantiated
|
||||
String128 name;
|
||||
if (list->getString (ChannelContext::kChannelNameKey, name, sizeof (name)) == kResultTrue)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// get the Channel UID
|
||||
if (list->getString (ChannelContext::kChannelUIDKey, name, sizeof (name)) == kResultTrue)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// get Channel RuntimeID
|
||||
int64 runtimeId;
|
||||
if (list->getInt (ChannelContext::kChannelRuntimeIDKey, runtimeId) == kResultTrue)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// get Channel Index
|
||||
int64 index;
|
||||
if (list->getInt (ChannelContext::kChannelIndexKey, index) == kResultTrue)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// get the Channel Color
|
||||
int64 color;
|
||||
if (list->getInt (ChannelContext::kChannelColorKey, color) == kResultTrue)
|
||||
{
|
||||
uint32 channelColor = (uint32)color;
|
||||
String str;
|
||||
str.printf ("%x%x%x%x", ChannelContext::GetAlpha (channelColor),
|
||||
ChannelContext::GetRed (channelColor),
|
||||
ChannelContext::GetGreen (channelColor),
|
||||
ChannelContext::GetBlue (channelColor));
|
||||
String128 string128;
|
||||
Steinberg::UString (string128, 128).fromAscii (str);
|
||||
...
|
||||
}
|
||||
|
||||
// get Channel Index Namespace Order of the current used index namespace
|
||||
if (list->getInt (ChannelContext::kChannelIndexNamespaceOrderKey, index) == kResultTrue)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// get the channel Index Namespace Length
|
||||
if (list->getInt (ChannelContext::kChannelIndexNamespaceLengthKey, length) == kResultTrue)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// get the channel Index Namespace
|
||||
String128 namespaceName;
|
||||
if (list->getString (ChannelContext::kChannelIndexNamespaceKey, namespaceName, sizeof (namespaceName)) == kResultTrue)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
// get plug-in Channel Location
|
||||
int64 location;
|
||||
if (list->getInt (ChannelContext::kChannelPluginLocationKey, location) == kResultTrue)
|
||||
{
|
||||
String128 string128;
|
||||
switch (location)
|
||||
{
|
||||
case ChannelContext::kPreVolumeFader:
|
||||
Steinberg::UString (string128, 128).fromAscii ("PreVolFader");
|
||||
break;
|
||||
case ChannelContext::kPostVolumeFader:
|
||||
Steinberg::UString (string128, 128).fromAscii ("PostVolFader");
|
||||
break;
|
||||
case ChannelContext::kUsedAsPanner:
|
||||
Steinberg::UString (string128, 128).fromAscii ("UsedAsPanner");
|
||||
break;
|
||||
default: Steinberg::UString (string128, 128).fromAscii ("unknown!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// do not forget to call addRef () if you want to keep this list
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class IInfoListener : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Receive the channel context infos from host.
|
||||
* \note [UI-thread & (Initialized | Connected | Setup Done | Activated | Processing)] */
|
||||
virtual tresult PLUGIN_API setChannelContextInfos (IAttributeList* list /*in*/) = 0;
|
||||
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IInfoListener, 0x0F194781, 0x8D984ADA, 0xBBA0C1EF, 0xC011D8D0)
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Values used for kChannelPluginLocationKey */
|
||||
enum ChannelPluginLocation
|
||||
{
|
||||
kPreVolumeFader = 0,
|
||||
kPostVolumeFader,
|
||||
kUsedAsPanner
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------
|
||||
// Colors
|
||||
//------------------------------------------------------------------------
|
||||
/** \ingroup vst3typedef */
|
||||
/**@{*/
|
||||
//------------------------------------------------------------------------
|
||||
/** ARGB (Alpha-Red-Green-Blue) */
|
||||
typedef uint32 ColorSpec;
|
||||
typedef uint8 ColorComponent;
|
||||
/**@}*/
|
||||
|
||||
/** Returns the Blue part of the given ColorSpec */
|
||||
inline ColorComponent GetBlue (ColorSpec cs)
|
||||
{
|
||||
return (ColorComponent) (cs & 0x000000FF);
|
||||
}
|
||||
/** Returns the Green part of the given ColorSpec */
|
||||
inline ColorComponent GetGreen (ColorSpec cs)
|
||||
{
|
||||
return (ColorComponent) ((cs >> 8) & 0x000000FF);
|
||||
}
|
||||
/** Returns the Red part of the given ColorSpec */
|
||||
inline ColorComponent GetRed (ColorSpec cs)
|
||||
{
|
||||
return (ColorComponent) ((cs >> 16) & 0x000000FF);
|
||||
}
|
||||
/** Returns the Alpha part of the given ColorSpec */
|
||||
inline ColorComponent GetAlpha (ColorSpec cs)
|
||||
{
|
||||
return (ColorComponent) ((cs >> 24) & 0x000000FF);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Keys used as AttrID (Attribute ID) in the return IAttributeList of
|
||||
* IInfoListener::setChannelContextInfos */
|
||||
//------------------------------------------------------------------------
|
||||
/** string (TChar) [optional]: unique id string used to identify a channel */
|
||||
const CString kChannelUIDKey = "channel uid";
|
||||
|
||||
/** integer (int64) [optional]: number of characters in kChannelUIDKey */
|
||||
const CString kChannelUIDLengthKey = "channel uid length";
|
||||
|
||||
/** integer (int64) [optional]: runtime id to identify a channel (may change when reloading project)
|
||||
*/
|
||||
const CString kChannelRuntimeIDKey = "channel runtime id";
|
||||
|
||||
/** string (TChar) [optional]: name of the channel like displayed in the mixer */
|
||||
const CString kChannelNameKey = "channel name";
|
||||
|
||||
/** integer (int64) [optional]: number of characters in kChannelNameKey */
|
||||
const CString kChannelNameLengthKey = "channel name length";
|
||||
|
||||
/** color (ColorSpec) [optional]: used color for the channel in mixer or track */
|
||||
const CString kChannelColorKey = "channel color";
|
||||
|
||||
/** integer (int64) [optional]: index of the channel in a channel index namespace,
|
||||
* start with 1 not 0! */
|
||||
const CString kChannelIndexKey = "channel index";
|
||||
|
||||
/** integer (int64) [optional]: define the order of the current used index namespace,
|
||||
* start with 1 not 0!
|
||||
* For example:
|
||||
* index namespace is "Input" -> order 1,
|
||||
* index namespace is "Channel" -> order 2,
|
||||
* index namespace is "Output" -> order 3
|
||||
*/
|
||||
const CString kChannelIndexNamespaceOrderKey = "channel index namespace order";
|
||||
|
||||
/** string (TChar) [optional]: name of the channel index namespace
|
||||
* for example "Input", "Output","Channel", ...
|
||||
*/
|
||||
const CString kChannelIndexNamespaceKey = "channel index namespace";
|
||||
|
||||
/** integer (int64) [optional]: number of characters in kChannelIndexNamespaceKey */
|
||||
const CString kChannelIndexNamespaceLengthKey = "channel index namespace length";
|
||||
|
||||
/** PNG image representation as binary [optional] */
|
||||
const CString kChannelImageKey = "channel image";
|
||||
|
||||
/** integer (int64) [optional]: routing position of the plug-in in the channel
|
||||
* (see ChannelPluginLocation)
|
||||
*/
|
||||
const CString kChannelPluginLocationKey = "channel plugin location";
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace ChannelContext
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,218 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstcomponent.h
|
||||
// Created by : Steinberg, 04/2005
|
||||
// Description : Basic VST Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/ipluginbase.h"
|
||||
#include "pluginterfaces/vst/vsttypes.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
class IBStream;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** All VST specific interfaces are located in Vst namespace */
|
||||
namespace Vst {
|
||||
|
||||
/** Standard value for PFactoryInfo::flags */
|
||||
const int32 kDefaultFactoryFlags = PFactoryInfo::kUnicode;
|
||||
|
||||
#define BEGIN_FACTORY_DEF(vendor,url,email) using namespace Steinberg; \
|
||||
SMTG_EXPORT_SYMBOL IPluginFactory* PLUGIN_API GetPluginFactory () { \
|
||||
if (!gPluginFactory) \
|
||||
{ \
|
||||
static PFactoryInfo factoryInfo (vendor, url, email, Vst::kDefaultFactoryFlags); \
|
||||
gPluginFactory = new CPluginFactory (factoryInfo);
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** \defgroup vstBus VST busses
|
||||
Bus Description
|
||||
|
||||
A bus can be understood as a "collection of data channels" belonging together.
|
||||
It describes a data input or a data output of the plug-in.
|
||||
A VST component can define any desired number of busses.
|
||||
Dynamic usage of busses is handled in the host by activating and deactivating busses.
|
||||
All busses are initially inactive.
|
||||
The component has to define the maximum number of supported busses and it has to
|
||||
define which of them have to be activated by default after instantiation of the plug-in (This is
|
||||
only a wish, the host is allow to not follow it, and only activate the first bus for example).
|
||||
A host that can handle multiple busses, allows the user to activate busses which are initially all inactive.
|
||||
The kMain busses have to place before any others kAux busses.
|
||||
|
||||
See also: IComponent::getBusInfo, IComponent::activateBus
|
||||
*/
|
||||
/**@{*/
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Bus media types */
|
||||
enum MediaTypes
|
||||
{
|
||||
kAudio = 0, ///< audio
|
||||
kEvent, ///< events
|
||||
kNumMediaTypes
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Bus directions */
|
||||
enum BusDirections
|
||||
{
|
||||
kInput = 0, ///< input bus
|
||||
kOutput ///< output bus
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Bus types */
|
||||
enum BusTypes
|
||||
{
|
||||
kMain = 0, ///< main bus
|
||||
kAux ///< auxiliary bus (sidechain)
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** BusInfo:
|
||||
This is the structure used with getBusInfo, informing the host about what is a specific given bus.
|
||||
\n See also: Steinberg::Vst::IComponent::getBusInfo
|
||||
*/
|
||||
struct BusInfo
|
||||
{
|
||||
MediaType mediaType; ///< Media type - has to be a value of \ref MediaTypes
|
||||
BusDirection direction; ///< input or output \ref BusDirections
|
||||
int32 channelCount; ///< number of channels (if used then need to be recheck after \ref
|
||||
/// IAudioProcessor::setBusArrangements is called).
|
||||
/// For a bus of type MediaTypes::kEvent the channelCount corresponds
|
||||
/// to the number of supported MIDI channels by this bus
|
||||
String128 name; ///< name of the bus
|
||||
BusType busType; ///< main or aux - has to be a value of \ref BusTypes
|
||||
uint32 flags; ///< flags - a combination of \ref BusFlags
|
||||
enum BusFlags
|
||||
{
|
||||
/** The bus should be activated by the host per default on instantiation (activateBus call is requested).
|
||||
By default a bus is inactive. */
|
||||
kDefaultActive = 1 << 0,
|
||||
/** The bus does not contain ordinary audio data, but data used for control changes at sample rate.
|
||||
The data is in the same format as the audio data [-1..1].
|
||||
A host has to prevent unintended routing to speakers to prevent damage.
|
||||
Only valid for audio media type busses.
|
||||
[released: 3.7.0] */
|
||||
kIsControlVoltage = 1 << 1
|
||||
};
|
||||
};
|
||||
|
||||
/**@}*/
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** I/O modes */
|
||||
enum IoModes
|
||||
{
|
||||
kSimple = 0, ///< 1:1 Input / Output. Only used for Instruments. See \ref vst3IoMode
|
||||
kAdvanced, ///< n:m Input / Output. Only used for Instruments.
|
||||
kOfflineProcessing ///< plug-in used in an offline processing context
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Routing Information:
|
||||
When the plug-in supports multiple I/O busses, a host may want to know how the busses are related. The
|
||||
relation of an event-input-channel to an audio-output-bus in particular is of interest to the host
|
||||
(in order to relate MIDI-tracks to audio-channels)
|
||||
\n See also: IComponent::getRoutingInfo, \ref vst3Routing
|
||||
*/
|
||||
struct RoutingInfo
|
||||
{
|
||||
MediaType mediaType; ///< media type see \ref MediaTypes
|
||||
int32 busIndex; ///< bus index
|
||||
int32 channel; ///< channel (-1 for all channels)
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// IComponent Interface
|
||||
//------------------------------------------------------------------------
|
||||
/** Component base interface: Vst::IComponent
|
||||
\ingroup vstIPlug vst300
|
||||
- [plug imp]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
This is the basic interface for a VST component and must always be supported.
|
||||
It contains the common parts of any kind of processing class. The parts that
|
||||
are specific to a media type are defined in a separate interface. An implementation
|
||||
component must provide both the specific interface and IComponent.
|
||||
\see IPluginBase
|
||||
*/
|
||||
class IComponent : public IPluginBase
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Called before initializing the component to get information about the controller class.
|
||||
* \note [UI-thread & Created] */
|
||||
virtual tresult PLUGIN_API getControllerClassId (TUID classId /*out*/) = 0;
|
||||
|
||||
/** Called before 'initialize' to set the component usage (optional). See \ref IoModes.
|
||||
* \note [UI-thread & Created] */
|
||||
virtual tresult PLUGIN_API setIoMode (IoMode mode /*in*/) = 0;
|
||||
|
||||
/** Called after the plug-in is initialized. See \ref MediaTypes, BusDirections.
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual int32 PLUGIN_API getBusCount (MediaType type /*in*/, BusDirection dir /*in*/) = 0;
|
||||
|
||||
/** Called after the plug-in is initialized. See \ref MediaTypes, BusDirections.
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual tresult PLUGIN_API getBusInfo (MediaType type /*in*/, BusDirection dir /*in*/,
|
||||
int32 index /*in*/, BusInfo& bus /*out*/) = 0;
|
||||
|
||||
/** Retrieves routing information (to be implemented when more than one regular input or output
|
||||
* bus exists). The inInfo always refers to an input bus while the returned outInfo must refer
|
||||
* to an output bus!
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual tresult PLUGIN_API getRoutingInfo (RoutingInfo& inInfo /*in*/,
|
||||
RoutingInfo& outInfo /*out*/) = 0;
|
||||
|
||||
/** Called upon (de-)activating a bus in the host application. The plug-in should only processed
|
||||
* an activated bus, the host could provide less see \ref AudioBusBuffers in the process call
|
||||
* (see \ref IAudioProcessor::process) if last busses are not activated. An already activated
|
||||
* bus does not need to be reactivated after a IAudioProcessor::setBusArrangements call.
|
||||
* \note [UI-thread & Setup Done] */
|
||||
virtual tresult PLUGIN_API activateBus (MediaType type /*in*/, BusDirection dir /*in*/,
|
||||
int32 index /*in*/, TBool state /*in*/) = 0;
|
||||
|
||||
/** Activates / deactivates the component.
|
||||
* \note [UI-thread & Setup Done] */
|
||||
virtual tresult PLUGIN_API setActive (TBool state /*in*/) = 0;
|
||||
|
||||
/** Sets complete state of component.
|
||||
* \note [UI-thread & (Initialized | Connected | Setup Done | Activated | Processing)] */
|
||||
virtual tresult PLUGIN_API setState (IBStream* state /*in*/) = 0;
|
||||
|
||||
/** Retrieves complete state of component.
|
||||
* \note [UI-thread & (Initialized | Connected | Setup Done | Activated | Processing)] */
|
||||
virtual tresult PLUGIN_API getState (IBStream* state /*inout*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IComponent, 0xE831FF31, 0xF2D54301, 0x928EBBEE, 0x25697802)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,236 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstcontextmenu.h
|
||||
// Created by : Steinberg, 10/2010
|
||||
// Description : VST Context Menu Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
namespace Steinberg {
|
||||
class IPlugView;
|
||||
|
||||
namespace Vst {
|
||||
class IContextMenu;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended host callback interface Vst::IComponentHandler3 for an edit controller.
|
||||
\ingroup vstIHost vst350
|
||||
- [host imp]
|
||||
- [extends IComponentHandler]
|
||||
- [released: 3.5.0]
|
||||
- [optional]
|
||||
|
||||
A plug-in can ask the host to create a context menu for a given exported parameter ID or a generic
|
||||
context menu.\n
|
||||
|
||||
The host may pre-fill this context menu with specific items regarding the parameter ID like "Show
|
||||
automation for parameter", "MIDI learn" etc...\n
|
||||
|
||||
The plug-in can use the context menu in two ways :
|
||||
- add its own items to the menu via the IContextMenu interface and call IContextMenu::popup(..) to
|
||||
create the pop-up. See the \ref IContextMenuExample.
|
||||
- extract the host menu items and add them to a context menu created by the plug-in.
|
||||
|
||||
\b Note: You can and should use this even if you do not add your own items to the menu as this is
|
||||
considered to be a big user value.
|
||||
|
||||
\sa IContextMenu
|
||||
\sa IContextMenuTarget
|
||||
|
||||
\section IContextMenuExample Examples
|
||||
- For example, Cubase adds its owned entries in the context menu opened with right-click on an
|
||||
exported parameter when the plug-in uses createContextMenu. \image html "contextmenuexample.png" \n
|
||||
- Adding plug-in specific items to the context menu:
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
class PluginContextMenuTarget : public IContextMenuTarget, public FObject
|
||||
{
|
||||
public:
|
||||
PluginContextMenuTarget () {}
|
||||
|
||||
tresult PLUGIN_API executeMenuItem (int32 tag) override
|
||||
{
|
||||
// this will be called if the user has executed one of the menu items of the plug-in.
|
||||
// It will not be called for items of the host.
|
||||
switch (tag)
|
||||
{
|
||||
case 1: break;
|
||||
case 2: break;
|
||||
}
|
||||
return kResultTrue;
|
||||
}
|
||||
|
||||
OBJ_METHODS(PluginContextMenuTarget, FObject)
|
||||
DEFINE_INTERFACES
|
||||
DEF_INTERFACE (IContextMenuTarget)
|
||||
END_DEFINE_INTERFACES (FObject)
|
||||
REFCOUNT_METHODS(FObject)
|
||||
};
|
||||
|
||||
// The following is the code to create the context menu
|
||||
void popupContextMenu (IComponentHandler* componentHandler, IPlugView* view, const ParamID* paramID,
|
||||
UCoord x, UCoord y)
|
||||
{
|
||||
if (componentHandler == 0 || view == 0)
|
||||
return;
|
||||
FUnknownPtr<IComponentHandler3> handler (componentHandler);
|
||||
if (handler == 0)
|
||||
return;
|
||||
if (IContextMenu* menu = handler->createContextMenu (view, paramID))
|
||||
{
|
||||
// here you can add your entries (optional)
|
||||
PluginContextMenuTarget* target = new PluginContextMenuTarget ();
|
||||
|
||||
|
||||
|
||||
IContextMenu::Item item = {0};
|
||||
UString128 ("My Item 1").copyTo (item.name, 128);
|
||||
item.tag = 1;
|
||||
menu->addItem (item, target);
|
||||
|
||||
UString128 ("My Item 2").copyTo (item.name, 128);
|
||||
item.tag = 2;
|
||||
menu->addItem (item, target);
|
||||
target->release ();
|
||||
//--end of adding new entries
|
||||
|
||||
|
||||
|
||||
// here the the context menu will be pop-up (and it waits a user interaction)
|
||||
menu->popup (x, y);
|
||||
menu->release ();
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class IComponentHandler3 : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Creates a host context menu for a plug-in:
|
||||
* - If paramID is zero, the host may create a generic context menu.
|
||||
* - The IPlugView object must be valid.
|
||||
* - The return IContextMenu object needs to be released afterwards by the plug-in.
|
||||
*
|
||||
* \note [UI-thread & (Initialized | Connected) & plugView] */
|
||||
virtual IContextMenu* PLUGIN_API createContextMenu (IPlugView* plugView /*in*/,
|
||||
const ParamID* paramID /*in*/) = 0;
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IComponentHandler3, 0x69F11617, 0xD26B400D, 0xA4B6B964, 0x7B6EBBAB)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Context Menu Item Target interface: Vst::IContextMenuTarget
|
||||
\ingroup vstIHost vstIPlug vst350
|
||||
- [host imp]
|
||||
- [plug imp]
|
||||
- [released: 3.5.0]
|
||||
- [optional]
|
||||
|
||||
A receiver of a menu item should implement this interface, which will be called after the user has selected
|
||||
this menu item.
|
||||
|
||||
\see IComponentHandler3 for more information.
|
||||
*/
|
||||
class IContextMenuTarget : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Called when an menu item was executed.
|
||||
* \note [UI-thread & (Initialized | Connected) & plugView] */
|
||||
virtual tresult PLUGIN_API executeMenuItem (int32 tag /*in*/) = 0;
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IContextMenuTarget, 0x3CDF2E75, 0x85D34144, 0xBF86D36B, 0xD7C4894D)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** IContextMenuItem is an entry element of the context menu. */
|
||||
struct IContextMenuItem
|
||||
{
|
||||
String128 name; ///< Name of the item
|
||||
int32 tag; ///< Identifier tag of the item
|
||||
int32 flags; ///< Flags of the item
|
||||
|
||||
enum Flags {
|
||||
kIsSeparator = 1 << 0, ///< Item is a separator
|
||||
kIsDisabled = 1 << 1, ///< Item is disabled
|
||||
kIsChecked = 1 << 2, ///< Item is checked
|
||||
kIsGroupStart = 1 << 3 | kIsDisabled, ///< Item is a group start (like sub folder)
|
||||
kIsGroupEnd = 1 << 4 | kIsSeparator, ///< Item is a group end
|
||||
};
|
||||
};
|
||||
//------------------------------------------------------------------------
|
||||
/** Context Menu interface: Vst::IContextMenu
|
||||
\ingroup vstIHost vst350
|
||||
- [host imp]
|
||||
- [create with IComponentHandler3::createContextMenu(..)]
|
||||
- [released: 3.5.0]
|
||||
- [optional]
|
||||
|
||||
A context menu is composed of Item (entry). A Item is defined by a name, a tag, a flag
|
||||
and a associated target (called when this item will be selected/executed).
|
||||
With IContextMenu the plug-in can retrieve a Item, add a Item, remove a Item and pop-up the menu.
|
||||
|
||||
\see IComponentHandler3 for more information.
|
||||
*/
|
||||
class IContextMenu : public FUnknown
|
||||
{
|
||||
public:
|
||||
typedef IContextMenuItem Item;
|
||||
|
||||
/** Gets the number of menu items.
|
||||
* \note [UI-thread] */
|
||||
virtual int32 PLUGIN_API getItemCount () = 0;
|
||||
|
||||
/** Gets a menu item and its target (target could be not assigned).
|
||||
* \note [UI-thread] */
|
||||
virtual tresult PLUGIN_API getItem (int32 index /*in*/, Item& item /*out*/,
|
||||
IContextMenuTarget** target /*out*/) = 0;
|
||||
|
||||
/** Adds a menu item and its target.
|
||||
* \note [UI-thread] */
|
||||
virtual tresult PLUGIN_API addItem (const Item& item /*in*/,
|
||||
IContextMenuTarget* target /*in*/) = 0;
|
||||
|
||||
/** Removes a menu item.
|
||||
* \note [UI-thread] */
|
||||
virtual tresult PLUGIN_API removeItem (const Item& item /*in*/,
|
||||
IContextMenuTarget* target /*in*/) = 0;
|
||||
|
||||
/** Pop-ups the menu. Coordinates are relative to the top-left position of the plug-ins view.
|
||||
* \note [UI-thread] */
|
||||
virtual tresult PLUGIN_API popup (UCoord x /*in*/, UCoord y /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IContextMenu, 0x2E93C863, 0x0C9C4588, 0x97DBECF5, 0xAD17817D)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,224 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstdataexchange.h
|
||||
// Created by : Steinberg, 06/2022
|
||||
// Description : VST Data Exchange Interface
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
class IAudioProcessor;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** \ingroup vst3typedef */
|
||||
/**@{*/
|
||||
typedef uint32 DataExchangeQueueID;
|
||||
typedef uint32 DataExchangeBlockID;
|
||||
typedef uint32 DataExchangeUserContextID;
|
||||
/**@}*/
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static SMTG_CONSTEXPR DataExchangeQueueID InvalidDataExchangeQueueID = kMaxInt32;
|
||||
static SMTG_CONSTEXPR DataExchangeBlockID InvalidDataExchangeBlockID = kMaxInt32;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
struct DataExchangeBlock
|
||||
{
|
||||
/** pointer to the memory buffer */
|
||||
void* data;
|
||||
/** size of the memory buffer */
|
||||
uint32 size;
|
||||
/** block identifier */
|
||||
DataExchangeBlockID blockID;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Host Data Exchange handler interface: Vst::IDataExchangeHandler
|
||||
\ingroup vstHost vst379
|
||||
- [host imp]
|
||||
- [context interface]
|
||||
- [released: 3.7.9]
|
||||
- [optional]
|
||||
|
||||
The IDataExchangeHandler implements a direct and thread-safe connection from the realtime
|
||||
audio context of the audio processor to the non-realtime audio context of the edit controller.
|
||||
This should be used when the edit controller needs continuous data from the audio process for
|
||||
visualization or other use-cases. To circumvent the bottleneck on the main thread it is possible
|
||||
to configure the connection in a way that the calls to the edit controller will happen on a
|
||||
background thread.
|
||||
|
||||
Opening a queue:
|
||||
The main operation for a plug-in is to open a queue via the handler before the plug-in is activated
|
||||
(but it must be connected to the edit controller via the IConnectionPoint when the plug-in is using
|
||||
the recommended separation of edit controller and audio processor). The best place to do this is in
|
||||
the IAudioProcessor::setupProcessing method as this is also the place where the plug-in knows the
|
||||
sample rate and maximum block size which the plug-in may need to calculate the queue block size.
|
||||
When a queue is opened the edit controller gets a notification about it and the controller can
|
||||
decide if it wishes to receive the data on the main thread or the background thread.
|
||||
|
||||
Sending data:
|
||||
In the IAudioProcessor::process call the plug-in can now lock a block from the handler, fill it and
|
||||
when done free the block via the handler which then sends the block to the edit controller. The edit
|
||||
controller then receives the block either on the main thread or on a background thread depending on
|
||||
the setup of the queue.
|
||||
The host guarantees that all blocks are send before the plug-in is deactivated.
|
||||
|
||||
Closing a queue:
|
||||
The audio processor must close an opened queue and this has to be done after the processor was
|
||||
deactivated and before it is disconnected from the edit controller (see IConnectionPoint).
|
||||
|
||||
What to do when the queue is full and no block can be locked?
|
||||
The plug-in needs to be prepared for this situation as constraints in the overall system may cause
|
||||
the queue to get full. If you need to get this information to the controller you can declare a
|
||||
hidden parameter which you set to a special value and send this parameter change in your audio
|
||||
process method.
|
||||
*/
|
||||
class IDataExchangeHandler : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** open a new queue
|
||||
*
|
||||
* only allowed to be called from the main thread when the component is not active but
|
||||
* initialized and connected (see IConnectionPoint)
|
||||
*
|
||||
* @param processor the processor who wants to open the queue
|
||||
* @param blockSize size of one block
|
||||
* @param numBlocks number of blocks in the queue
|
||||
* @param alignment data alignment, if zero will use the platform default alignment if any
|
||||
* @param userContextID an identifier internal to the processor
|
||||
* @param outID on return the ID of the queue
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API openQueue (IAudioProcessor* processor, uint32 blockSize,
|
||||
uint32 numBlocks, uint32 alignment,
|
||||
DataExchangeUserContextID userContextID,
|
||||
DataExchangeQueueID* outID) = 0;
|
||||
/** close a queue
|
||||
*
|
||||
* closes and frees all memory of a previously opened queue
|
||||
* if there are locked blocks in the queue, they are freed and made invalid
|
||||
*
|
||||
* only allowed to be called from the main thread when the component is not active but
|
||||
* initialized and connected
|
||||
*
|
||||
* @param queueID the ID of the queue to close
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API closeQueue (DataExchangeQueueID queueID) = 0;
|
||||
|
||||
/** lock a block if available
|
||||
*
|
||||
* only allowed to be called from within the IAudioProcessor::process call
|
||||
*
|
||||
* @param queueID the ID of the queue
|
||||
* @param block on return will contain the data pointer and size of the block
|
||||
* @return kResultTrue if a free block was found and kOutOfMemory if all blocks are locked
|
||||
*/
|
||||
virtual tresult PLUGIN_API lockBlock (DataExchangeQueueID queueId,
|
||||
DataExchangeBlock* block) = 0;
|
||||
|
||||
/** free a previously locked block
|
||||
*
|
||||
* only allowed to be called from within the IAudioProcessor::process call
|
||||
*
|
||||
* @param queueID the ID of the queue
|
||||
* @param blockID the ID of the block
|
||||
* @param sendToController if true the block data will be send to the IEditController otherwise
|
||||
* it will be discarded
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API freeBlock (DataExchangeQueueID queueId, DataExchangeBlockID blockID,
|
||||
TBool sendToController) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IDataExchangeHandler, 0x36D551BD, 0x6FF54F08, 0xB48E830D, 0x8BD5A03B)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Data Exchange Receiver interface: Vst::IDataExchangeReceiver
|
||||
\ingroup vstPlug vst379
|
||||
- [plug imp]
|
||||
- [released: 3.7.9
|
||||
- [optional]
|
||||
|
||||
The receiver interface is required to receive data from the realtime audio process via the
|
||||
IDataExchangeHandler.
|
||||
|
||||
\see \ref IDataExchangeHandler
|
||||
*/
|
||||
class IDataExchangeReceiver : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** queue opened notification
|
||||
*
|
||||
* called on the main thread when the processor has opened a queue
|
||||
*
|
||||
* @param userContextID the user context ID of the queue
|
||||
* @param blockSize the size of one block of the queue
|
||||
* @param dispatchedOnBackgroundThread if true on output the blocks are dispatched on a
|
||||
* background thread [defaults to false in which case the
|
||||
* blocks are dispatched on the main thread]
|
||||
*/
|
||||
virtual void PLUGIN_API queueOpened (DataExchangeUserContextID userContextID, uint32 blockSize,
|
||||
TBool& dispatchOnBackgroundThread) = 0;
|
||||
/** queue closed notification
|
||||
*
|
||||
* called on the main thread when the processor has closed a queue
|
||||
*
|
||||
* @param userContextID the user context ID of the queue
|
||||
*/
|
||||
virtual void PLUGIN_API queueClosed (DataExchangeUserContextID userContextID) = 0;
|
||||
|
||||
/** one or more blocks were received
|
||||
*
|
||||
* called either on the main thread or a background thread depending on the
|
||||
* dispatchOnBackgroundThread value in the queueOpened call.
|
||||
*
|
||||
* the data of the blocks are only valid inside this call and the blocks only become available
|
||||
* to the queue afterwards.
|
||||
*
|
||||
* @param userContextID the user context ID of the queue
|
||||
* @param numBlocks number of blocks
|
||||
* @param blocks the blocks
|
||||
* @param onBackgroundThread true if the call is done on a background thread
|
||||
*/
|
||||
virtual void PLUGIN_API onDataExchangeBlocksReceived (DataExchangeUserContextID userContextID,
|
||||
uint32 numBlocks,
|
||||
DataExchangeBlock* blocks,
|
||||
TBool onBackgroundThread) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IDataExchangeReceiver, 0x45A759DC, 0x84FA4907, 0xABCB6175, 0x2FC786B6)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,754 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivsteditcontroller.h
|
||||
// Created by : Steinberg, 09/2005
|
||||
// Description : VST Edit Controller Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/ipluginbase.h"
|
||||
#include "pluginterfaces/vst/vsttypes.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Class Category Name for Controller Component */
|
||||
//------------------------------------------------------------------------
|
||||
#ifndef kVstComponentControllerClass
|
||||
#define kVstComponentControllerClass "Component Controller Class"
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
class IPlugView;
|
||||
class IBStream;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Controller Parameter Info.
|
||||
* A parameter info describes a parameter of the controller.
|
||||
* The id must always be the same for a parameter as this uniquely identifies the parameter.
|
||||
*/
|
||||
struct ParameterInfo
|
||||
{
|
||||
//------------------------------------------------------------------------
|
||||
ParamID id; ///< unique identifier of this parameter (named tag too)
|
||||
String128 title; ///< parameter title (e.g. "Volume")
|
||||
String128 shortTitle; ///< parameter shortTitle (e.g. "Vol")
|
||||
String128 units; ///< parameter unit (e.g. "dB")
|
||||
int32 stepCount; ///< number of discrete steps (0: continuous, 1: toggle, discrete value
|
||||
/// otherwise (corresponding to max - min, for example:
|
||||
/// 127 for min = 0 and max = 127) - see \ref vst3ParameterIntro)
|
||||
ParamValue defaultNormalizedValue; ///< default normalized value [0,1]
|
||||
/// in case of discrete value:
|
||||
/// defaultNormalizedValue = defDiscreteValue/stepCount
|
||||
UnitID unitId; ///< id of unit this parameter belongs to (see \ref vst3Units)
|
||||
|
||||
int32 flags; ///< ParameterFlags (see below)
|
||||
|
||||
/** Parameter flags
|
||||
*
|
||||
* Note that all non defined bits are reserved for future use!
|
||||
*/
|
||||
enum ParameterFlags : int32
|
||||
{
|
||||
/** No flags wanted.
|
||||
* [SDK 3.0.0] */
|
||||
kNoFlags = 0,
|
||||
|
||||
/** Parameter can be automated.
|
||||
* [SDK 3.0.0] */
|
||||
kCanAutomate = 1 << 0,
|
||||
|
||||
/** Parameter cannot be changed from outside the plug-in
|
||||
* (implies that kCanAutomate is NOT set).
|
||||
* [SDK 3.0.0] */
|
||||
kIsReadOnly = 1 << 1,
|
||||
|
||||
/** Attempts to set the parameter value out of the limits will result in a wrap around.
|
||||
* [SDK 3.0.2] */
|
||||
kIsWrapAround = 1 << 2,
|
||||
|
||||
/** Parameter should be displayed as list in generic editor or automation editing.
|
||||
* [SDK 3.1.0] */
|
||||
kIsList = 1 << 3,
|
||||
/** Parameter should be NOT displayed and cannot be changed from outside the plug-in.
|
||||
* It implies that kCanAutomate is NOT set and kIsReadOnly is set.
|
||||
* [SDK 3.7.0] */
|
||||
kIsHidden = 1 << 4,
|
||||
|
||||
/** Parameter is a program change (unitId gives info about associated unit - see \ref
|
||||
* vst3ProgramLists).
|
||||
* [SDK 3.0.0] */
|
||||
kIsProgramChange = 1 << 15,
|
||||
|
||||
/** Special bypass parameter (only one allowed): plug-in can handle bypass.
|
||||
* Highly recommended to export a bypass parameter for effect plug-in.
|
||||
* [SDK 3.0.0] */
|
||||
kIsBypass = 1 << 16
|
||||
};
|
||||
//------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** View Types used for IEditController::createView */
|
||||
//------------------------------------------------------------------------
|
||||
namespace ViewType {
|
||||
const CString kEditor = "editor";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Flags used for IComponentHandler::restartComponent */
|
||||
enum RestartFlags : int32
|
||||
{
|
||||
/** The Component should be reloaded
|
||||
* The host has to unload completely the plug-in (controller/processor) and reload it.
|
||||
* [SDK 3.0.0] */
|
||||
kReloadComponent = 1 << 0,
|
||||
|
||||
/** Input/Output Bus configuration has changed
|
||||
* The plug-in informs the host that either the bus configuration or the bus count has changed.
|
||||
* The host has to deactivate the plug-in, asks the plug-in for its wanted new bus
|
||||
* configurations, adapts its processing graph and reactivate the plug-in.
|
||||
* [SDK 3.0.0] */
|
||||
kIoChanged = 1 << 1,
|
||||
|
||||
/** Multiple parameter values have changed (as result of a program change for example)
|
||||
* The host invalidates all caches of parameter values and asks the edit controller for the
|
||||
* current values.
|
||||
* [SDK 3.0.0] */
|
||||
kParamValuesChanged = 1 << 2,
|
||||
|
||||
/** Latency has changed
|
||||
* The plug informs the host that its latency has changed, getLatencySamples should return the new latency after setActive (true) was called
|
||||
* The host has to deactivate and reactivate the plug-in, then afterwards the host could ask for the current latency (getLatencySamples)
|
||||
* See IAudioProcessor::getLatencySamples
|
||||
* [SDK 3.0.0] */
|
||||
kLatencyChanged = 1 << 3,
|
||||
|
||||
/** Parameter titles (title, shortTitle and units), default values, stepCount or flags (ParameterFlags) have changed
|
||||
* The host invalidates all caches of parameter infos and asks the edit controller for the
|
||||
* current infos.
|
||||
* [SDK 3.0.0] */
|
||||
kParamTitlesChanged = 1 << 4,
|
||||
|
||||
/** MIDI Controllers and/or Program Changes Assignments have changed
|
||||
* The plug-in informs the host that its MIDI-CC mapping has changed (for example after a MIDI learn or new loaded preset)
|
||||
* or if the stepCount or UnitID of a ProgramChange parameter has changed.
|
||||
* The host has to rebuild the MIDI-CC => parameter mapping (getMidiControllerAssignment)
|
||||
* and reread program changes parameters (stepCount and associated unitID)
|
||||
* [SDK 3.0.1] */
|
||||
kMidiCCAssignmentChanged = 1 << 5,
|
||||
|
||||
/** Note Expression has changed (info, count, PhysicalUIMapping, ...)
|
||||
* Either the note expression type info, the count of note expressions or the physical UI mapping has changed.
|
||||
* The host invalidates all caches of note expression infos and asks the edit controller for the current ones.
|
||||
* See INoteExpressionController, NoteExpressionTypeInfo and INoteExpressionPhysicalUIMapping
|
||||
* [SDK 3.5.0] */
|
||||
kNoteExpressionChanged = 1 << 6,
|
||||
|
||||
/** Input / Output bus titles have changed
|
||||
* The host invalidates all caches of bus titles and asks the edit controller for the current titles.
|
||||
* [SDK 3.5.0] */
|
||||
kIoTitlesChanged = 1 << 7,
|
||||
|
||||
/** Prefetch support has changed
|
||||
* The plug-in informs the host that its PrefetchSupport has changed
|
||||
* The host has to deactivate the plug-in, calls IPrefetchableSupport::getPrefetchableSupport
|
||||
* and reactivate the plug-in.
|
||||
* See IPrefetchableSupport
|
||||
* [SDK 3.6.1] */
|
||||
kPrefetchableSupportChanged = 1 << 8,
|
||||
|
||||
/** RoutingInfo has changed
|
||||
* The plug-in informs the host that its internal routing (relation of an event-input-channel to
|
||||
* an audio-output-bus) has changed. The host asks the plug-in for the new routing with
|
||||
* IComponent::getRoutingInfo, \ref vst3Routing
|
||||
* See IComponent
|
||||
* [SDK 3.6.6] */
|
||||
kRoutingInfoChanged = 1 << 9,
|
||||
|
||||
/** Key switches has changed (info, count)
|
||||
* Either the Key switches info, the count of Key switches has changed.
|
||||
* The host invalidates all caches of Key switches infos and asks the edit controller
|
||||
* (IKeyswitchController) for the current ones.
|
||||
* See IKeyswitchController
|
||||
* [SDK 3.7.3] */
|
||||
kKeyswitchChanged = 1 << 10,
|
||||
|
||||
/** Mapping of ParamID has changed
|
||||
* The Plug-in informs the host that its parameters ID has changed. This has to be called by the
|
||||
* edit controller in the method setComponentState or setState (during projects loading) when the
|
||||
* plug-in detects that the given state was associated to an older version of the plug-in, or to a
|
||||
* plug-in to replace (for ex. migrating VST2 => VST3), with a different set of parameter IDs, then
|
||||
* the host could remap any used parameters like automation by asking the IRemapParamID interface
|
||||
* (which extends IEditController).
|
||||
* See IRemapParamID
|
||||
* [SDK 3.7.11] */
|
||||
kParamIDMappingChanged = 1 << 11
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Host callback interface for an edit controller: Vst::IComponentHandler
|
||||
\ingroup vstIHost vst300
|
||||
- [host imp]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
Allow transfer of parameter editing to component (processor) via host and support automation.
|
||||
Cause the host to react on configuration changes (restartComponent).
|
||||
|
||||
\see \ref IEditController
|
||||
*/
|
||||
class IComponentHandler : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** To be called before calling a performEdit (e.g. on mouse-click-down event).
|
||||
* This must be called in the UI-Thread context!
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API beginEdit (ParamID id /*in*/) = 0;
|
||||
|
||||
/** Called between beginEdit and endEdit to inform the handler that a given parameter has a new
|
||||
* value. This must be called in the UI-Thread context!
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API performEdit (ParamID id /*in*/,
|
||||
ParamValue valueNormalized /*in*/) = 0;
|
||||
|
||||
/** To be called after calling a performEdit (e.g. on mouse-click-up event).
|
||||
* This must be called in the UI-Thread context!
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API endEdit (ParamID id /*in*/) = 0;
|
||||
|
||||
/** Instructs host to restart the component. This must be called in the UI-Thread context!
|
||||
* @param[in] flags is a combination of RestartFlags
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API restartComponent (int32 flags /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IComponentHandler, 0x93A0BEA3, 0x0BD045DB, 0x8E890B0C, 0xC1E46AC6)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended host callback interface for an edit controller: Vst::IComponentHandler2
|
||||
\ingroup vstIHost vst310
|
||||
- [host imp]
|
||||
- [extends IComponentHandler]
|
||||
- [released: 3.1.0]
|
||||
- [optional]
|
||||
|
||||
One part handles:
|
||||
- Setting dirty state of the plug-in
|
||||
- Requesting the host to open the editor
|
||||
|
||||
The other part handles parameter group editing from the plug-in UI. It wraps a set of \ref
|
||||
IComponentHandler::beginEdit / \ref Steinberg::Vst::IComponentHandler::performEdit / \ref
|
||||
Steinberg::Vst::IComponentHandler::endEdit functions (see \ref IComponentHandler) which should use
|
||||
the same timestamp in the host when writing automation. This allows for better synchronizing of
|
||||
multiple parameter changes at once.
|
||||
|
||||
\section IComponentHandler2Example Examples of different use cases
|
||||
|
||||
\code{.cpp}
|
||||
//--------------------------------------
|
||||
// we are in the editcontroller...
|
||||
// in case of multiple switch buttons (with associated ParamID 1 and 3)
|
||||
// on mouse down :
|
||||
hostHandler2->startGroupEdit ();
|
||||
hostHandler->beginEdit (1);
|
||||
hostHandler->beginEdit (3);
|
||||
hostHandler->performEdit (1, 1.0);
|
||||
hostHandler->performEdit (3, 0.0); // the opposite of paramID 1 for example
|
||||
....
|
||||
// on mouse up :
|
||||
hostHandler->endEdit (1);
|
||||
hostHandler->endEdit (3);
|
||||
hostHandler2->finishGroupEdit ();
|
||||
....
|
||||
....
|
||||
//--------------------------------------
|
||||
// in case of multiple faders (with associated ParamID 1 and 3)
|
||||
// on mouse down :
|
||||
hostHandler2->startGroupEdit ();
|
||||
hostHandler->beginEdit (1);
|
||||
hostHandler->beginEdit (3);
|
||||
hostHandler2->finishGroupEdit ();
|
||||
....
|
||||
// on mouse move :
|
||||
hostHandler2->startGroupEdit ();
|
||||
hostHandler->performEdit (1, x); // x the wanted value
|
||||
hostHandler->performEdit (3, x);
|
||||
hostHandler2->finishGroupEdit ();
|
||||
....
|
||||
// on mouse up :
|
||||
hostHandler2->startGroupEdit ();
|
||||
hostHandler->endEdit (1);
|
||||
hostHandler->endEdit (3);
|
||||
hostHandler2->finishGroupEdit ();
|
||||
\endcode
|
||||
\see \ref IComponentHandler, \ref IEditController
|
||||
*/
|
||||
class IComponentHandler2 : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Tells host that the plug-in is dirty (something besides parameters has changed since last
|
||||
* save), if true the host should apply a save before quitting.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API setDirty (TBool state /*in*/) = 0;
|
||||
|
||||
/** Tells host that it should open the plug-in editor the next time it's possible. You should
|
||||
* use this instead of showing an alert and blocking the program flow (especially on loading
|
||||
* projects).
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API requestOpenEditor (FIDString name = ViewType::kEditor /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Starts the group editing (call before a \ref IComponentHandler::beginEdit),
|
||||
* the host will keep the current timestamp at this call and will use it for all
|
||||
* \ref IComponentHandler::beginEdit, \ref IComponentHandler::performEdit,
|
||||
* \ref IComponentHandler::endEdit calls until a \ref finishGroupEdit ().
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API startGroupEdit () = 0;
|
||||
|
||||
/** Finishes the group editing started by a \ref startGroupEdit (call after a \ref
|
||||
* IComponentHandler::endEdit).
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API finishGroupEdit () = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IComponentHandler2, 0xF040B4B3, 0xA36045EC, 0xABCDC045, 0xB4D5A2CC)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended host callback interface for an edit controller: Vst::IComponentHandlerBusActivation
|
||||
\ingroup vstIHost vst368
|
||||
- [host imp]
|
||||
- [extends IComponentHandler]
|
||||
- [released: 3.6.8]
|
||||
- [optional]
|
||||
|
||||
Allows the plug-in to request the host to activate or deactivate a specific bus.
|
||||
If the host accepts this request, it will call later on \ref IComponent::activateBus.
|
||||
This is particularly useful for instruments with more than 1 outputs, where the user could request
|
||||
from the plug-in UI a given output bus activation.
|
||||
|
||||
\code{.cpp}
|
||||
// somewhere in your code when you need to inform the host to enable a specific Bus.
|
||||
FUnknownPtr<IComponentHandlerBusActivation> busActivation (componentHandler);
|
||||
if (busActivation)
|
||||
{
|
||||
// here we want to activate our audio input sidechain (the 2cd input bus: index 1)
|
||||
busActivation->requestBusActivation (kAudio, kInput, 1, true);
|
||||
}
|
||||
\endcode
|
||||
\see \ref IComponentHandler
|
||||
*/
|
||||
class IComponentHandlerBusActivation : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** request the host to activate or deactivate a specific bus.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API requestBusActivation (MediaType type /*in*/, BusDirection dir /*in*/,
|
||||
int32 index /*in*/, TBool state /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IComponentHandlerBusActivation, 0x067D02C1, 0x5B4E274D, 0xA92D90FD, 0x6EAF7240)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended host callback interface for an edit controller: Vst::IProgress
|
||||
\ingroup vstIHost vst370
|
||||
- [host imp]
|
||||
- [extends IComponentHandler]
|
||||
- [released: 3.7.0]
|
||||
- [optional]
|
||||
|
||||
Allows the plug-in to request the host to create a progress for some specific tasks which take some
|
||||
time. The host can visualize the progress as read-only UI elements.
|
||||
For example, after loading a project where a plug-in needs to load extra data (e.g. samples) in a
|
||||
background thread, this enables the host to get and visualize the current status of the loading
|
||||
progress and to inform the user when the loading is finished.
|
||||
Note: During the progress, the host can unload the plug-in at any time. Make sure that the plug-in
|
||||
supports this use case.
|
||||
|
||||
\section IProgressExample Example
|
||||
|
||||
\code{.cpp}
|
||||
//--------------------------------------
|
||||
// we are in the editcontroller:
|
||||
// as member: IProgress::ID mProgressID;
|
||||
|
||||
FUnknownPtr<IProgress> progress (componentHandler);
|
||||
if (progress)
|
||||
progress->start (IProgress::ProgressType::UIBackgroundTask, STR ("Load Samples..."),
|
||||
mProgressID);
|
||||
|
||||
// ...
|
||||
myProgressValue += incProgressStep;
|
||||
FUnknownPtr<IProgress> progress (componentHandler);
|
||||
if (progress)
|
||||
progress->update (mProgressID, myProgressValue);
|
||||
|
||||
// ...
|
||||
FUnknownPtr<IProgress> progress (componentHandler);
|
||||
if (progress)
|
||||
progress->finish (mProgressID);
|
||||
\endcode
|
||||
|
||||
\see \ref IComponentHandler
|
||||
*/
|
||||
class IProgress : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
enum ProgressType : uint32
|
||||
{
|
||||
/** plug-in state is restored async (in a background Thread) */
|
||||
AsyncStateRestoration = 0,
|
||||
|
||||
/** a plug-in task triggered by a UI action */
|
||||
UIBackgroundTask
|
||||
};
|
||||
|
||||
using ID = uint64;
|
||||
|
||||
/** Start a new progress of a given type and optional Description. outID is as ID created by the
|
||||
* host to identify this newly created progress (for update and finish method).
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API start (ProgressType type /*in*/,
|
||||
const tchar* optionalDescription /*in*/,
|
||||
ID& outID /*out*/) = 0;
|
||||
|
||||
/** Update the progress value (normValue between [0, 1]) associated to the given id.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API update (ID id /*in*/, ParamValue normValue /*in*/) = 0;
|
||||
|
||||
/** Finish the progress associated to the given id.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API finish (ID id /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IProgress, 0x00C9DC5B, 0x9D904254, 0x91A388C8, 0xB4E91B69)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Edit controller component interface: Vst::IEditController
|
||||
\ingroup vstIPlug vst300
|
||||
- [plug imp]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
The controller part of an effect or instrument with parameter handling (export, definition,
|
||||
conversion, ...). \see \ref IComponent::getControllerClassId, \ref IMidiMapping
|
||||
*/
|
||||
class IEditController : public IPluginBase
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Receives the component state.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API setComponentState (IBStream* state /*in*/) = 0;
|
||||
|
||||
/** Sets the controller state.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API setState (IBStream* state /*in*/) = 0;
|
||||
|
||||
/** Gets the controller state.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getState (IBStream* state /*inout*/) = 0;
|
||||
|
||||
// parameters -------------------------
|
||||
/** Returns the number of parameters exported.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual int32 PLUGIN_API getParameterCount () = 0;
|
||||
|
||||
/** Gets for a given index the parameter information.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getParameterInfo (int32 paramIndex /*in*/,
|
||||
ParameterInfo& info /*out*/) = 0;
|
||||
|
||||
/** Gets for a given paramID and normalized value its associated string representation.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getParamStringByValue (ParamID id /*in*/,
|
||||
ParamValue valueNormalized /*in*/,
|
||||
String128 string /*out*/) = 0;
|
||||
|
||||
/** Gets for a given paramID and string its normalized value.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getParamValueByString (ParamID id /*in*/, TChar* string /*in*/,
|
||||
ParamValue& valueNormalized /*out*/) = 0;
|
||||
|
||||
/** Returns for a given paramID and a normalized value its plain representation
|
||||
* (for example -6 for -6dB - see \ref vst3AutomationIntro).
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual ParamValue PLUGIN_API normalizedParamToPlain (ParamID id /*in*/,
|
||||
ParamValue valueNormalized /*in*/) = 0;
|
||||
|
||||
/** Returns for a given paramID and a plain value its normalized value. (see \ref
|
||||
* vst3AutomationIntro).
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual ParamValue PLUGIN_API plainParamToNormalized (ParamID id /*in*/,
|
||||
ParamValue plainValue /*in*/) = 0;
|
||||
|
||||
/** Returns the normalized value of the parameter associated to the paramID.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual ParamValue PLUGIN_API getParamNormalized (ParamID id /*in*/) = 0;
|
||||
|
||||
/** Sets the normalized value to the parameter associated to the paramID. The controller must
|
||||
* never pass this value-change back to the host via the IComponentHandler.
|
||||
* It should update the according GUI element(s) only!
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API setParamNormalized (ParamID id /*in*/, ParamValue value /*in*/) = 0;
|
||||
|
||||
// handler ----------------------------
|
||||
/** Gets from host a handler which allows the Plugin-in to communicate with the host.
|
||||
* \note This is mandatory if the host is using the IEditController!
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual tresult PLUGIN_API setComponentHandler (IComponentHandler* handler /*in*/) = 0;
|
||||
|
||||
// view -------------------------------
|
||||
/** Creates the editor view of the plug-in, currently only "editor" is supported, see \ref
|
||||
* ViewType. The life time of the editor view will never exceed the life time of this controller
|
||||
* instance.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual IPlugView* PLUGIN_API createView (FIDString name /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IEditController, 0xDCD7BBE3, 0x7742448D, 0xA874AACC, 0x979C759E)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** \ingroup vst3typedef */
|
||||
/**@{*/
|
||||
/** Knob Mode Type */
|
||||
using KnobMode = int32;
|
||||
/**@}*/
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Knob Mode */
|
||||
enum KnobModes : KnobMode
|
||||
{
|
||||
kCircularMode = 0, ///< Circular with jump to clicked position
|
||||
kRelativCircularMode, ///< Circular without jump to clicked position
|
||||
kLinearMode ///< Linear: depending on vertical movement
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Edit controller component interface extension: Vst::IEditController2
|
||||
\ingroup vstIPlug vst310
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.1.0]
|
||||
- [optional]
|
||||
|
||||
Extension to allow the host to inform the plug-in about the host Knob Mode,
|
||||
and to open the plug-in about box or help documentation.
|
||||
|
||||
\see \ref IEditController, \ref EditController
|
||||
*/
|
||||
class IEditController2 : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Host could set the Knob Mode for the plug-in. Return kResultFalse means not supported mode.
|
||||
* \see KnobModes.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API setKnobMode (KnobMode mode /*in*/) = 0;
|
||||
|
||||
/** Host could ask to open the plug-in help (could be: opening a PDF document or link to a web
|
||||
* page). The host could call it with onlyCheck set to true for testing support of open Help.
|
||||
* Return kResultFalse means not supported function.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API openHelp (TBool onlyCheck /*in*/) = 0;
|
||||
|
||||
/** Host could ask to open the plug-in about box.
|
||||
* The host could call it with onlyCheck set to true for testing support of open AboutBox.
|
||||
* Return kResultFalse means not supported function.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API openAboutBox (TBool onlyCheck /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IEditController2, 0x7F4EFE59, 0xF3204967, 0xAC27A3AE, 0xAFB63038)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** MIDI Mapping interface: Vst::IMidiMapping
|
||||
\ingroup vstIPlug vst301
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.0.1]
|
||||
- [optional]
|
||||
|
||||
MIDI controllers are not transmitted directly to a VST component. MIDI as hardware protocol has
|
||||
restrictions that can be avoided in software. Controller data in particular come along with unclear
|
||||
and often ignored semantics. On top of this they can interfere with regular parameter automation and
|
||||
the host is unaware of what happens in the plug-in when passing MIDI controllers directly.
|
||||
|
||||
So any functionality that is to be controlled by MIDI controllers must be exported as regular
|
||||
parameter. The host will transform incoming MIDI controller data using this interface and transmit
|
||||
them as regular parameter change. This allows the host to automate them in the same way as other
|
||||
parameters. CtrlNumber can be a typical MIDI controller value extended to some others values like
|
||||
pitchbend or aftertouch (see \ref ControllerNumbers). If the mapping has changed, the plug-in must
|
||||
call IComponentHandler::restartComponent (kMidiCCAssignmentChanged) to inform the host about this
|
||||
change.
|
||||
|
||||
\section IMidiMappingExample Example
|
||||
|
||||
\code{.cpp}
|
||||
//--------------------------------------
|
||||
// in myeditcontroller.h
|
||||
class MyEditController: public EditControllerEx1, public IMidiMapping
|
||||
{
|
||||
//...
|
||||
//---IMidiMapping---------------------------
|
||||
tresult PLUGIN_API getMidiControllerAssignment (int32 busIndex, int16 channel,
|
||||
CtrlNumber midiControllerNumber,
|
||||
ParamID& id) override;
|
||||
//---Interface---------
|
||||
OBJ_METHODS (MyEditController, EditControllerEx1)
|
||||
DEFINE_INTERFACES
|
||||
DEF_INTERFACE (IMidiMapping)
|
||||
END_DEFINE_INTERFACES (MyEditController)
|
||||
REFCOUNT_METHODS (MyEditController)
|
||||
};
|
||||
|
||||
//--------------------------------------
|
||||
// in myeditcontroller.cpp
|
||||
tresult PLUGIN_API MyEditController::getMidiControllerAssignment (int32 busIndex,
|
||||
int16 midiChannel,
|
||||
CtrlNumber midiControllerNumber,
|
||||
ParamID& tag)
|
||||
{
|
||||
// for my first Event bus and for MIDI channel 0 and for MIDI CC Volume only
|
||||
if (busIndex == 0 && midiChannel == 0 && midiControllerNumber == kCtrlVolume)
|
||||
{
|
||||
tag = kGainId;
|
||||
return kResultTrue;
|
||||
}
|
||||
return kResultFalse;
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class IMidiMapping : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Gets an (preferred) associated ParamID for a given Input Event Bus index, channel and MIDI
|
||||
* Controller.
|
||||
* @param[in] busIndex - index of Input Event Bus
|
||||
* @param[in] channel - channel of the bus
|
||||
* @param[in] midiControllerNumber - see \ref ControllerNumbers for expected values (could be
|
||||
* bigger than 127)
|
||||
* @param[out] id - return the associated ParamID to the given midiControllerNumber
|
||||
*
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getMidiControllerAssignment (int32 busIndex /*in*/,
|
||||
int16 channel /*in*/,
|
||||
CtrlNumber midiControllerNumber /*in*/,
|
||||
ParamID& id /*out*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IMidiMapping, 0xDF0FF9F7, 0x49B74669, 0xB63AB732, 0x7ADBF5E5)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Parameter Editing from host: Vst::IEditControllerHostEditing
|
||||
\ingroup vstIPlug vst350
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.5.0]
|
||||
- [optional]
|
||||
|
||||
If this interface is implemented by the edit controller, and when performing edits from outside
|
||||
the plug-in (host / remote) of a not automatable and not read-only, and not hidden flagged parameter
|
||||
(kind of helper parameter), the host will start with a beginEditFromHost before calling
|
||||
setParamNormalized and end with an endEditFromHost. Here the sequence that the host will call:
|
||||
|
||||
\section IEditControllerExample Example
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
plugEditController->beginEditFromHost (id);
|
||||
plugEditController->setParamNormalized (id, value);
|
||||
plugEditController->setParamNormalized (id, value + 0.1);
|
||||
// ...
|
||||
plugEditController->endEditFromHost (id);
|
||||
\endcode
|
||||
|
||||
\see \ref IEditController
|
||||
*/
|
||||
class IEditControllerHostEditing : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Called before a setParamNormalized sequence, a endEditFromHost will be call at the end of
|
||||
* the editing action.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API beginEditFromHost (ParamID paramID /*in*/) = 0;
|
||||
|
||||
/** Called after a beginEditFromHost and a sequence of setParamNormalized.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API endEditFromHost (ParamID paramID /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IEditControllerHostEditing, 0xC1271208, 0x70594098, 0xB9DD34B3, 0x6BB0195E)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended plug-in interface IComponentHandler for an edit controller
|
||||
\ingroup vstIHost vst379
|
||||
- [host imp]
|
||||
- [extends IComponentHandler]
|
||||
- [released: 3.7.9]
|
||||
- [optional]
|
||||
*/
|
||||
//------------------------------------------------------------------------
|
||||
class IComponentHandlerSystemTime : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** get the current systemTime (the same as the one used in ProcessContext::systemTime).
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getSystemTime (int64& systemTime /*out*/) = 0;
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IComponentHandlerSystemTime, 0xF9E53056, 0xD1554CD5, 0xB7695E1B, 0x7B0F7745)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,223 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstevents.h
|
||||
// Created by : Steinberg, 11/2005
|
||||
// Description : VST Events Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/ivstprocesscontext.h"
|
||||
#include "pluginterfaces/vst/ivstnoteexpression.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Reserved note identifier (noteId) range for a plug-in. Guaranteed not used by the host. */
|
||||
enum NoteIDUserRange
|
||||
{
|
||||
kNoteIDUserRangeLowerBound = -10000,
|
||||
kNoteIDUserRangeUpperBound = -1000,
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Note-on event specific data. Used in \ref Event (union)
|
||||
\ingroup vstEventGrp
|
||||
Pitch uses the twelve-tone equal temperament tuning (12-TET).
|
||||
*/
|
||||
struct NoteOnEvent
|
||||
{
|
||||
int16 channel; ///< channel index in event bus
|
||||
int16 pitch; ///< range [0, 127] = [C-2, G8] with A3=440Hz (12-TET: twelve-tone equal temperament)
|
||||
float tuning; ///< 1.f = +1 cent, -1.f = -1 cent
|
||||
float velocity; ///< range [0.0, 1.0]
|
||||
int32 length; ///< in sample frames (optional, Note Off has to follow in any case!)
|
||||
int32 noteId; ///< note identifier (if not available then -1)
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Note-off event specific data. Used in \ref Event (union)
|
||||
\ingroup vstEventGrp
|
||||
*/
|
||||
struct NoteOffEvent
|
||||
{
|
||||
int16 channel; ///< channel index in event bus
|
||||
int16 pitch; ///< range [0, 127] = [C-2, G8] with A3=440Hz (12-TET)
|
||||
float velocity; ///< range [0.0, 1.0]
|
||||
int32 noteId; ///< associated noteOn identifier (if not available then -1)
|
||||
float tuning; ///< 1.f = +1 cent, -1.f = -1 cent
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Data event specific data. Used in \ref Event (union)
|
||||
\ingroup vstEventGrp
|
||||
*/
|
||||
struct DataEvent
|
||||
{
|
||||
uint32 size; ///< size in bytes of the data block bytes
|
||||
uint32 type; ///< type of this data block (see \ref DataTypes)
|
||||
const uint8* bytes; ///< pointer to the data block
|
||||
|
||||
/** Value for DataEvent::type */
|
||||
enum DataTypes
|
||||
{
|
||||
kMidiSysEx = 0 ///< for MIDI system exclusive message
|
||||
};
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** PolyPressure event specific data. Used in \ref Event (union)
|
||||
\ingroup vstEventGrp
|
||||
*/
|
||||
struct PolyPressureEvent
|
||||
{
|
||||
int16 channel; ///< channel index in event bus
|
||||
int16 pitch; ///< range [0, 127] = [C-2, G8] with A3=440Hz
|
||||
float pressure; ///< range [0.0, 1.0]
|
||||
int32 noteId; ///< event should be applied to the noteId (if not -1)
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Chord event specific data. Used in \ref Event (union)
|
||||
\ingroup vstEventGrp
|
||||
*/
|
||||
struct ChordEvent
|
||||
{
|
||||
int16 root; ///< range [0, 127] = [C-2, G8] with A3=440Hz
|
||||
int16 bassNote; ///< range [0, 127] = [C-2, G8] with A3=440Hz
|
||||
int16 mask; ///< root is bit 0
|
||||
uint16 textLen; ///< the number of characters (TChar) between the beginning of text and the terminating
|
||||
///< null character (without including the terminating null character itself)
|
||||
const TChar* text; ///< UTF-16, null terminated Hosts Chord Name
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Scale event specific data. Used in \ref Event (union)
|
||||
\ingroup vstEventGrp
|
||||
*/
|
||||
struct ScaleEvent
|
||||
{
|
||||
int16 root; ///< range [0, 127] = root Note/Transpose Factor
|
||||
int16 mask; ///< Bit 0 = C, Bit 1 = C#, ... (0x5ab5 = Major Scale)
|
||||
uint16 textLen; ///< the number of characters (TChar) between the beginning of text and the terminating
|
||||
///< null character (without including the terminating null character itself)
|
||||
const TChar* text; ///< UTF-16, null terminated, Hosts Scale Name
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Legacy MIDI CC Out event specific data. Used in \ref Event (union)
|
||||
\ingroup vstEventGrp
|
||||
- [released: 3.6.12]
|
||||
|
||||
This kind of event is reserved for generating MIDI CC as output event for kEvent Bus during the process call.
|
||||
*/
|
||||
struct LegacyMIDICCOutEvent
|
||||
{
|
||||
uint8 controlNumber;///< see enum ControllerNumbers [0, 255]
|
||||
int8 channel; ///< channel index in event bus [0, 15]
|
||||
int8 value; ///< value of Controller [0, 127]
|
||||
int8 value2; ///< [0, 127] used for pitch bend (kPitchBend) and polyPressure (kCtrlPolyPressure)
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Event
|
||||
\ingroup vstEventGrp
|
||||
Structure representing a single Event of different types associated to a specific event (\ref kEvent) bus.
|
||||
*/
|
||||
struct Event
|
||||
{
|
||||
int32 busIndex; ///< event bus index
|
||||
int32 sampleOffset; ///< sample frames related to the current block start sample position
|
||||
TQuarterNotes ppqPosition; ///< position in project
|
||||
uint16 flags; ///< combination of \ref EventFlags
|
||||
|
||||
/** Event Flags - used for Event::flags */
|
||||
enum EventFlags
|
||||
{
|
||||
kIsLive = 1 << 0, ///< indicates that the event is played live (directly from keyboard)
|
||||
|
||||
kUserReserved1 = 1 << 14, ///< reserved for user (for internal use)
|
||||
kUserReserved2 = 1 << 15 ///< reserved for user (for internal use)
|
||||
};
|
||||
|
||||
/** Event Types - used for Event::type */
|
||||
enum EventTypes
|
||||
{
|
||||
kNoteOnEvent = 0, ///< is \ref NoteOnEvent
|
||||
kNoteOffEvent = 1, ///< is \ref NoteOffEvent
|
||||
kDataEvent = 2, ///< is \ref DataEvent
|
||||
kPolyPressureEvent = 3, ///< is \ref PolyPressureEvent
|
||||
kNoteExpressionValueEvent = 4, ///< is \ref NoteExpressionValueEvent
|
||||
kNoteExpressionTextEvent = 5, ///< is \ref NoteExpressionTextEvent
|
||||
kChordEvent = 6, ///< is \ref ChordEvent
|
||||
kScaleEvent = 7, ///< is \ref ScaleEvent
|
||||
kNoteExpressionIntValueEvent = 8,///< is \ref NoteExpressionIntValueEvent
|
||||
kLegacyMIDICCOutEvent = 65535 ///< is \ref LegacyMIDICCOutEvent
|
||||
};
|
||||
|
||||
uint16 type; ///< a value from \ref EventTypes
|
||||
union
|
||||
{
|
||||
NoteOnEvent noteOn; ///< type == kNoteOnEvent
|
||||
NoteOffEvent noteOff; ///< type == kNoteOffEvent
|
||||
DataEvent data; ///< type == kDataEvent
|
||||
PolyPressureEvent polyPressure; ///< type == kPolyPressureEvent
|
||||
NoteExpressionValueEvent noteExpressionValue; ///< type == kNoteExpressionValueEvent
|
||||
NoteExpressionTextEvent noteExpressionText; ///< type == kNoteExpressionTextEvent
|
||||
NoteExpressionIntValueEvent noteExpressionIntValue; ///< type == kNoteExpressionIntValueEvent
|
||||
ChordEvent chord; ///< type == kChordEvent
|
||||
ScaleEvent scale; ///< type == kScaleEvent
|
||||
LegacyMIDICCOutEvent midiCCOut; ///< type == kLegacyMIDICCOutEvent
|
||||
};
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** List of events to process: Vst::IEventList
|
||||
\ingroup vstIHost vst300
|
||||
- [host imp]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
\see ProcessData, Event
|
||||
*/
|
||||
class IEventList : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Returns the count of events. */
|
||||
virtual int32 PLUGIN_API getEventCount () = 0;
|
||||
|
||||
/** Gets parameter by index. */
|
||||
virtual tresult PLUGIN_API getEvent (int32 index /*in*/, Event& e /*out*/) = 0;
|
||||
|
||||
/** Adds a new event. */
|
||||
virtual tresult PLUGIN_API addEvent (Event& e /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IEventList, 0x3A2C4214, 0x346349FE, 0xB2C4F397, 0xB9695A44)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,165 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivsthostapplication.h
|
||||
// Created by : Steinberg, 04/2006
|
||||
// Description : VST Host Interface
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/ivstmessage.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Basic host callback interface: Vst::IHostApplication
|
||||
\ingroup vstIHost vst300
|
||||
- [host imp]
|
||||
- [passed as 'context' in to IPluginBase::initialize () ]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
Basic VST host application interface.
|
||||
*/
|
||||
class IHostApplication : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Gets host application name.
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual tresult PLUGIN_API getName (String128 name) = 0;
|
||||
|
||||
/** Creates host object (for example: Vst::IMessage).
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual tresult PLUGIN_API createInstance (TUID cid, TUID _iid, void** obj) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IHostApplication, 0x58E595CC, 0xDB2D4969, 0x8B6AAF8C, 0x36A664E5)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Helper to allocate a message */
|
||||
inline IMessage* allocateMessage (IHostApplication* host)
|
||||
{
|
||||
TUID iid;
|
||||
IMessage::iid.toTUID (iid);
|
||||
IMessage* m = nullptr;
|
||||
if (host->createInstance (iid, iid, (void**)&m) == kResultOk)
|
||||
return m;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** VST 3 to VST 2 Wrapper interface: Vst::IVst3ToVst2Wrapper
|
||||
\ingroup vstIHost vst310
|
||||
- [host imp]
|
||||
- [passed as 'context' to IPluginBase::initialize () ]
|
||||
- [released: 3.1.0]
|
||||
- [mandatory]
|
||||
|
||||
Informs the plug-in that a VST 3 to VST 2 wrapper is used between the plug-in and the real host.
|
||||
Implemented by the VST 2 Wrapper.
|
||||
*/
|
||||
class IVst3ToVst2Wrapper : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IVst3ToVst2Wrapper, 0x29633AEC, 0x1D1C47E2, 0xBB85B97B, 0xD36EAC61)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** VST 3 to AU Wrapper interface: Vst::IVst3ToAUWrapper
|
||||
\ingroup vstIHost vst310
|
||||
- [host imp]
|
||||
- [passed as 'context' to IPluginBase::initialize () ]
|
||||
- [released: 3.1.0]
|
||||
- [mandatory]
|
||||
|
||||
Informs the plug-in that a VST 3 to AU wrapper is used between the plug-in and the real host.
|
||||
Implemented by the AU Wrapper.
|
||||
*/
|
||||
class IVst3ToAUWrapper : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IVst3ToAUWrapper, 0xA3B8C6C5, 0xC0954688, 0xB0916F0B, 0xB697AA44)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** VST 3 to AAX Wrapper interface: Vst::IVst3ToAAXWrapper
|
||||
\ingroup vstIHost vst368
|
||||
- [host imp]
|
||||
- [passed as 'context' to IPluginBase::initialize () ]
|
||||
- [released: 3.6.8]
|
||||
- [mandatory]
|
||||
|
||||
Informs the plug-in that a VST 3 to AAX wrapper is used between the plug-in and the real host.
|
||||
Implemented by the AAX Wrapper.
|
||||
*/
|
||||
class IVst3ToAAXWrapper : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
DECLARE_CLASS_IID (IVst3ToAAXWrapper, 0x6D319DC6, 0x60C56242, 0xB32C951B, 0x93BEF4C6)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Wrapper MPE Support interface: Vst::IVst3WrapperMPESupport
|
||||
\ingroup vstIHost vst3612
|
||||
- [host imp]
|
||||
- [passed as 'context' to IPluginBase::initialize () ]
|
||||
- [released: 3.6.12]
|
||||
- [optional]
|
||||
|
||||
Implemented on wrappers that support MPE to Note Expression translation.
|
||||
|
||||
By default, MPE input processing is enabled, the masterChannel will be zero, the memberBeginChannel
|
||||
will be one and the memberEndChannel will be 14.
|
||||
|
||||
As MPE is a subset of the VST3 Note Expression feature, mapping from the three MPE expressions is
|
||||
handled via the INoteExpressionPhysicalUIMapping interface.
|
||||
*/
|
||||
class IVst3WrapperMPESupport : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** enable or disable MPE processing
|
||||
* @param state true to enable, false to disable MPE processing
|
||||
* @return kResultTrue on success */
|
||||
virtual tresult PLUGIN_API enableMPEInputProcessing (TBool state) = 0;
|
||||
/** setup the MPE processing
|
||||
* @param masterChannel MPE master channel (zero based)
|
||||
* @param memberBeginChannel MPE member begin channel (zero based)
|
||||
* @param memberEndChannel MPE member end channel (zero based)
|
||||
* @return kResultTrue on success */
|
||||
virtual tresult PLUGIN_API setMPEInputDeviceSettings (int32 masterChannel,
|
||||
int32 memberBeginChannel,
|
||||
int32 memberEndChannel) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IVst3WrapperMPESupport, 0x44149067, 0x42CF4BF9, 0x8800B750, 0xF7359FE3)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
@@ -0,0 +1,142 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstinterappaudio.h
|
||||
// Created by : Steinberg, 08/2013
|
||||
// Description : VST InterAppAudio Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
struct ViewRect;
|
||||
namespace Vst {
|
||||
struct Event;
|
||||
class IInterAppAudioPresetManager;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Inter-App Audio host Interface.
|
||||
\ingroup vstIHost vst360
|
||||
- [host imp]
|
||||
- [passed as 'context' to IPluginBase::initialize () ]
|
||||
- [released: 3.6.0]
|
||||
- [optional]
|
||||
|
||||
Implemented by the InterAppAudio Wrapper.
|
||||
*/
|
||||
class IInterAppAudioHost : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** get the size of the screen
|
||||
* @param size size of the screen
|
||||
* @param scale scale of the screen
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API getScreenSize (ViewRect* size, float* scale) = 0;
|
||||
|
||||
/** get status of connection
|
||||
* @return kResultTrue if an Inter-App Audio connection is established
|
||||
*/
|
||||
virtual tresult PLUGIN_API connectedToHost () = 0;
|
||||
|
||||
/** switch to the host.
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API switchToHost () = 0;
|
||||
|
||||
/** send a remote control event to the host
|
||||
* @param event event type, see AudioUnitRemoteControlEvent in the iOS SDK documentation for possible types
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API sendRemoteControlEvent (uint32 event) = 0;
|
||||
|
||||
/** ask for the host icon.
|
||||
* @param icon pointer to a CGImageRef
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API getHostIcon (void** icon) = 0;
|
||||
|
||||
/** schedule an event from the user interface thread
|
||||
* @param event the event to schedule
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API scheduleEventFromUI (Event& event) = 0;
|
||||
|
||||
/** get the preset manager
|
||||
* @param cid class ID to use by the preset manager
|
||||
* @return the preset manager. Needs to be released by called.
|
||||
*/
|
||||
virtual IInterAppAudioPresetManager* PLUGIN_API createPresetManager (const TUID& cid) = 0;
|
||||
|
||||
/** show the settings view
|
||||
* currently includes MIDI settings and Tempo setting
|
||||
* @return kResultTrue on success
|
||||
*/
|
||||
virtual tresult PLUGIN_API showSettingsView () = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IInterAppAudioHost, 0x0CE5743D, 0x68DF415E, 0xAE285BD4, 0xE2CDC8FD)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended plug-in interface IEditController for Inter-App Audio connection state change notifications
|
||||
\ingroup vstIPlug vst360
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.6.0]
|
||||
*/
|
||||
class IInterAppAudioConnectionNotification : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** called when the Inter-App Audio connection state changes
|
||||
* @param newState true if an Inter-App Audio connection is established, otherwise false
|
||||
*/
|
||||
virtual void PLUGIN_API onInterAppAudioConnectionStateChange (TBool newState) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IInterAppAudioConnectionNotification, 0x6020C72D, 0x5FC24AA1, 0xB0950DB5, 0xD7D6D5CF)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended plug-in interface IEditController for Inter-App Audio Preset Management
|
||||
\ingroup vstIPlug vst360
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.6.0]
|
||||
*/
|
||||
class IInterAppAudioPresetManager : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Open the Preset Browser in order to load a preset */
|
||||
virtual tresult PLUGIN_API runLoadPresetBrowser () = 0;
|
||||
/** Open the Preset Browser in order to save a preset */
|
||||
virtual tresult PLUGIN_API runSavePresetBrowser () = 0;
|
||||
/** Load the next available preset */
|
||||
virtual tresult PLUGIN_API loadNextPreset () = 0;
|
||||
/** Load the previous available preset */
|
||||
virtual tresult PLUGIN_API loadPreviousPreset () = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IInterAppAudioPresetManager, 0xADE6FCC4, 0x46C94E1D, 0xB3B49A80, 0xC93FEFDD)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
@@ -0,0 +1,101 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstmessage.h
|
||||
// Created by : Steinberg, 04/2005
|
||||
// Description : VST Message Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/ivstattributes.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Private plug-in message: Vst::IMessage
|
||||
\ingroup vstIHost vst300
|
||||
- [host imp]
|
||||
- [create via IHostApplication::createInstance]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
Messages are sent from a VST controller component to a VST editor component and vice versa.
|
||||
\see IAttributeList, IConnectionPoint, \ref vst3Communication
|
||||
*/
|
||||
class IMessage : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Returns the message ID (for example "TextMessage"). */
|
||||
virtual FIDString PLUGIN_API getMessageID () = 0;
|
||||
|
||||
/** Sets a message ID (for example "TextMessage"). */
|
||||
virtual void PLUGIN_API setMessageID (FIDString id /*in*/) = 0;
|
||||
|
||||
/** Returns the attribute list associated to the message. */
|
||||
virtual IAttributeList* PLUGIN_API getAttributes () = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IMessage, 0x936F033B, 0xC6C047DB, 0xBB0882F8, 0x13C1E613)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Connect a component with another one: Vst::IConnectionPoint
|
||||
\ingroup vstIPlug vst300
|
||||
- [plug imp]
|
||||
- [host imp]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
This interface is used for the communication of separate components.
|
||||
Note that some hosts will place a proxy object between the components so that they are not directly
|
||||
connected.
|
||||
|
||||
\see \ref vst3Communication
|
||||
*/
|
||||
class IConnectionPoint : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Connects this instance with another connection point.
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual tresult PLUGIN_API connect (IConnectionPoint* other /*in*/) = 0;
|
||||
|
||||
/** Disconnects a given connection point from this.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API disconnect (IConnectionPoint* other /*in*/) = 0;
|
||||
|
||||
/** Called when a message has been sent from the connection point to this.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API notify (IMessage* message /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IConnectionPoint, 0x70A4156F, 0x6E6E4026, 0x989148BF, 0xAA60D8D1)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,128 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstmidicontrollers.h
|
||||
// Created by : Steinberg, 02/2006
|
||||
// Description : VST MIDI Controller Enumeration
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Controller Numbers (MIDI) */
|
||||
enum ControllerNumbers
|
||||
{
|
||||
kCtrlBankSelectMSB = 0, ///< Bank Select MSB
|
||||
kCtrlModWheel = 1, ///< Modulation Wheel
|
||||
kCtrlBreath = 2, ///< Breath controller
|
||||
|
||||
kCtrlFoot = 4, ///< Foot Controller
|
||||
kCtrlPortaTime = 5, ///< Portamento Time
|
||||
kCtrlDataEntryMSB = 6, ///< Data Entry MSB
|
||||
kCtrlVolume = 7, ///< Channel Volume (formerly Main Volume)
|
||||
kCtrlBalance = 8, ///< Balance
|
||||
|
||||
kCtrlPan = 10, ///< Pan
|
||||
kCtrlExpression = 11, ///< Expression
|
||||
kCtrlEffect1 = 12, ///< Effect Control 1
|
||||
kCtrlEffect2 = 13, ///< Effect Control 2
|
||||
|
||||
//---General Purpose Controllers #1 to #4---
|
||||
kCtrlGPC1 = 16, ///< General Purpose Controller #1
|
||||
kCtrlGPC2 = 17, ///< General Purpose Controller #2
|
||||
kCtrlGPC3 = 18, ///< General Purpose Controller #3
|
||||
kCtrlGPC4 = 19, ///< General Purpose Controller #4
|
||||
|
||||
kCtrlBankSelectLSB = 32, ///< Bank Select LSB
|
||||
|
||||
kCtrlDataEntryLSB = 38, ///< Data Entry LSB
|
||||
|
||||
kCtrlSustainOnOff = 64, ///< Damper Pedal On/Off (Sustain)
|
||||
kCtrlPortaOnOff = 65, ///< Portamento On/Off
|
||||
kCtrlSustenutoOnOff = 66, ///< Sustenuto On/Off
|
||||
kCtrlSoftPedalOnOff = 67, ///< Soft Pedal On/Off
|
||||
kCtrlLegatoFootSwOnOff= 68, ///< Legato Footswitch On/Off
|
||||
kCtrlHold2OnOff = 69, ///< Hold 2 On/Off
|
||||
|
||||
//---Sound Controllers #1 to #10---
|
||||
kCtrlSoundVariation = 70, ///< Sound Variation
|
||||
kCtrlFilterCutoff = 71, ///< Filter Cutoff (Timbre/Harmonic Intensity)
|
||||
kCtrlReleaseTime = 72, ///< Release Time
|
||||
kCtrlAttackTime = 73, ///< Attack Time
|
||||
kCtrlFilterResonance= 74, ///< Filter Resonance (Brightness)
|
||||
kCtrlDecayTime = 75, ///< Decay Time
|
||||
kCtrlVibratoRate = 76, ///< Vibrato Rate
|
||||
kCtrlVibratoDepth = 77, ///< Vibrato Depth
|
||||
kCtrlVibratoDelay = 78, ///< Vibrato Delay
|
||||
kCtrlSoundCtrler10 = 79, ///< undefined
|
||||
|
||||
//---General Purpose Controllers #5 to #8---
|
||||
kCtrlGPC5 = 80, ///< General Purpose Controller #5
|
||||
kCtrlGPC6 = 81, ///< General Purpose Controller #6
|
||||
kCtrlGPC7 = 82, ///< General Purpose Controller #7
|
||||
kCtrlGPC8 = 83, ///< General Purpose Controller #8
|
||||
|
||||
kCtrlPortaControl = 84, ///< Portamento Control
|
||||
|
||||
//---Effect Controllers---
|
||||
kCtrlEff1Depth = 91, ///< Effect 1 Depth (Reverb Send Level)
|
||||
kCtrlEff2Depth = 92, ///< Effect 2 Depth (Tremolo Level)
|
||||
kCtrlEff3Depth = 93, ///< Effect 3 Depth (Chorus Send Level)
|
||||
kCtrlEff4Depth = 94, ///< Effect 4 Depth (Delay/Variation/Detune Level)
|
||||
kCtrlEff5Depth = 95, ///< Effect 5 Depth (Phaser Level)
|
||||
|
||||
kCtrlDataIncrement = 96, ///< Data Increment (+1)
|
||||
kCtrlDataDecrement = 97, ///< Data Decrement (-1)
|
||||
kCtrlNRPNSelectLSB = 98, ///< NRPN Select LSB
|
||||
kCtrlNRPNSelectMSB = 99, ///< NRPN Select MSB
|
||||
kCtrlRPNSelectLSB = 100, ///< RPN Select LSB
|
||||
kCtrlRPNSelectMSB = 101, ///< RPN Select MSB
|
||||
|
||||
//---Other Channel Mode Messages---
|
||||
kCtrlAllSoundsOff = 120, ///< All Sounds Off
|
||||
kCtrlResetAllCtrlers = 121, ///< Reset All Controllers
|
||||
kCtrlLocalCtrlOnOff = 122, ///< Local Control On/Off
|
||||
kCtrlAllNotesOff = 123, ///< All Notes Off
|
||||
kCtrlOmniModeOff = 124, ///< Omni Mode Off + All Notes Off
|
||||
kCtrlOmniModeOn = 125, ///< Omni Mode On + All Notes Off
|
||||
kCtrlPolyModeOnOff = 126, ///< Poly Mode On/Off + All Sounds Off
|
||||
kCtrlPolyModeOn = 127, ///< Poly Mode On
|
||||
|
||||
//---Extra--------------------------
|
||||
kAfterTouch = 128, ///< After Touch (associated to Channel Pressure)
|
||||
kPitchBend = 129, ///< Pitch Bend Change
|
||||
|
||||
kCountCtrlNumber, ///< Count of Controller Number
|
||||
|
||||
//---Extra for kLegacyMIDICCOutEvent-
|
||||
kCtrlProgramChange = 130, ///< Program Change (use LegacyMIDICCOutEvent.value only)
|
||||
kCtrlPolyPressure = 131, ///< Polyphonic Key Pressure (use LegacyMIDICCOutEvent.value for pitch and
|
||||
/// LegacyMIDICCOutEvent.value2 for pressure)
|
||||
kCtrlQuarterFrame = 132, ///< Quarter Frame ((use LegacyMIDICCOutEvent.value only)
|
||||
|
||||
kSystemSongSelect = 133, ///< Song Select (use LegacyMIDICCOutEvent.value only)
|
||||
kSystemSongPointer = 134, ///< Song Pointer (use LegacyMIDICCOutEvent.value for LSB and
|
||||
/// LegacyMIDICCOutEvent.value2 for MSB)
|
||||
kSystemCableSelect = 135, ///< Cable Select (use LegacyMIDICCOutEvent.value only)
|
||||
kSystemTuneRequest = 136, ///< Tune Request (use LegacyMIDICCOutEvent.value only)
|
||||
kSystemMidiClockStart = 137, ///< Midi Clock Start (use LegacyMIDICCOutEvent.value only)
|
||||
kSystemMidiClockContinue = 138, ///< Midi Clock Continue (use LegacyMIDICCOutEvent.value only)
|
||||
kSystemMidiClockStop = 139, ///< Midi Clock Stop (use LegacyMIDICCOutEvent.value only)
|
||||
kSystemActiveSensing = 140, ///< Active Sensing (use LegacyMIDICCOutEvent.value only)
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
@@ -0,0 +1,107 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstmidilearn.h
|
||||
// Created by : Steinberg, 11/2018
|
||||
// Description : VST MIDI Learn
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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 {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** MIDI Learn interface: Vst::IMidiLearn
|
||||
\ingroup vstIPlug vst3612
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.6.12]
|
||||
- [optional]
|
||||
|
||||
If this interface is implemented by the edit controller, the host will call this method whenever
|
||||
there is live MIDI-CC input for the plug-in. This way, the plug-in can change its MIDI-CC parameter
|
||||
mapping and notify the host using the IComponentHandler::restartComponent with the
|
||||
kMidiCCAssignmentChanged flag.
|
||||
Use this if you want to implement custom MIDI-Learn functionality in your plug-in.
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------
|
||||
// in MyController class declaration
|
||||
class MyController : public Vst::EditController, public Vst::IMidiLearn
|
||||
{
|
||||
// ...
|
||||
//--- IMidiLearn ---------------------------------
|
||||
tresult PLUGIN_API onLiveMIDIControllerInput (int32 busIndex, int16 channel,
|
||||
CtrlNumber midiCC) SMTG_OVERRIDE;
|
||||
// ...
|
||||
|
||||
OBJ_METHODS (MyController, Vst::EditController)
|
||||
DEFINE_INTERFACES
|
||||
// ...
|
||||
DEF_INTERFACE (Vst::IMidiLearn)
|
||||
END_DEFINE_INTERFACES (Vst::EditController)
|
||||
//...
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
// in mycontroller.cpp
|
||||
#include "pluginterfaces/vst/ivstmidilearn.h
|
||||
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
DEF_CLASS_IID (IMidiLearn)
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API MyController::onLiveMIDIControllerInput (int32 busIndex,
|
||||
int16 channel, CtrlNumber midiCC)
|
||||
{
|
||||
// if we are not in doMIDILearn (triggered by a UI button for example)
|
||||
// or wrong channel then return
|
||||
if (!doMIDILearn || busIndex != 0 || channel != 0 || midiLearnParamID == InvalidParamID)
|
||||
return kResultFalse;
|
||||
|
||||
// adapt our internal MIDICC -> parameterID mapping
|
||||
midiCCMapping[midiCC] = midiLearnParamID;
|
||||
|
||||
// new mapping then inform the host that our MIDI assignment has changed
|
||||
if (auto componentHandler = getComponentHandler ())
|
||||
{
|
||||
componentHandler->restartComponent (kMidiCCAssignmentChanged);
|
||||
}
|
||||
return kResultTrue;
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class IMidiLearn : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Called on live input MIDI-CC change associated to a given bus index and MIDI channel.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API onLiveMIDIControllerInput (int32 busIndex /*in*/,
|
||||
int16 channel /*in*/,
|
||||
CtrlNumber midiCC /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IMidiLearn, 0x6B2449CC, 0x419740B5, 0xAB3C79DA, 0xC5FE5C86)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
@@ -0,0 +1,182 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Flags : clang-format SMTGSequencer
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstmidimapping2.h
|
||||
// Created by : Steinberg, 10/2025
|
||||
// Description : MIDI controller mapping (includes MIDI 2.0)
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/ivstcomponent.h"
|
||||
#include "pluginterfaces/vst/vsttypes.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
using MidiGroup = uint8;
|
||||
using MidiChannel = uint8;
|
||||
using BusIndex = int32;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Midi2Controller
|
||||
*
|
||||
* describes a MIDI 2.0 Registered or Assignable Controller
|
||||
*
|
||||
*/
|
||||
struct Midi2Controller
|
||||
{
|
||||
uint8 bank : 7; // msb
|
||||
TBool registered : 1; // true: registered, false: assignable
|
||||
uint8 index : 7; // lsb
|
||||
TBool reserved : 1;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
struct Midi2ControllerParamIDAssignment
|
||||
{
|
||||
ParamID pId;
|
||||
BusIndex busIndex;
|
||||
MidiChannel channel;
|
||||
Midi2Controller controller;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
struct Midi2ControllerParamIDAssignmentList
|
||||
{
|
||||
uint32 count;
|
||||
Midi2ControllerParamIDAssignment* map;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
struct Midi1ControllerParamIDAssignment
|
||||
{
|
||||
ParamID pId;
|
||||
BusIndex busIndex;
|
||||
MidiChannel channel;
|
||||
CtrlNumber controller;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
struct Midi1ControllerParamIDAssignmentList
|
||||
{
|
||||
uint32 count;
|
||||
Midi1ControllerParamIDAssignment* map;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** MIDI Mapping interface: Vst::IMidiMapping2
|
||||
\ingroup vstIPlug vst380
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.8.0]
|
||||
- [optional]
|
||||
- [replaces Vst::IMidiMapping]
|
||||
|
||||
This interface replaces Vst::IMidiMapping to support the extended MIDI controllers in MIDI 2.0.
|
||||
|
||||
A MIDI 2.0 capable host first queries for the Vst::IMidiMapping2 interface and uses the old
|
||||
Vst::IMidiMapping interface as a fallback.
|
||||
|
||||
A plug-in can use the Vst::IPlugInterfaceSupport to check if the host supports Vst::IMidiMapping2.
|
||||
*/
|
||||
class IMidiMapping2 : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Gets the number of MIDI 2.0 controller to parameter assignments
|
||||
*
|
||||
* @param direction input/output direction
|
||||
* @return number of MIDI 2.0 controller to parameter assignments
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual uint32 PLUGIN_API getNumMidi2ControllerAssignments (BusDirections direction) = 0;
|
||||
|
||||
/** Gets MIDI 2.0 controller parameter assignments
|
||||
*
|
||||
* the list is preallocated by the host and must be filled by the plug-in
|
||||
*
|
||||
* @param direction input/output direction
|
||||
* @param list list of assignments
|
||||
* @return kResultTrue on success
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getMidi2ControllerAssignments (
|
||||
BusDirections direction, const Midi2ControllerParamIDAssignmentList& list) = 0;
|
||||
|
||||
/** Gets the number of MIDI 1.0 controller to parameter assignments
|
||||
*
|
||||
* @param direction input/output direction
|
||||
* @return number of MIDI 1.0 controller to parameter assignments
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual uint32 PLUGIN_API getNumMidi1ControllerAssignments (BusDirections direction) = 0;
|
||||
|
||||
/** Gets MIDI 1.0 controller parameter assignments
|
||||
*
|
||||
* the list is preallocated by the host and must be filled by the plug-in
|
||||
*
|
||||
* @param direction input/output direction
|
||||
* @param list list of assignments
|
||||
* @return kResultTrue on success
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getMidi1ControllerAssignments (
|
||||
BusDirections direction, const Midi1ControllerParamIDAssignmentList& list) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IMidiMapping2, 0x6DE14B88, 0x03F94F09, 0xA2552F0F, 0x9326593E)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** MIDI Learn interface: Vst::IMidiLearn2
|
||||
\ingroup vstIPlug vst380
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.8.0]
|
||||
- [optional]
|
||||
- [replaces Vst::IMidiLearn]
|
||||
|
||||
If this interface is implemented by the edit controller, the host will call this method whenever
|
||||
there is live MIDI-CC input for the plug-in. This way, the plug-in can change its MIDI-CC parameter
|
||||
mapping and notify the host using IComponentHandler::restartComponent with the
|
||||
kMidiCCAssignmentChanged flag.
|
||||
Use this if you want to implement custom MIDI-Learn functionality in your plug-in.
|
||||
*/
|
||||
class IMidiLearn2 : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Called on live input MIDI 2.0-CC change associated to a given bus index and MIDI channel
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API onLiveMidi2ControllerInput (BusIndex index, MidiChannel channel,
|
||||
Midi2Controller midiCC) = 0;
|
||||
|
||||
/** Called on live input MIDI 1.0-CC change associated to a given bus index and MIDI channel
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API onLiveMidi1ControllerInput (BusIndex index, MidiChannel channel,
|
||||
CtrlNumber midiCC) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IMidiLearn2, 0xF07E498A, 0x78864327, 0x8B431CED, 0xA3C553FC)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,289 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstnoteexpression.h
|
||||
// Created by : Steinberg, 10/2010
|
||||
// Description : VST Note Expression Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** \ingroup vst3typedef */
|
||||
/**@{*/
|
||||
/** Note Expression Types */
|
||||
typedef uint32 NoteExpressionTypeID;
|
||||
/** Note Expression Value */
|
||||
typedef double NoteExpressionValue;
|
||||
/**@}*/
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** NoteExpressionTypeIDs describes the type of the note expression.
|
||||
VST predefines some types like volume, pan, tuning by defining their ranges and curves.
|
||||
Used by NoteExpressionEvent::typeId and NoteExpressionTypeID::typeId
|
||||
\see NoteExpressionTypeInfo
|
||||
*/
|
||||
enum NoteExpressionTypeIDs : uint32
|
||||
{
|
||||
kVolumeTypeID = 0, ///< Volume, plain range [0 = -oo , 0.25 = 0dB, 0.5 = +6dB, 1 = +12dB]: plain = 20 * log (4 * norm)
|
||||
kPanTypeID, ///< Panning (L-R), plain range [0 = left, 0.5 = center, 1 = right]
|
||||
kTuningTypeID, ///< Tuning, plain range [0 = -120.0 (ten octaves down), 0.5 none, 1 = +120.0 (ten octaves up)]
|
||||
///< plain = 240 * (norm - 0.5) and norm = plain / 240 + 0.5
|
||||
///< oneOctave is 12.0 / 240.0; oneHalfTune = 1.0 / 240.0;
|
||||
kVibratoTypeID, ///< Vibrato
|
||||
kExpressionTypeID, ///< Expression
|
||||
kBrightnessTypeID, ///< Brightness
|
||||
kTextTypeID, ///< See NoteExpressionTextEvent
|
||||
kPhonemeTypeID, ///< TODO:
|
||||
|
||||
kCustomStart = 100000, ///< start of custom note expression type ids
|
||||
kCustomEnd = 200000, ///< end of custom note expression type ids
|
||||
|
||||
kInvalidTypeID = 0xFFFFFFFF ///< indicates an invalid note expression type
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Description of a Note Expression Type
|
||||
This structure is part of the NoteExpressionTypeInfo structure, it describes for given
|
||||
NoteExpressionTypeID its default value (for example 0.5 for a kTuningTypeID (kIsBipolar: centered)),
|
||||
its minimum and maximum (for predefined NoteExpressionTypeID the full range is predefined too) and a
|
||||
stepCount when the given NoteExpressionTypeID is limited to discrete values (like on/off state).
|
||||
\see NoteExpressionTypeInfo
|
||||
*/
|
||||
struct NoteExpressionValueDescription
|
||||
{
|
||||
NoteExpressionValue defaultValue; ///< default normalized value [0,1]
|
||||
NoteExpressionValue minimum; ///< minimum normalized value [0,1]
|
||||
NoteExpressionValue maximum; ///< maximum normalized value [0,1]
|
||||
int32 stepCount; ///< number of discrete steps (0: continuous, 1: toggle, discrete value otherwise - see \ref vst3ParameterIntro)
|
||||
};
|
||||
|
||||
#if SMTG_OS_WINDOWS && !SMTG_PLATFORM_64
|
||||
#include "pluginterfaces/vst/vstpshpack4.h"
|
||||
#endif
|
||||
//------------------------------------------------------------------------
|
||||
/** Note Expression Value event. Used in \ref Event (union)
|
||||
A note expression event affects one single playing note (referring its noteId).
|
||||
This kind of event is send from host to the plug-in like other events (NoteOnEvent,
|
||||
NoteOffEvent,...) in \ref ProcessData during the process call. Note expression events for a specific
|
||||
noteId can only occur after a NoteOnEvent. The host must take care that the event list (\ref
|
||||
IEventList) is properly sorted. Expression events are always absolute normalized values [0.0, 1.0].
|
||||
The predefined types have a predefined mapping of the normalized values (see \ref
|
||||
NoteExpressionTypeIDs) \sa INoteExpressionController
|
||||
*/
|
||||
struct NoteExpressionValueEvent
|
||||
{
|
||||
NoteExpressionTypeID typeId; ///< see \ref NoteExpressionTypeID
|
||||
int32 noteId; ///< associated note identifier to apply the change
|
||||
|
||||
NoteExpressionValue value; ///< normalized value [0.0, 1.0].
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Note Expression Int event. Used in \ref Event (union)
|
||||
Same as NoteExpressionValueEvent but use a uint64 instead of a NoteExpressionValue (double)
|
||||
\ingroup vstIPlug vst380
|
||||
- [released: 3.8.0]
|
||||
*/
|
||||
struct NoteExpressionIntValueEvent
|
||||
{
|
||||
NoteExpressionTypeID typeId; ///< see \ref NoteExpressionTypeID
|
||||
int32 noteId; ///< associated note identifier to apply the change
|
||||
|
||||
uint64 value;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Note Expression Text event. Used in Event (union)
|
||||
A Expression event affects one single playing note. \sa INoteExpressionController
|
||||
|
||||
\see NoteExpressionTypeInfo
|
||||
*/
|
||||
struct NoteExpressionTextEvent
|
||||
{
|
||||
NoteExpressionTypeID typeId; ///< see \ref NoteExpressionTypeID (kTextTypeID or kPhoneticTypeID)
|
||||
int32 noteId; ///< associated note identifier to apply the change
|
||||
|
||||
uint32 textLen; ///< the number of characters (TChar) between the beginning of text and the terminating
|
||||
///< null character (without including the terminating null character itself)
|
||||
|
||||
const TChar* text; ///< UTF-16, null terminated
|
||||
};
|
||||
|
||||
#if SMTG_OS_WINDOWS && !SMTG_PLATFORM_64
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** NoteExpressionTypeInfo is the structure describing a note expression supported by the plug-in.
|
||||
This structure is used by the method \ref INoteExpressionController::getNoteExpressionInfo.
|
||||
\see INoteExpressionController
|
||||
*/
|
||||
struct NoteExpressionTypeInfo
|
||||
{
|
||||
NoteExpressionTypeID typeId; ///< unique identifier of this note Expression type
|
||||
String128 title; ///< note Expression type title (e.g. "Volume")
|
||||
String128 shortTitle; ///< note Expression type short title (e.g. "Vol")
|
||||
String128 units; ///< note Expression type unit (e.g. "dB")
|
||||
int32 unitId; ///< id of unit this NoteExpression belongs to (see \ref vst3Units), in order to sort the note expression, it is possible to use unitId like for parameters. -1 means no unit used.
|
||||
NoteExpressionValueDescription valueDesc; ///< value description see \ref NoteExpressionValueDescription
|
||||
ParamID associatedParameterId; ///< optional associated parameter ID (for mapping from note expression to global (using the parameter automation for example) and back). Only used when kAssociatedParameterIDValid is set in flags.
|
||||
|
||||
int32 flags; ///< NoteExpressionTypeFlags (see below)
|
||||
enum NoteExpressionTypeFlags
|
||||
{
|
||||
kIsBipolar = 1 << 0, ///< event is bipolar (centered), otherwise unipolar
|
||||
kIsOneShot = 1 << 1, ///< event occurs only one time for its associated note (at begin of the noteOn)
|
||||
kIsAbsolute = 1 << 2, ///< This note expression will apply an absolute change to the sound (not relative (offset))
|
||||
kAssociatedParameterIDValid = 1 << 3,///< indicates that the associatedParameterID is valid and could be used
|
||||
};
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended plug-in interface IEditController for note expression event support:
|
||||
Vst::INoteExpressionController
|
||||
\ingroup vstIPlug vst350
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.5.0]
|
||||
- [optional]
|
||||
|
||||
With this plug-in interface, the host can retrieve all necessary note expression information
|
||||
supported by the plug-in. Note expression information (\ref NoteExpressionTypeInfo) are specific for
|
||||
given channel and event bus.
|
||||
|
||||
Note that there is only one NoteExpressionTypeID per given channel of an event bus.
|
||||
|
||||
The method getNoteExpressionStringByValue allows conversion from a normalized value to a string
|
||||
representation and the getNoteExpressionValueByString method from a string to a normalized value.
|
||||
|
||||
When the note expression state changes (for example when switching presets) the plug-in needs
|
||||
to inform the host about it via \ref IComponentHandler::restartComponent (kNoteExpressionChanged).
|
||||
*/
|
||||
class INoteExpressionController : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Returns number of supported note change types for event bus index and channel.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual int32 PLUGIN_API getNoteExpressionCount (int32 busIndex /*in*/,
|
||||
int16 channel /*in*/) = 0;
|
||||
|
||||
/** Returns note change type info.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getNoteExpressionInfo (int32 busIndex /*in*/, int16 channel /*in*/,
|
||||
int32 noteExpressionIndex /*in*/,
|
||||
NoteExpressionTypeInfo& info /*out*/) = 0;
|
||||
|
||||
/** Gets a user readable representation of the normalized note change value.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getNoteExpressionStringByValue (
|
||||
int32 busIndex /*in*/, int16 channel /*in*/, NoteExpressionTypeID id /*in*/,
|
||||
NoteExpressionValue valueNormalized /*in*/, String128 string /*out*/) = 0;
|
||||
|
||||
/** Converts the user readable representation to the normalized note change value.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getNoteExpressionValueByString (
|
||||
int32 busIndex /*in*/, int16 channel /*in*/, NoteExpressionTypeID id /*in*/,
|
||||
const TChar* string /*in*/, NoteExpressionValue& valueNormalized /*out*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (INoteExpressionController, 0xB7F8F859, 0x41234872, 0x91169581, 0x4F3721A3)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------
|
||||
/** KeyswitchTypeIDs describes the type of a key switch
|
||||
\see KeyswitchInfo
|
||||
*/
|
||||
enum KeyswitchTypeIDs : uint32
|
||||
{
|
||||
kNoteOnKeyswitchTypeID = 0, ///< press before noteOn is played
|
||||
kOnTheFlyKeyswitchTypeID, ///< press while noteOn is played
|
||||
kOnReleaseKeyswitchTypeID, ///< press before entering release
|
||||
kKeyRangeTypeID ///< key should be maintained pressed for playing
|
||||
};
|
||||
|
||||
/** \ingroup vst3typedef */
|
||||
typedef uint32 KeyswitchTypeID;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** KeyswitchInfo is the structure describing a key switch
|
||||
This structure is used by the method \ref IKeyswitchController::getKeyswitchInfo.
|
||||
\see IKeyswitchController
|
||||
*/
|
||||
struct KeyswitchInfo
|
||||
{
|
||||
KeyswitchTypeID typeId; ///< see KeyswitchTypeID
|
||||
String128 title; ///< name of key switch (e.g. "Accentuation")
|
||||
String128 shortTitle; ///< short title (e.g. "Acc")
|
||||
|
||||
int32 keyswitchMin; ///< associated main key switch min (value between [0, 127])
|
||||
int32 keyswitchMax; ///< associated main key switch max (value between [0, 127])
|
||||
int32 keyRemapped; /** optional remapped key switch (default -1), the plug-in could provide one remapped
|
||||
key for a key switch (allowing better location on the keyboard of the key switches) */
|
||||
|
||||
int32 unitId; ///< id of unit this key switch belongs to (see \ref vst3Units), -1 means no unit used.
|
||||
|
||||
int32 flags; ///< not yet used (set to 0)
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended plug-in interface IEditController for key switches support: Vst::IKeyswitchController
|
||||
\ingroup vstIPlug vst350
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.5.0]
|
||||
- [optional]
|
||||
|
||||
When a (instrument) plug-in supports such interface, the host could get from the plug-in the current
|
||||
set of used key switches (megatrig/articulation) for a given channel of a event bus and then
|
||||
automatically use them (like in Cubase 6) to create VST Expression Map (allowing to associated
|
||||
symbol to a given articulation / key switch).
|
||||
*/
|
||||
class IKeyswitchController : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Returns number of supported key switches for event bus index and channel.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual int32 PLUGIN_API getKeyswitchCount (int32 busIndex /*in*/, int16 channel /*in*/) = 0;
|
||||
|
||||
/** Returns key switch info.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getKeyswitchInfo (int32 busIndex /*in*/, int16 channel /*in*/,
|
||||
int32 keySwitchIndex /*in*/,
|
||||
KeyswitchInfo& info /*out*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IKeyswitchController, 0x1F2F76D3, 0xBFFB4B96, 0xB99527A5, 0x5EBCCEF4)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,148 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstparameterchanges.h
|
||||
// Created by : Steinberg, 09/2005
|
||||
// Description : VST Parameter Change Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
//----------------------------------------------------------------------
|
||||
/** Queue of changes for a specific parameter: Vst::IParamValueQueue
|
||||
\ingroup vstIHost vst300
|
||||
- [host imp]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
The change queue can be interpreted as segment of an automation curve. For each
|
||||
processing block, a segment with the size of the block is transmitted to the processor.
|
||||
The curve is expressed as sampling points of a linear approximation of
|
||||
the original automation curve. If the original already is a linear curve, it can
|
||||
be transmitted precisely. A non-linear curve has to be converted to a linear
|
||||
approximation by the host. Every point of the value queue defines a linear
|
||||
section of the curve as a straight line from the previous point of a block to
|
||||
the new one. So the plug-in can calculate the value of the curve for any sample
|
||||
position in the block.
|
||||
|
||||
<b>Implicit Points:</b> \n
|
||||
In each processing block, the section of the curve for each parameter is transmitted.
|
||||
In order to reduce the amount of points, the point at block position 0 can be omitted.
|
||||
- If the curve has a slope of 0 over a period of multiple blocks, only one point is
|
||||
transmitted for the block where the constant curve section starts. The queue for the following
|
||||
blocks will be empty as long as the curve slope is 0.
|
||||
- If the curve has a constant slope other than 0 over the period of several blocks, only
|
||||
the value for the last sample of the block is transmitted. In this case, the last valid point
|
||||
is at block position -1. The processor can calculate the value for each sample in the block
|
||||
by using a linear interpolation:
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
double x1 = -1; // position of last point related to current buffer
|
||||
double y1 = currentParameterValue; // last transmitted value
|
||||
|
||||
int32 pointTime = 0;
|
||||
ParamValue pointValue = 0;
|
||||
IParamValueQueue::getPoint (0, pointTime, pointValue);
|
||||
|
||||
double x2 = pointTime;
|
||||
double y2 = pointValue;
|
||||
|
||||
double slope = (y2 - y1) / (x2 - x1);
|
||||
double offset = y1 - (slope * x1);
|
||||
|
||||
double curveValue = (slope * bufferTime) + offset; // bufferTime is any position in buffer
|
||||
\endcode
|
||||
|
||||
\b Jumps:
|
||||
\n
|
||||
A jump in the automation curve has to be transmitted as two points: one with the
|
||||
old value and one with the new value at the next sample position.
|
||||
|
||||
\image html "automation.jpg"
|
||||
|
||||
See \ref IParameterChanges, \ref ProcessData
|
||||
*/
|
||||
class IParamValueQueue : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Returns its associated ID. */
|
||||
virtual ParamID PLUGIN_API getParameterId () = 0;
|
||||
|
||||
/** Returns count of points in the queue. */
|
||||
virtual int32 PLUGIN_API getPointCount () = 0;
|
||||
|
||||
/** Gets the value and offset at a given index. */
|
||||
virtual tresult PLUGIN_API getPoint (int32 index /*in*/, int32& sampleOffset /*out*/,
|
||||
ParamValue& value /*out*/) = 0;
|
||||
|
||||
/** Adds a new value at the end of the queue, its index is returned. */
|
||||
virtual tresult PLUGIN_API addPoint (int32 sampleOffset /*in*/, ParamValue value /*in*/,
|
||||
int32& index /*out*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IParamValueQueue, 0x01263A18, 0xED074F6F, 0x98C9D356, 0x4686F9BA)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
/** All parameter changes of a processing block: Vst::IParameterChanges
|
||||
\ingroup vstIHost vst300
|
||||
- [host imp]
|
||||
- [released: 3.0.0]
|
||||
- [mandatory]
|
||||
|
||||
This interface is used to transmit any changes to be applied to parameters
|
||||
in the current processing block. A change can be caused by GUI interaction as
|
||||
well as automation. They are transmitted as a list of queues (\ref IParamValueQueue)
|
||||
containing only queues for parameters that actually did change.
|
||||
See \ref IParamValueQueue, \ref ProcessData
|
||||
*/
|
||||
class IParameterChanges : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Returns count of Parameter changes in the list. */
|
||||
virtual int32 PLUGIN_API getParameterCount () = 0;
|
||||
|
||||
/** Returns the queue at a given index. */
|
||||
virtual IParamValueQueue* PLUGIN_API getParameterData (int32 index /*in*/) = 0;
|
||||
|
||||
/** Adds a new parameter queue with a given ID at the end of the list,
|
||||
returns it and its index in the parameter changes list. */
|
||||
virtual IParamValueQueue* PLUGIN_API addParameterData (const ParamID& id /*in*/,
|
||||
int32& index /*out*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IParameterChanges, 0xA4779663, 0x0BB64A56, 0xB44384A8, 0x466FEB9D)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,154 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstparameterfunctionname.h
|
||||
// Created by : Steinberg, 03/2020
|
||||
// Description : VST Parameter Function Name Interface
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
namespace FunctionNameType {
|
||||
//--------------------------------------------------------------------
|
||||
const CString kCompGainReduction = "Comp:GainReduction"; /** */
|
||||
const CString kCompGainReductionMax = "Comp:GainReductionMax";
|
||||
const CString kCompGainReductionPeakHold = "Comp:GainReductionPeakHold";
|
||||
const CString kCompResetGainReductionMax = "Comp:ResetGainReductionMax";
|
||||
|
||||
const CString kLowLatencyMode = "LowLatencyMode"; /** Useful for live situation where low
|
||||
latency is required:
|
||||
0 means LowLatency disable,
|
||||
1 means LowLatency enable */
|
||||
const CString kDryWetMix = "DryWetMix"; /** Allowing to mix the original (Dry) Signal with the processed one (Wet):
|
||||
0.0 means Dry Signal only,
|
||||
0.5 means 50% Dry Signal + 50% Wet Signal,
|
||||
1.0 means Wet Signal only */
|
||||
const CString kRandomize = "Randomize"; /** Allow to assign some randomized values to some
|
||||
parameters in a controlled way*/
|
||||
|
||||
/// Panner Type
|
||||
const CString kPanPosCenterX = "PanPosCenterX"; ///< Gravity point X-axis [0, 1]=>[L-R] (for stereo: middle between left and right)
|
||||
const CString kPanPosCenterY = "PanPosCenterY"; ///< Gravity point Y-axis [0, 1]=>[Front-Rear]
|
||||
const CString kPanPosCenterZ = "PanPosCenterZ"; ///< Gravity point Z-axis [0, 1]=>[Bottom-Top]
|
||||
|
||||
|
||||
} // FunctionNameType
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Edit controller component interface extension: Vst::IParameterFunctionName
|
||||
\ingroup vstIPlug vst370
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.7.0]
|
||||
- [optional]
|
||||
|
||||
This interface allows the host to get a parameter associated to a specific meaning (a functionName)
|
||||
for a given unit. The host can use this information, for example, for drawing a Gain Reduction meter
|
||||
in its own UI. In order to get the plain value of this parameter, the host should use the
|
||||
IEditController::normalizedParamToPlain. The host can automatically map parameters to dedicated UI
|
||||
controls, such as the wet-dry mix knob or Randomize button.
|
||||
|
||||
\section IParameterFunctionNameExample Example
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
// here an example of how a VST3 plug-in could support this IParameterFunctionName interface.
|
||||
// we need to define somewhere the iids:
|
||||
|
||||
// in MyController class declaration
|
||||
class MyController : public Vst::EditController, public Vst::IParameterFunctionName
|
||||
{
|
||||
// ...
|
||||
tresult PLUGIN_API getParameterIDFromFunctionName (UnitID unitID, FIDString functionName,
|
||||
Vst::ParamID& paramID) override;
|
||||
// ...
|
||||
|
||||
OBJ_METHODS (MyController, Vst::EditController)
|
||||
DEFINE_INTERFACES
|
||||
// ...
|
||||
DEF_INTERFACE (Vst::IParameterFunctionName)
|
||||
END_DEFINE_INTERFACES (Vst::EditController)
|
||||
DELEGATE_REFCOUNT (Vst::EditController)
|
||||
// ...
|
||||
}
|
||||
|
||||
#include "ivstparameterfunctionname.h"
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
DEF_CLASS_IID (IParameterFunctionName)
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API MyController::getParameterIDFromFunctionName (UnitID unitID, FIDString
|
||||
functionName, Vst::ParamID& paramID)
|
||||
{
|
||||
using namespace Vst;
|
||||
|
||||
paramID = kNoParamId;
|
||||
|
||||
if (unitID == kRootUnitId && FIDStringsEqual (functionName, kCompGainReduction))
|
||||
paramID = kMyGainReductionId;
|
||||
|
||||
return (paramID != kNoParamId) ? kResultOk : kResultFalse;
|
||||
}
|
||||
|
||||
//--- a host implementation example: --------------------
|
||||
// ...
|
||||
FUnknownPtr<Vst::IParameterFunctionName> functionName (mEditController->getIEditController ());
|
||||
if (functionName)
|
||||
{
|
||||
Vst::ParamID paramID;
|
||||
if (functionName->getParameterIDFromFunctionName (kRootUnitId,
|
||||
Vst::FunctionNameType::kCompGainReduction, paramID) == kResultTrue)
|
||||
{
|
||||
// paramID could be cached for performance issue
|
||||
ParamValue norm = mEditController->getIEditController ()->getParamNormalized (paramID);
|
||||
ParamValue plain = mEditController->getIEditController ()->normalizedParamToPlain (paramID, norm);
|
||||
// plain is something like -6 (-6dB)
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class IParameterFunctionName : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Gets for the given unitID the associated paramID to a function Name.
|
||||
* Returns kResultFalse when no found parameter (paramID is set to kNoParamId in this case).
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getParameterIDFromFunctionName (UnitID unitID /*in*/,
|
||||
FIDString functionName /*in*/,
|
||||
ParamID& paramID /*inout*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IParameterFunctionName, 0x6D21E1DC, 0x91199D4B, 0xA2A02FEF, 0x6C1AE55C)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,169 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstphysicalui.h
|
||||
// Created by : Steinberg, 06/2018
|
||||
// Description : VST Physical User Interface support
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/ivstnoteexpression.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** \ingroup vst3typedef */
|
||||
/**@{*/
|
||||
/** Physical UI Type */
|
||||
typedef uint32 PhysicalUITypeID;
|
||||
/**@}*/
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** PhysicalUITypeIDs describes the type of Physical UI (PUI) which could be associated to a note
|
||||
expression.
|
||||
\see PhysicalUIMap
|
||||
*/
|
||||
enum PhysicalUITypeIDs
|
||||
{
|
||||
/** absolute X position when touching keys of PUIs. Range [0=left, 0.5=middle, 1=right] */
|
||||
kPUIXMovement = 0,
|
||||
/** absolute Y position when touching keys of PUIs. Range [0=bottom/near, 0.5=center, 1=top/far] */
|
||||
kPUIYMovement,
|
||||
/** pressing a key down on keys of PUIs. Range [0=No Pressure, 1=Full Pressure] */
|
||||
kPUIPressure,
|
||||
|
||||
kPUITypeCount, ///< count of current defined PUIs
|
||||
|
||||
kInvalidPUITypeID = 0xFFFFFFFF ///< indicates an invalid or not initialized PUI type
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** PhysicalUIMap describes a mapping of a noteExpression Type to a Physical UI Type.
|
||||
It is used in PhysicalUIMapList.
|
||||
\see PhysicalUIMapList
|
||||
*/
|
||||
struct PhysicalUIMap
|
||||
{
|
||||
/** This represents the physical UI. /see PhysicalUITypeIDs, this is set by the caller of
|
||||
* getPhysicalUIMapping */
|
||||
PhysicalUITypeID physicalUITypeID;
|
||||
|
||||
/** This represents the associated noteExpression TypeID to the given physicalUITypeID. This
|
||||
* will be filled by the plug-in in the call getPhysicalUIMapping, set it to kInvalidTypeID if
|
||||
* no Note Expression is associated to the given PUI. */
|
||||
NoteExpressionTypeID noteExpressionTypeID;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** PhysicalUIMapList describes a list of PhysicalUIMap
|
||||
\see INoteExpressionPhysicalUIMapping
|
||||
*/
|
||||
struct PhysicalUIMapList
|
||||
{
|
||||
/** Count of entries in the map array, set by the caller of getPhysicalUIMapping. */
|
||||
uint32 count;
|
||||
|
||||
/** Pointer to a list of PhysicalUIMap containing count entries. */
|
||||
PhysicalUIMap* map;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended plug-in interface IEditController for note expression event support: Vst::INoteExpressionPhysicalUIMapping
|
||||
\ingroup vstIPlug vst3611
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.6.11]
|
||||
- [optional]
|
||||
|
||||
With this plug-in interface, the host can retrieve the preferred physical mapping associated to note
|
||||
expression supported by the plug-in.
|
||||
When the mapping changes (for example when switching presets) the plug-in needs
|
||||
to inform the host about it via \ref IComponentHandler::restartComponent (kNoteExpressionChanged).
|
||||
|
||||
\section INoteExpressionPhysicalUIMappingExample Example
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
// here an example of how a VST3 plug-in could support this INoteExpressionPhysicalUIMapping interface.
|
||||
// we need to define somewhere the iids:
|
||||
|
||||
//in MyController class declaration
|
||||
class MyController : public Vst::EditController, public Vst::INoteExpressionPhysicalUIMapping
|
||||
{
|
||||
// ...
|
||||
//--- INoteExpressionPhysicalUIMapping ---------------------------------
|
||||
tresult PLUGIN_API getPhysicalUIMapping (int32 busIndex, int16 channel, PhysicalUIMapList& list) SMTG_OVERRIDE;
|
||||
// ...
|
||||
|
||||
OBJ_METHODS (MyController, Vst::EditController)
|
||||
DEFINE_INTERFACES
|
||||
// ...
|
||||
DEF_INTERFACE (Vst::INoteExpressionPhysicalUIMapping)
|
||||
END_DEFINE_INTERFACES (Vst::EditController)
|
||||
//...
|
||||
}
|
||||
|
||||
// In mycontroller.cpp
|
||||
#include "pluginterfaces/vst/ivstnoteexpression.h"
|
||||
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
DEF_CLASS_IID (INoteExpressionPhysicalUIMapping)
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API MyController::getPhysicalUIMapping (int32 busIndex, int16 channel, PhysicalUIMapList& list)
|
||||
{
|
||||
if (busIndex == 0 && channel == 0)
|
||||
{
|
||||
for (uint32 i = 0; i < list.count; ++i)
|
||||
{
|
||||
NoteExpressionTypeID type = kInvalidTypeID;
|
||||
if (kPUIXMovement == list.map[i].physicalUITypeID)
|
||||
list.map[i].noteExpressionTypeID = kCustomStart + 1;
|
||||
else if (kPUIYMovement == list.map[i].physicalUITypeID)
|
||||
list.map[i].noteExpressionTypeID = kCustomStart + 2;
|
||||
}
|
||||
return kResultTrue;
|
||||
}
|
||||
return kResultFalse;
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class INoteExpressionPhysicalUIMapping : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Fills the list of mapped [physical UI (in) - note expression (out)] for a given bus index
|
||||
* and channel.
|
||||
* \note [UI-thread & Connected] */
|
||||
virtual tresult PLUGIN_API getPhysicalUIMapping (int32 busIndex /*in*/, int16 channel /*in*/,
|
||||
PhysicalUIMapList& list /*inout*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (INoteExpressionPhysicalUIMapping, 0xB03078FF, 0x94D24AC8, 0x90CCD303, 0xD4133324)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,67 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstpluginterfacesupport.h
|
||||
// Created by : Steinberg, 11/2018
|
||||
// Description : VST Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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 {
|
||||
namespace Vst {
|
||||
//------------------------------------------------------------------------
|
||||
/** Host callback interface for an edit controller: Vst::IPlugInterfaceSupport
|
||||
\ingroup vstIHost vst3612
|
||||
- [host imp]
|
||||
- [released: 3.6.12]
|
||||
- [optional]
|
||||
|
||||
Allows a plug-in to ask the host if a given plug-in interface is supported/used by the host.
|
||||
It is implemented by the hostContext given when the component is initialized.
|
||||
|
||||
\section IPlugInterfaceSupportExample Example
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API MyPluginController::initialize (FUnknown* context)
|
||||
{
|
||||
// ...
|
||||
FUnknownPtr<IPlugInterfaceSupport> plugInterfaceSupport (context);
|
||||
if (plugInterfaceSupport)
|
||||
{
|
||||
if (plugInterfaceSupport->isPlugInterfaceSupported (IMidiMapping::iid) == kResultTrue)
|
||||
// IMidiMapping is used by the host
|
||||
}
|
||||
// ...
|
||||
}
|
||||
\endcode
|
||||
\see IPluginBase
|
||||
*/
|
||||
class IPlugInterfaceSupport : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Returns kResultTrue if the associated interface to the given _iid is supported/used by the host. */
|
||||
virtual tresult PLUGIN_API isPlugInterfaceSupported (const TUID _iid) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IPlugInterfaceSupport, 0x4FB58B9E, 0x9EAA4E0F, 0xAB361C1C, 0xCCB56FEA)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstplugview.h
|
||||
// Created by : Steinberg, 01/2009
|
||||
// Description : Plug-in User Interface Extension
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
//------------------------------------------------------------------------
|
||||
// IParameterFinder Interface
|
||||
//------------------------------------------------------------------------
|
||||
/** Extension for IPlugView to find view parameters (lookup value under mouse support): Vst::IParameterFinder
|
||||
\ingroup pluginGUI vst302
|
||||
- [plug imp]
|
||||
- [extends IPlugView]
|
||||
- [released: 3.0.2]
|
||||
- [optional]
|
||||
|
||||
It is highly recommended to implement this interface.
|
||||
A host can implement important functionality when a plug-in supports this interface.
|
||||
|
||||
For example, all Steinberg hosts require this interface in order to support the "AI Knob".
|
||||
*/
|
||||
class IParameterFinder: public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Find out which parameter in plug-in view is at given position (relative to plug-in view).
|
||||
* \note [UI-thread & (Initialized | Connected) & plugView] */
|
||||
virtual tresult PLUGIN_API findParameter (int32 xPos, int32 yPos, ParamID& resultTag /*out*/) = 0;
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IParameterFinder, 0x0F618302, 0x215D4587, 0xA512073C, 0x77B9D383)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,99 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstprefetchablesupport.h
|
||||
// Created by : Steinberg, 02/2015
|
||||
// Description : VST Prefetchable Support Interface
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/vsttypes.h"
|
||||
#include "pluginterfaces/vst/ivstattributes.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/** \ingroup vst3typedef */
|
||||
/**@{*/
|
||||
/** Prefetchable Support Type */
|
||||
typedef uint32 PrefetchableSupport;
|
||||
/**@}*/
|
||||
|
||||
/** Prefetchable Support Enum */
|
||||
enum ePrefetchableSupport
|
||||
{
|
||||
kIsNeverPrefetchable = 0, ///< every instance of the plug does not support prefetch processing
|
||||
kIsYetPrefetchable, ///< in the current state the plug support prefetch processing
|
||||
kIsNotYetPrefetchable, ///< in the current state the plug does not support prefetch processing
|
||||
kNumPrefetchableSupport
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// IPrefetchableSupport Interface
|
||||
//------------------------------------------------------------------------
|
||||
/** Indicates that the plug-in could or not support Prefetch (dynamically): Vst::IPrefetchableSupport
|
||||
\ingroup vstIPlug vst365
|
||||
- [plug imp]
|
||||
- [extends IComponent]
|
||||
- [released: 3.6.5]
|
||||
- [optional]
|
||||
|
||||
The plug-in should implement this interface if it needs to dynamically change between prefetchable or not.
|
||||
By default (without implementing this interface) the host decides in which mode the plug-in is processed.
|
||||
For more info about the prefetch processing mode check the ProcessModes::kPrefetch documentation.
|
||||
|
||||
\section IPrefetchableSupportExample Example
|
||||
|
||||
\code{.cpp}
|
||||
//------------------------------------------------------------------------
|
||||
tresult PLUGIN_API myPlug::getPrefetchableSupport (PrefetchableSupport& prefetchable)
|
||||
{
|
||||
prefetchable = kIsNeverPrefetchable;
|
||||
|
||||
switch (myPrefetchableMode)
|
||||
{
|
||||
case 0: prefetchable = kIsNeverPrefetchable; break;
|
||||
case 1: prefetchable = kIsYetPrefetchable; break;
|
||||
case 2: prefetchable = kIsNotYetPrefetchable; break;
|
||||
}
|
||||
return kResultOk;
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
class IPrefetchableSupport : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** retrieve the current prefetch support. Use IComponentHandler::restartComponent
|
||||
* (kPrefetchableSupportChanged) to inform the host that this support has changed.
|
||||
* \note [UI-thread & (Initialized | Connected | Setup Done | Activated | Processing)] */
|
||||
virtual tresult PLUGIN_API getPrefetchableSupport (PrefetchableSupport& prefetchable /*out*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IPrefetchableSupport, 0x8AE54FDA, 0xE93046B9, 0xA28555BC, 0xDC98E21E)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,153 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstprocesscontext.h
|
||||
// Created by : Steinberg, 10/2005
|
||||
// Description : VST Processing Context Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
//------------------------------------------------------------------------
|
||||
/** Frame Rate
|
||||
A frame rate describes the number of image (frame) displayed per second.
|
||||
Some examples:
|
||||
- 23.976 fps is framesPerSecond: 24 and flags: kPullDownRate
|
||||
- 24 fps is framesPerSecond: 24 and flags: 0
|
||||
- 25 fps is framesPerSecond: 25 and flags: 0
|
||||
- 29.97 drop fps is framesPerSecond: 30 and flags: kDropRate|kPullDownRate
|
||||
- 29.97 fps is framesPerSecond: 30 and flags: kPullDownRate
|
||||
- 30 fps is framesPerSecond: 30 and flags: 0
|
||||
- 30 drop fps is framesPerSecond: 30 and flags: kDropRate
|
||||
- 50 fps is framesPerSecond: 50 and flags: 0
|
||||
- 59.94 fps is framesPerSecond: 60 and flags: kPullDownRate
|
||||
- 60 fps is framesPerSecond: 60 and flags: 0
|
||||
*/
|
||||
struct FrameRate
|
||||
{
|
||||
//------------------------------------------------------------------------
|
||||
enum FrameRateFlags
|
||||
{
|
||||
kPullDownRate = 1 << 0,
|
||||
kDropRate = 1 << 1
|
||||
};
|
||||
|
||||
uint32 framesPerSecond; ///< frame rate
|
||||
uint32 flags; ///< flags #FrameRateFlags
|
||||
//------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Description of a chord.
|
||||
A chord is described with a key note, a root note and the
|
||||
\copydoc chordMask
|
||||
\see ProcessContext
|
||||
*/
|
||||
struct Chord
|
||||
{
|
||||
//------------------------------------------------------------------------
|
||||
uint8 keyNote; ///< key note in chord
|
||||
uint8 rootNote; ///< lowest note in chord
|
||||
|
||||
/** Bitmask of a chord. \n
|
||||
1st bit set: minor second; 2nd bit set: major second, and so on. \n
|
||||
There is \b no bit for the keynote (root of the chord) because it is inherently always present. \n
|
||||
Examples:
|
||||
- XXXX 0000 0100 1000 (= 0x0048) -> major chord
|
||||
- XXXX 0000 0100 0100 (= 0x0044) -> minor chord
|
||||
- XXXX 0010 0100 0100 (= 0x0244) -> minor chord with minor seventh */
|
||||
int16 chordMask;
|
||||
|
||||
enum Masks {
|
||||
kChordMask = 0x0FFF, ///< mask for chordMask
|
||||
kReservedMask = 0xF000 ///< reserved for future use
|
||||
};
|
||||
//------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Audio processing context.
|
||||
For each processing block the host provides timing information and musical parameters that can
|
||||
change over time. For a host that supports jumps (like cycle) it is possible to split up a
|
||||
processing block into multiple parts in order to provide a correct project time inside of every
|
||||
block, but this behavior is not mandatory. Since the timing will be correct at the beginning of the
|
||||
next block again, a host that is dependent on a fixed processing block size can choose to neglect
|
||||
this problem.
|
||||
\see IAudioProcessor, ProcessData
|
||||
*/
|
||||
struct ProcessContext
|
||||
{
|
||||
//------------------------------------------------------------------------
|
||||
/** Transport state & other flags */
|
||||
enum StatesAndFlags
|
||||
{
|
||||
kPlaying = 1 << 1, ///< currently playing
|
||||
kCycleActive = 1 << 2, ///< cycle is active
|
||||
kRecording = 1 << 3, ///< currently recording
|
||||
|
||||
kSystemTimeValid = 1 << 8, ///< systemTime contains valid information
|
||||
kContTimeValid = 1 << 17, ///< continousTimeSamples contains valid information
|
||||
|
||||
kProjectTimeMusicValid = 1 << 9,///< projectTimeMusic contains valid information
|
||||
kBarPositionValid = 1 << 11, ///< barPositionMusic contains valid information
|
||||
kCycleValid = 1 << 12, ///< cycleStartMusic and barPositionMusic contain valid information
|
||||
|
||||
kTempoValid = 1 << 10, ///< tempo contains valid information
|
||||
kTimeSigValid = 1 << 13, ///< timeSigNumerator and timeSigDenominator contain valid information
|
||||
kChordValid = 1 << 18, ///< chord contains valid information
|
||||
|
||||
kSmpteValid = 1 << 14, ///< smpteOffset and frameRate contain valid information
|
||||
kClockValid = 1 << 15 ///< samplesToNextClock valid
|
||||
};
|
||||
|
||||
uint32 state; ///< a combination of the values from \ref StatesAndFlags
|
||||
|
||||
double sampleRate; ///< current sample rate (always valid)
|
||||
TSamples projectTimeSamples; ///< project time in samples (always valid)
|
||||
|
||||
int64 systemTime; ///< system time in nanoseconds (optional)
|
||||
TSamples continousTimeSamples; ///< project time, without loop (optional)
|
||||
|
||||
TQuarterNotes projectTimeMusic; ///< musical position in quarter notes (1.0 equals 1 quarter note) (optional)
|
||||
TQuarterNotes barPositionMusic; ///< last bar start position, in quarter notes (optional)
|
||||
TQuarterNotes cycleStartMusic; ///< cycle start in quarter notes (optional)
|
||||
TQuarterNotes cycleEndMusic; ///< cycle end in quarter notes (optional)
|
||||
|
||||
double tempo; ///< tempo in BPM (Beats Per Minute) (optional)
|
||||
int32 timeSigNumerator; ///< time signature numerator (e.g. 3 for 3/4) (optional)
|
||||
int32 timeSigDenominator; ///< time signature denominator (e.g. 4 for 3/4) (optional)
|
||||
|
||||
Chord chord; ///< musical info (optional)
|
||||
|
||||
int32 smpteOffsetSubframes; ///< SMPTE (sync) offset in subframes (1/80 of frame) (optional)
|
||||
FrameRate frameRate; ///< frame rate (optional)
|
||||
|
||||
int32 samplesToNextClock; ///< MIDI Clock Resolution (24 Per Quarter Note), can be negative (nearest) (optional)
|
||||
//------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,79 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstremapparamid.h
|
||||
// Created by : Steinberg, 02/2024
|
||||
// Description : VST Edit Controller Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended IEditController interface for a component.
|
||||
\ingroup vstIPlug vst3711
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.7.11]
|
||||
- [optional]
|
||||
|
||||
When replacing one plug-in with another, the host can ask the new plug-in for remapping paramIDs to
|
||||
new ones.
|
||||
|
||||
\n
|
||||
\see Moduleinfo
|
||||
\see \ref IPluginCompatibility
|
||||
\see IEditController
|
||||
*/
|
||||
class IRemapParamID : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Retrieve the appropriate paramID for a specific plug-in UID and paramID (or index for VST 2
|
||||
* plug-ins).
|
||||
* The retrieved paramID should match the one it replaces, maintaining the same
|
||||
* behavior during automation playback. Called in UI-Thread context.
|
||||
*
|
||||
* @param[in] pluginToReplaceUID - TUID of plug-in (processor) that will be replaced
|
||||
* @param[in] oldParamID - paramID (or index for VST 2 plug-ins) to be replaced
|
||||
* @param[out] newParamID - contains the associated paramID to be used
|
||||
*
|
||||
* @return kResultTrue if a compatible parameter is available (newParamID has the appropriate
|
||||
* value, it could be the same than oldParamID), or kResultFalse if no compatible parameter is
|
||||
* available (newParamID is undefined).
|
||||
*
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual tresult PLUGIN_API getCompatibleParamID (const TUID pluginToReplaceUID /*in*/,
|
||||
ParamID oldParamID /*in*/,
|
||||
ParamID& newParamID /*out*/) = 0;
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IRemapParamID, 0x2B88021E, 0x6286B646, 0xB49DF76A, 0x5663061C)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,365 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstrepresentation.h
|
||||
// Created by : Steinberg, 08/2010
|
||||
// Description : VST Representation Interface
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
class IBStream;
|
||||
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** RepresentationInfo is the structure describing a representation
|
||||
This structure is used in the function \see IXmlRepresentationController::getXmlRepresentationStream.
|
||||
\see IXmlRepresentationController
|
||||
*/
|
||||
struct RepresentationInfo
|
||||
{
|
||||
RepresentationInfo ()
|
||||
{
|
||||
memset (vendor, 0, kNameSize);
|
||||
memset (name, 0, kNameSize);
|
||||
memset (version, 0, kNameSize);
|
||||
memset (host, 0, kNameSize);
|
||||
}
|
||||
|
||||
RepresentationInfo (char8* _vendor, char8* _name = nullptr, char8* _version = nullptr, char8* _host = nullptr)
|
||||
{
|
||||
memset (vendor, 0, kNameSize);
|
||||
if (_vendor)
|
||||
strcpy (vendor, _vendor);
|
||||
memset (name, 0, kNameSize);
|
||||
if (_name)
|
||||
strcpy (name, _name);
|
||||
memset (version, 0, kNameSize);
|
||||
if (_version)
|
||||
strcpy (version, _version);
|
||||
memset (host, 0, kNameSize);
|
||||
if (_host)
|
||||
strcpy (host, _host);
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
kNameSize = 64
|
||||
};
|
||||
char8 vendor[kNameSize]; ///< Vendor name of the associated representation (remote) (eg. "Yamaha").
|
||||
char8 name[kNameSize]; ///< Representation (remote) Name (eg. "O2").
|
||||
char8 version[kNameSize]; ///< Version of this "Remote" (eg. "1.0").
|
||||
char8 host[kNameSize]; ///< Optional: used if the representation is for a given host only (eg. "Nuendo").
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------
|
||||
/** Extended plug-in interface IEditController for a component: Vst::IXmlRepresentationController
|
||||
\ingroup vstIPlug vst350
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.5.0]
|
||||
- [optional]
|
||||
|
||||
A representation based on XML is a way to export, structure, and group plug-ins parameters for a specific remote (hardware or software rack (such as quick controls)).
|
||||
\n
|
||||
It allows to describe each parameter more precisely (what is the best matching to a knob, different title lengths matching limited remote display,...).\n See an \ref Example.
|
||||
\n\n
|
||||
- A representation is composed of pages (this means that to see all exported parameters, the user has to navigate through the pages).
|
||||
- A page is composed of cells (for example 8 cells per page).
|
||||
- A cell is composed of layers (for example a cell could have a knob, a display, and a button, which means 3 layers).
|
||||
- A layer is associated to a plug-in parameter using the ParameterID as identifier:
|
||||
- it could be a knob with a display for title and/or value, this display uses the same parameterId, but it could an another one.
|
||||
- switch
|
||||
- link which allows to jump directly to a subpage (another page)
|
||||
- more... See Vst::LayerType
|
||||
.
|
||||
|
||||
\n
|
||||
This representation is implemented as XML text following the Document Type Definition (DTD): http://dtd.steinberg.net/VST-Remote-1.1.dtd
|
||||
|
||||
\section Example
|
||||
Here an example of what should be passed in the stream of getXmlRepresentationStream:
|
||||
|
||||
\code
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE vstXML PUBLIC "-//Steinberg//DTD VST Remote 1.1//EN" "http://dtd.steinberg.net/VST-Remote-1.1.dtd">
|
||||
<vstXML version="1.0">
|
||||
<plugin classID="341FC5898AAA46A7A506BC0799E882AE" name="Chorus" vendor="Steinberg Media Technologies" />
|
||||
<originator>My name</originator>
|
||||
<date>2010-12-31</date>
|
||||
<comment>This is an example for 4 Cells per Page for the Remote named ProductRemote
|
||||
from company HardwareCompany.</comment>
|
||||
|
||||
<!-- ===================================== -->
|
||||
<representation name="ProductRemote" vendor="HardwareCompany" version="1.0">
|
||||
<page name="Root">
|
||||
<cell>
|
||||
<layer type="knob" parameterID="0">
|
||||
<titleDisplay>
|
||||
<name>Mix dry/wet</name>
|
||||
<name>Mix</name>
|
||||
</titleDisplay>
|
||||
</layer>
|
||||
</cell>
|
||||
<cell>
|
||||
<layer type="display"></layer>
|
||||
</cell>
|
||||
<cell>
|
||||
<layer type="knob" parameterID="3">
|
||||
<titleDisplay>
|
||||
<name>Delay</name>
|
||||
<name>Dly</name>
|
||||
</titleDisplay>
|
||||
</layer>
|
||||
</cell>
|
||||
<cell>
|
||||
<layer type="knob" parameterID="15">
|
||||
<titleDisplay>
|
||||
<name>Spatial</name>
|
||||
<name>Spat</name>
|
||||
</titleDisplay>
|
||||
</layer>
|
||||
</cell>
|
||||
</page>
|
||||
<page name="Page 2">
|
||||
<cell>
|
||||
<layer type="LED" ledStyle="spread" parameterID="2">
|
||||
<titleDisplay>
|
||||
<name>Width +</name>
|
||||
<name>Widt</name>
|
||||
</titleDisplay>
|
||||
</layer>
|
||||
<!--this is the switch for shape A/B-->
|
||||
<layer type="switch" switchStyle="pushIncLooped" parameterID="4"></layer>
|
||||
</cell>
|
||||
<cell>
|
||||
<layer type="display"></layer>
|
||||
</cell>
|
||||
<cell>
|
||||
<layer type="LED" ledStyle="singleDot" parameterID="17">
|
||||
<titleDisplay>
|
||||
<name>Sync Note +</name>
|
||||
<name>Note</name>
|
||||
</titleDisplay>
|
||||
</layer>
|
||||
<!--this is the switch for sync to tempo on /off-->
|
||||
<layer type="switch" switchStyle="pushIncLooped" parameterID="16"></layer>
|
||||
</cell>
|
||||
<cell>
|
||||
<layer type="knob" parameterID="1">
|
||||
<titleDisplay>
|
||||
<name>Rate</name>
|
||||
</titleDisplay>
|
||||
</layer>
|
||||
</cell>
|
||||
</page>
|
||||
</representation>
|
||||
</vstXML>
|
||||
\endcode
|
||||
*/
|
||||
class IXmlRepresentationController : public FUnknown
|
||||
{
|
||||
public:
|
||||
/** Retrieves a stream containing a XmlRepresentation for a wanted representation info.
|
||||
* \note [UI-thread & Initialized] */
|
||||
virtual tresult PLUGIN_API getXmlRepresentationStream (RepresentationInfo& info /*in*/,
|
||||
IBStream* stream /*inout*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IXmlRepresentationController, 0xA81A0471, 0x48C34DC4, 0xAC30C9E1, 0x3C8393D5)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Defines for XML representation Tags and Attributes */
|
||||
|
||||
#define ROOTXML_TAG "vstXML"
|
||||
|
||||
#define COMMENT_TAG "comment"
|
||||
#define CELL_TAG "cell"
|
||||
#define CELLGROUP_TAG "cellGroup"
|
||||
#define CELLGROUPTEMPLATE_TAG "cellGroupTemplate"
|
||||
#define CURVE_TAG "curve"
|
||||
#define CURVETEMPLATE_TAG "curveTemplate"
|
||||
#define DATE_TAG "date"
|
||||
#define LAYER_TAG "layer"
|
||||
#define NAME_TAG "name"
|
||||
#define ORIGINATOR_TAG "originator"
|
||||
#define PAGE_TAG "page"
|
||||
#define PAGETEMPLATE_TAG "pageTemplate"
|
||||
#define PLUGIN_TAG "plugin"
|
||||
#define VALUE_TAG "value"
|
||||
#define VALUEDISPLAY_TAG "valueDisplay"
|
||||
#define VALUELIST_TAG "valueList"
|
||||
#define REPRESENTATION_TAG "representation"
|
||||
#define SEGMENT_TAG "segment"
|
||||
#define SEGMENTLIST_TAG "segmentList"
|
||||
#define TITLEDISPLAY_TAG "titleDisplay"
|
||||
|
||||
#define ATTR_CATEGORY "category"
|
||||
#define ATTR_CLASSID "classID"
|
||||
#define ATTR_ENDPOINT "endPoint"
|
||||
#define ATTR_INDEX "index"
|
||||
#define ATTR_FLAGS "flags"
|
||||
#define ATTR_FUNCTION "function"
|
||||
#define ATTR_HOST "host"
|
||||
#define ATTR_LEDSTYLE "ledStyle"
|
||||
#define ATTR_LENGTH "length"
|
||||
#define ATTR_LINKEDTO "linkedTo"
|
||||
#define ATTR_NAME "name"
|
||||
#define ATTR_ORDER "order"
|
||||
#define ATTR_PAGE "page"
|
||||
#define ATTR_PARAMID "parameterID"
|
||||
#define ATTR_STARTPOINT "startPoint"
|
||||
#define ATTR_STYLE "style"
|
||||
#define ATTR_SWITCHSTYLE "switchStyle"
|
||||
#define ATTR_TEMPLATE "template"
|
||||
#define ATTR_TURNSPERFULLRANGE "turnsPerFullRange"
|
||||
#define ATTR_TYPE "type"
|
||||
#define ATTR_UNITID "unitID"
|
||||
#define ATTR_VARIABLES "variables"
|
||||
#define ATTR_VENDOR "vendor"
|
||||
#define ATTR_VERSION "version"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Defines some predefined Representation Remote Names */
|
||||
#define GENERIC "Generic"
|
||||
#define GENERIC_4_CELLS "Generic 4 Cells"
|
||||
#define GENERIC_8_CELLS "Generic 8 Cells"
|
||||
#define GENERIC_12_CELLS "Generic 12 Cells"
|
||||
#define GENERIC_24_CELLS "Generic 24 Cells"
|
||||
#define GENERIC_N_CELLS "Generic %d Cells"
|
||||
#define QUICK_CONTROL_8_CELLS "Quick Controls 8 Cells"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Layer Types used in a VST XML Representation */
|
||||
namespace LayerType
|
||||
{
|
||||
enum
|
||||
{
|
||||
kKnob = 0, ///< a knob (encoder or not)
|
||||
kPressedKnob, ///< a knob which is used by pressing and turning
|
||||
kSwitchKnob, ///< knob could be pressed to simulate a switch
|
||||
kSwitch, ///< a "on/off" button
|
||||
kLED, ///< LED like VU-meter or display around a knob
|
||||
kLink, ///< indicates that this layer is a folder linked to an another INode (page)
|
||||
kDisplay, ///< only for text display (not really a control)
|
||||
kFader, ///< a fader
|
||||
kEndOfLayerType
|
||||
};
|
||||
|
||||
/** FIDString variant of the LayerType */
|
||||
static const FIDString layerTypeFIDString[] = {
|
||||
"knob"
|
||||
,"pressedKnob"
|
||||
,"switchKnob"
|
||||
,"switch"
|
||||
,"LED"
|
||||
,"link"
|
||||
,"display"
|
||||
,"fader"
|
||||
,nullptr
|
||||
};
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Curve Types used in a VST XML Representation */
|
||||
namespace CurveType
|
||||
{
|
||||
const CString kSegment = "segment"; ///<
|
||||
const CString kValueList = "valueList"; ///<
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Attributes used to defined a Layer in a VST XML Representation */
|
||||
namespace Attributes
|
||||
{
|
||||
const CString kStyle = ATTR_STYLE; ///< string attribute : See AttributesStyle for available string value
|
||||
const CString kLEDStyle = ATTR_LEDSTYLE; ///< string attribute : See AttributesStyle for available string value
|
||||
const CString kSwitchStyle = ATTR_SWITCHSTYLE; ///< string attribute : See AttributesStyle for available string value
|
||||
const CString kKnobTurnsPerFullRange = ATTR_TURNSPERFULLRANGE; ///< float attribute
|
||||
const CString kFunction = ATTR_FUNCTION; ///< string attribute : See AttributesFunction for available string value
|
||||
const CString kFlags = ATTR_FLAGS; ///< string attribute : See AttributesFlags for available string value
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Attributes Function used to defined the function of a Layer in a VST XML Representation */
|
||||
namespace AttributesFunction
|
||||
{
|
||||
/// Global Style
|
||||
const CString kPanPosCenterXFunc = "PanPosCenterX"; ///< Gravity point X-axis (L-R) (for stereo: middle between left and right)
|
||||
const CString kPanPosCenterYFunc = "PanPosCenterY"; ///< Gravity point Y-axis (Front-Rear)
|
||||
const CString kPanPosFrontLeftXFunc = "PanPosFrontLeftX"; ///< Left channel Position in X-axis
|
||||
const CString kPanPosFrontLeftYFunc = "PanPosFrontLeftY"; ///< Left channel Position in Y-axis
|
||||
const CString kPanPosFrontRightXFunc = "PanPosFrontRightX"; ///< Right channel Position in X-axis
|
||||
const CString kPanPosFrontRightYFunc = "PanPosFrontRightY"; ///< Right channel Position in Y-axis
|
||||
const CString kPanRotationFunc = "PanRotation"; ///< Rotation around the Center (gravity point)
|
||||
const CString kPanLawFunc = "PanLaw"; ///< Panning Law
|
||||
const CString kPanMirrorModeFunc = "PanMirrorMode"; ///< Panning Mirror Mode
|
||||
const CString kPanLfeGainFunc = "PanLfeGain"; ///< Panning LFE Gain
|
||||
const CString kGainReductionFunc = "GainReduction"; ///< Gain Reduction for compressor
|
||||
const CString kSoloFunc = "Solo"; ///< Solo
|
||||
const CString kMuteFunc = "Mute"; ///< Mute
|
||||
const CString kVolumeFunc = "Volume"; ///< Volume
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Attributes Style associated a specific Layer Type in a VST XML Representation */
|
||||
namespace AttributesStyle
|
||||
{
|
||||
/// Global Style
|
||||
const CString kInverseStyle = "inverse"; ///< the associated layer should use the inverse value of parameter (1 - x).
|
||||
|
||||
/// LED Style
|
||||
const CString kLEDWrapLeftStyle = "wrapLeft"; ///< |======>----- (the default one if not specified)
|
||||
const CString kLEDWrapRightStyle = "wrapRight"; ///< -------<====|
|
||||
const CString kLEDSpreadStyle = "spread"; ///< ---<==|==>---
|
||||
const CString kLEDBoostCutStyle = "boostCut"; ///< ------|===>--
|
||||
const CString kLEDSingleDotStyle = "singleDot"; ///< --------|----
|
||||
|
||||
/// Switch Style
|
||||
const CString kSwitchPushStyle = "push"; ///< Apply only when pressed, unpressed will reset the value to min.
|
||||
const CString kSwitchPushIncLoopedStyle = "pushIncLooped"; ///< Push will increment the value. When the max is reached it will restart with min.
|
||||
///< The default one if not specified (with 2 states values it is a OnOff switch).
|
||||
const CString kSwitchPushDecLoopedStyle = "pushDecLooped"; ///< Push will decrement the value. When the min is reached it will restart with max.
|
||||
const CString kSwitchPushIncStyle = "pushInc"; ///< Increment after each press (delta depends of the curve).
|
||||
const CString kSwitchPushDecStyle = "pushDec"; ///< Decrement after each press (delta depends of the curve).
|
||||
const CString kSwitchLatchStyle = "latch"; ///< Each push-release will change the value between min and max.
|
||||
///< A timeout between push and release could be used to simulate a push style (if timeout is reached).
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Attributes Flags defining a Layer in a VST XML Representation */
|
||||
namespace AttributesFlags
|
||||
{
|
||||
const CString kHideableFlag = "hideable"; ///< the associated layer marked as hideable allows a remote to hide or make it not usable a parameter when the associated value is inactive
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,88 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Flags : clang-format SMTGSequencer
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Validator
|
||||
// Filename : public.sdk/source/vst/testsuite/iplugprovider.h
|
||||
// Created by : Steinberg, 04/2005
|
||||
// Description : VST Test Suite
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/istringresult.h"
|
||||
#include "pluginterfaces/vst/ivstcomponent.h"
|
||||
#include "pluginterfaces/vst/ivsteditcontroller.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Test Helper.
|
||||
* \ingroup TestClass
|
||||
*
|
||||
* This class provides access to the component and the controller of a plug-in when running a unit
|
||||
* test (see ITest).
|
||||
* You get this interface as the context argument in the ITestFactory::createTests method.
|
||||
*/
|
||||
class ITestPlugProvider : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** get the component of the plug-in.
|
||||
*
|
||||
* The reference count of the component is increased in this function and you need to call
|
||||
* releasePlugIn when done with the component.
|
||||
*/
|
||||
virtual IComponent* PLUGIN_API getComponent () = 0;
|
||||
/** get the controller of the plug-in.
|
||||
*
|
||||
* The reference count of the controller is increased in this function and you need to call
|
||||
* releasePlugIn when done with the controller.
|
||||
*/
|
||||
virtual IEditController* PLUGIN_API getController () = 0;
|
||||
/** release the component and/or controller */
|
||||
virtual tresult PLUGIN_API releasePlugIn (IComponent* component /*in*/,
|
||||
IEditController* controller /*in*/) = 0;
|
||||
/** get the sub categories of the plug-in */
|
||||
virtual tresult PLUGIN_API getSubCategories (IStringResult& result /*out*/) const = 0;
|
||||
/** get the component UID of the plug-in */
|
||||
virtual tresult PLUGIN_API getComponentUID (FUID& uid /*out*/) const = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (ITestPlugProvider, 0x86BE70EE, 0x4E99430F, 0x978F1E6E, 0xD68FB5BA)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Test Helper extension.
|
||||
* \ingroup TestClass
|
||||
*/
|
||||
class ITestPlugProvider2 : public ITestPlugProvider
|
||||
{
|
||||
public:
|
||||
/** get the plugin factory.
|
||||
*
|
||||
* The reference count of the returned factory object is not increased when calling this
|
||||
* function.
|
||||
*/
|
||||
virtual IPluginFactory* PLUGIN_API getPluginFactory () = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (ITestPlugProvider2, 0xC7C75364, 0x7B8343AC, 0xA4495B0A, 0x3E5A46C7)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // Vst
|
||||
} // Steinberg
|
||||
@@ -0,0 +1,307 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/ivstunits.h
|
||||
// Created by : Steinberg, 2005
|
||||
// Description : VST Units Interfaces
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpush.h"
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
class IBStream;
|
||||
//------------------------------------------------------------------------
|
||||
namespace Vst {
|
||||
//------------------------------------------------------------------------
|
||||
/** Special UnitIDs for UnitInfo */
|
||||
static const UnitID kRootUnitId = 0; ///< identifier for the top level unit (root)
|
||||
static const UnitID kNoParentUnitId = -1; ///< used for the root unit which does not have a parent.
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Special ProgramListIDs for UnitInfo */
|
||||
static const ProgramListID kNoProgramListId = -1; ///< no programs are used in the unit.
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Basic Unit Description.
|
||||
\see IUnitInfo
|
||||
*/
|
||||
struct UnitInfo
|
||||
{
|
||||
UnitID id; ///< unit identifier
|
||||
UnitID parentUnitId; ///< identifier of parent unit (kNoParentUnitId: does not apply, this unit is the root)
|
||||
String128 name; ///< name, optional for the root component, required otherwise
|
||||
ProgramListID programListId; ///< id of program list used in unit (kNoProgramListId = no programs used in this unit)
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Basic Program List Description.
|
||||
\see IUnitInfo
|
||||
*/
|
||||
struct ProgramListInfo
|
||||
{
|
||||
ProgramListID id; ///< program list identifier
|
||||
String128 name; ///< name of program list
|
||||
int32 programCount; ///< number of programs in this list
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Special programIndex value for IUnitHandler::notifyProgramListChange */
|
||||
static const int32 kAllProgramInvalid = -1; ///< all program information is invalid
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Host callback for unit support: Vst::IUnitHandler
|
||||
\ingroup vstIHost vst300
|
||||
- [host imp]
|
||||
- [extends IComponentHandler]
|
||||
- [released: 3.0.0]
|
||||
- [optional]
|
||||
|
||||
Host callback interface, used with IUnitInfo.
|
||||
Retrieve via queryInterface from IComponentHandler.
|
||||
|
||||
\see \ref vst3Units, IUnitInfo
|
||||
*/
|
||||
class IUnitHandler : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Notify host when a module is selected in plug-in GUI.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API notifyUnitSelection (UnitID unitId) = 0;
|
||||
|
||||
/** Tell host that the plug-in controller changed a program list (rename, load, PitchName
|
||||
* changes).
|
||||
* \param listId is the specified program list ID to inform.
|
||||
* \param programIndex: when kAllProgramInvalid, all program information is invalid, otherwise
|
||||
* only the program of given index.
|
||||
*
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API notifyProgramListChange (ProgramListID listId,
|
||||
int32 programIndex) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IUnitHandler, 0x4B5147F8, 0x4654486B, 0x8DAB30BA, 0x163A3C56)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Host callback for extended unit support: Vst::IUnitHandler2
|
||||
\ingroup vstIHost vst365
|
||||
- [host imp]
|
||||
- [extends IUnitHandler]
|
||||
- [released: 3.6.5]
|
||||
- [optional]
|
||||
|
||||
Host callback interface, used with IUnitInfo.
|
||||
Retrieve via queryInterface from IComponentHandler.
|
||||
|
||||
The plug-in has the possibility to inform the host with notifyUnitByBusChange that something has
|
||||
changed in the bus - unit assignment, the host then has to recall IUnitInfo::getUnitByBus in order
|
||||
to get the new relations between busses and unit.
|
||||
|
||||
\see \ref vst3Units, IUnitHandler
|
||||
*/
|
||||
class IUnitHandler2 : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Tell host that assignment Unit-Bus defined by IUnitInfo::getUnitByBus has changed.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API notifyUnitByBusChange () = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IUnitHandler2, 0xF89F8CDF, 0x699E4BA5, 0x96AAC9A4, 0x81452B01)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Edit controller extension to describe the plug-in structure: Vst::IUnitInfo
|
||||
\ingroup vstIPlug vst300
|
||||
- [plug imp]
|
||||
- [extends IEditController]
|
||||
- [released: 3.0.0]
|
||||
- [optional]
|
||||
|
||||
IUnitInfo describes the internal structure of the plug-in.
|
||||
- The root unit is the component itself, so getUnitCount must return 1 at least.
|
||||
- The root unit id has to be 0 (kRootUnitId).
|
||||
- Each unit can reference one program list - this reference must not change.
|
||||
- Each unit, using a program list, references one program of the list.
|
||||
|
||||
\see \ref vst3Units, IUnitHandler
|
||||
*/
|
||||
class IUnitInfo : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Returns the flat count of units.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual int32 PLUGIN_API getUnitCount () = 0;
|
||||
|
||||
/** Gets UnitInfo for a given index in the flat list of unit.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getUnitInfo (int32 unitIndex, UnitInfo& info /*inout*/) = 0;
|
||||
|
||||
//--- Component intern program structure ----------------
|
||||
/** Gets the count of Program List.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual int32 PLUGIN_API getProgramListCount () = 0;
|
||||
|
||||
/** Gets for a given index the Program List Info.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getProgramListInfo (int32 listIndex,
|
||||
ProgramListInfo& info /*inout*/) = 0;
|
||||
|
||||
/** Gets for a given program list ID and program index its program name.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getProgramName (ProgramListID listId, int32 programIndex,
|
||||
String128 name /*inout*/) = 0;
|
||||
|
||||
/** Gets for a given program list ID, program index and attributeId the associated attribute
|
||||
* value.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getProgramInfo (ProgramListID listId, int32 programIndex,
|
||||
CString attributeId /*in*/,
|
||||
String128 attributeValue /*inout*/) = 0;
|
||||
|
||||
/** Returns kResultTrue if the given program index of a given program list ID supports
|
||||
* PitchNames.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API hasProgramPitchNames (ProgramListID listId, int32 programIndex) = 0;
|
||||
|
||||
/** Gets the PitchName for a given program list ID, program index and pitch.
|
||||
* If PitchNames are changed the plug-in should inform the host with
|
||||
* IUnitHandler::notifyProgramListChange.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getProgramPitchName (ProgramListID listId, int32 programIndex,
|
||||
int16 midiPitch, String128 name /*inout*/) = 0;
|
||||
|
||||
//--- units selection --------------------
|
||||
/** Gets the current selected unit.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual UnitID PLUGIN_API getSelectedUnit () = 0;
|
||||
|
||||
/** Sets a new selected unit.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API selectUnit (UnitID unitId) = 0;
|
||||
|
||||
/** Gets the according unit if there is an unambiguous relation between a channel or a bus and a
|
||||
* unit. This method mainly is intended to find out which unit is related to a given MIDI input
|
||||
* channel.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getUnitByBus (MediaType type, BusDirection dir, int32 busIndex,
|
||||
int32 channel, UnitID& unitId /*inout*/) = 0;
|
||||
|
||||
/** Receives a preset data stream.
|
||||
* - If the component supports program list data (IProgramListData), the destination of the data
|
||||
* stream is the program specified by list-Id and program index (first and second parameter)
|
||||
* - If the component supports unit data (IUnitData), the destination is the unit specified by
|
||||
* the first parameter - in this case parameter programIndex is < 0).
|
||||
*
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API setUnitProgramData (int32 listOrUnitId, int32 programIndex,
|
||||
IBStream* data /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IUnitInfo, 0x3D4BD6B5, 0x913A4FD2, 0xA886E768, 0xA5EB92C1)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Component extension to access program list data: Vst::IProgramListData
|
||||
\ingroup vstIPlug vst300
|
||||
- [plug imp]
|
||||
- [extends IComponent]
|
||||
- [released: 3.0.0]
|
||||
- [optional]
|
||||
|
||||
A component can support program list data via this interface or/and
|
||||
unit preset data (IUnitData).
|
||||
|
||||
\see IUnitData, \ref vst3MultitimbralPrograms
|
||||
*/
|
||||
class IProgramListData : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Returns kResultTrue if the given Program List ID supports Program Data.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API programDataSupported (ProgramListID listId) = 0;
|
||||
|
||||
/** Gets for a given program list ID and program index the program Data.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getProgramData (ProgramListID listId, int32 programIndex,
|
||||
IBStream* data /*inout*/) = 0;
|
||||
|
||||
/** Sets for a given program list ID and program index a program Data.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API setProgramData (ProgramListID listId, int32 programIndex,
|
||||
IBStream* data /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IProgramListData, 0x8683B01F, 0x7B354F70, 0xA2651DEC, 0x353AF4FF)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Component extension to access unit data: Vst::IUnitData
|
||||
\ingroup vstIPlug vst300
|
||||
- [plug imp]
|
||||
- [extends IComponent]
|
||||
- [released: 3.0.0]
|
||||
- [optional]
|
||||
|
||||
A component can support unit preset data via this interface or
|
||||
program list data (IProgramListData).
|
||||
|
||||
\see \ref vst3ProgramLists
|
||||
*/
|
||||
class IUnitData : public FUnknown
|
||||
{
|
||||
public:
|
||||
//------------------------------------------------------------------------
|
||||
/** Returns kResultTrue if the specified unit supports export and import of preset data.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API unitDataSupported (UnitID unitID) = 0;
|
||||
|
||||
/** Gets the preset data for the specified unit.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API getUnitData (UnitID unitId, IBStream* data /*inout*/) = 0;
|
||||
|
||||
/** Sets the preset data for the specified unit.
|
||||
* \note [UI-thread & (Initialized | Connected)] */
|
||||
virtual tresult PLUGIN_API setUnitData (UnitID unitId, IBStream* data /*in*/) = 0;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const FUID iid;
|
||||
};
|
||||
|
||||
DECLARE_CLASS_IID (IUnitData, 0x6C389611, 0xD391455D, 0xB870B833, 0x94A0EFDD)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#include "pluginterfaces/base/falignpop.h"
|
||||
//------------------------------------------------------------------------
|
||||
@@ -0,0 +1,440 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/vstpresetkeys.h
|
||||
// Created by : Steinberg, 2006
|
||||
// Description : VST Preset Keys
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/vst/vsttypes.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
//------------------------------------------------------------------------
|
||||
/** Predefined Preset Attributes */
|
||||
//------------------------------------------------------------------------
|
||||
namespace PresetAttributes
|
||||
{
|
||||
/**
|
||||
* \defgroup presetAttributes Predefined Preset Attributes
|
||||
*/
|
||||
/**@{*/
|
||||
const CString kPlugInName = "PlugInName"; ///< plug-in name
|
||||
const CString kPlugInCategory = "PlugInCategory"; ///< eg. "Fx|Dynamics", "Instrument", "Instrument|Synth"
|
||||
|
||||
const CString kInstrument = "MusicalInstrument";///< eg. instrument group (like 'Piano' or 'Piano|A. Piano')
|
||||
const CString kStyle = "MusicalStyle"; ///< eg. 'Pop', 'Jazz', 'Classic'
|
||||
const CString kCharacter = "MusicalCharacter"; ///< eg. instrument nature (like 'Soft' 'Dry' 'Acoustic')
|
||||
|
||||
const CString kStateType = "StateType"; ///< Type of the given state see \ref StateType : Project / Default Preset or Normal Preset
|
||||
const CString kFilePathStringType = "FilePathString"; ///< Full file path string (if available) where the preset comes from (be sure to use a bigger string when asking for it (with 1024 characters))
|
||||
const CString kName = "Name"; ///< name of the preset
|
||||
const CString kFileName = "FileName"; ///< filename of the preset (including extension)
|
||||
/**@}*/
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Predefined StateType used for Key kStateType */
|
||||
//------------------------------------------------------------------------
|
||||
namespace StateType {
|
||||
/**
|
||||
* \defgroup stateType Context of State Restoration
|
||||
* used for PresetAttributes::kStateType in IStreamAttributes
|
||||
*/
|
||||
/**@{*/
|
||||
/** the state is restored from a project loading or it is saved in a project */
|
||||
const CString kProject = "Project";
|
||||
|
||||
/** the state is restored from a preset (marked as default) or the host wants to store a default
|
||||
* state of the plug-in */
|
||||
const CString kDefault = "Default";
|
||||
|
||||
/** the state is restored from a track preset */
|
||||
const CString kTrackPreset = "TrackPreset";
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/**@}*/
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Predefined Musical Instrument */
|
||||
//------------------------------------------------------------------------
|
||||
namespace MusicalInstrument
|
||||
{
|
||||
/**
|
||||
* \defgroup musicalInstrument Predefined Musical Instrument
|
||||
*/
|
||||
/**@{*/
|
||||
const CString kAccordion = "Accordion";
|
||||
const CString kAccordionAccordion = "Accordion|Accordion";
|
||||
const CString kAccordionHarmonica = "Accordion|Harmonica";
|
||||
const CString kAccordionOther = "Accordion|Other";
|
||||
|
||||
const CString kBass = "Bass";
|
||||
const CString kBassABass = "Bass|A. Bass";
|
||||
const CString kBassEBass = "Bass|E. Bass";
|
||||
const CString kBassSynthBass = "Bass|Synth Bass";
|
||||
const CString kBassOther = "Bass|Other";
|
||||
|
||||
const CString kBrass = "Brass";
|
||||
const CString kBrassFrenchHorn = "Brass|French Horn";
|
||||
const CString kBrassTrumpet = "Brass|Trumpet";
|
||||
const CString kBrassTrombone = "Brass|Trombone";
|
||||
const CString kBrassTuba = "Brass|Tuba";
|
||||
const CString kBrassSection = "Brass|Section";
|
||||
const CString kBrassSynth = "Brass|Synth";
|
||||
const CString kBrassOther = "Brass|Other";
|
||||
|
||||
const CString kChromaticPerc = "Chromatic Perc";
|
||||
const CString kChromaticPercBell = "Chromatic Perc|Bell";
|
||||
const CString kChromaticPercMallett = "Chromatic Perc|Mallett";
|
||||
const CString kChromaticPercWood = "Chromatic Perc|Wood";
|
||||
const CString kChromaticPercPercussion = "Chromatic Perc|Percussion";
|
||||
const CString kChromaticPercTimpani = "Chromatic Perc|Timpani";
|
||||
const CString kChromaticPercOther = "Chromatic Perc|Other";
|
||||
|
||||
const CString kDrumPerc = "Drum&Perc";
|
||||
const CString kDrumPercDrumsetGM = "Drum&Perc|Drumset GM";
|
||||
const CString kDrumPercDrumset = "Drum&Perc|Drumset";
|
||||
const CString kDrumPercDrumMenues = "Drum&Perc|Drum Menues";
|
||||
const CString kDrumPercBeats = "Drum&Perc|Beats";
|
||||
const CString kDrumPercPercussion = "Drum&Perc|Percussion";
|
||||
const CString kDrumPercKickDrum = "Drum&Perc|Kick Drum";
|
||||
const CString kDrumPercSnareDrum = "Drum&Perc|Snare Drum";
|
||||
const CString kDrumPercToms = "Drum&Perc|Toms";
|
||||
const CString kDrumPercHiHats = "Drum&Perc|HiHats";
|
||||
const CString kDrumPercCymbals = "Drum&Perc|Cymbals";
|
||||
const CString kDrumPercOther = "Drum&Perc|Other";
|
||||
|
||||
const CString kEthnic = "Ethnic";
|
||||
const CString kEthnicAsian = "Ethnic|Asian";
|
||||
const CString kEthnicAfrican = "Ethnic|African";
|
||||
const CString kEthnicEuropean = "Ethnic|European";
|
||||
const CString kEthnicLatin = "Ethnic|Latin";
|
||||
const CString kEthnicAmerican = "Ethnic|American";
|
||||
const CString kEthnicAlien = "Ethnic|Alien";
|
||||
const CString kEthnicOther = "Ethnic|Other";
|
||||
|
||||
const CString kGuitar = "Guitar/Plucked";
|
||||
const CString kGuitarAGuitar = "Guitar/Plucked|A. Guitar";
|
||||
const CString kGuitarEGuitar = "Guitar/Plucked|E. Guitar";
|
||||
const CString kGuitarHarp = "Guitar/Plucked|Harp";
|
||||
const CString kGuitarEthnic = "Guitar/Plucked|Ethnic";
|
||||
const CString kGuitarOther = "Guitar/Plucked|Other";
|
||||
|
||||
const CString kKeyboard = "Keyboard";
|
||||
const CString kKeyboardClavi = "Keyboard|Clavi";
|
||||
const CString kKeyboardEPiano = "Keyboard|E. Piano";
|
||||
const CString kKeyboardHarpsichord = "Keyboard|Harpsichord";
|
||||
const CString kKeyboardOther = "Keyboard|Other";
|
||||
|
||||
const CString kMusicalFX = "Musical FX";
|
||||
const CString kMusicalFXHitsStabs = "Musical FX|Hits&Stabs";
|
||||
const CString kMusicalFXMotion = "Musical FX|Motion";
|
||||
const CString kMusicalFXSweeps = "Musical FX|Sweeps";
|
||||
const CString kMusicalFXBeepsBlips = "Musical FX|Beeps&Blips";
|
||||
const CString kMusicalFXScratches = "Musical FX|Scratches";
|
||||
const CString kMusicalFXOther = "Musical FX|Other";
|
||||
|
||||
const CString kOrgan = "Organ";
|
||||
const CString kOrganElectric = "Organ|Electric";
|
||||
const CString kOrganPipe = "Organ|Pipe";
|
||||
const CString kOrganOther = "Organ|Other";
|
||||
|
||||
const CString kPiano = "Piano";
|
||||
const CString kPianoAPiano = "Piano|A. Piano";
|
||||
const CString kPianoEGrand = "Piano|E. Grand";
|
||||
const CString kPianoOther = "Piano|Other";
|
||||
|
||||
const CString kSoundFX = "Sound FX";
|
||||
const CString kSoundFXNature = "Sound FX|Nature";
|
||||
const CString kSoundFXMechanical = "Sound FX|Mechanical";
|
||||
const CString kSoundFXSynthetic = "Sound FX|Synthetic";
|
||||
const CString kSoundFXOther = "Sound FX|Other";
|
||||
|
||||
const CString kStrings = "Strings";
|
||||
const CString kStringsViolin = "Strings|Violin";
|
||||
const CString kStringsViola = "Strings|Viola";
|
||||
const CString kStringsCello = "Strings|Cello";
|
||||
const CString kStringsBass = "Strings|Bass";
|
||||
const CString kStringsSection = "Strings|Section";
|
||||
const CString kStringsSynth = "Strings|Synth";
|
||||
const CString kStringsOther = "Strings|Other";
|
||||
|
||||
const CString kSynthLead = "Synth Lead";
|
||||
const CString kSynthLeadAnalog = "Synth Lead|Analog";
|
||||
const CString kSynthLeadDigital = "Synth Lead|Digital";
|
||||
const CString kSynthLeadArpeggio = "Synth Lead|Arpeggio";
|
||||
const CString kSynthLeadOther = "Synth Lead|Other";
|
||||
|
||||
const CString kSynthPad = "Synth Pad";
|
||||
const CString kSynthPadSynthChoir = "Synth Pad|Synth Choir";
|
||||
const CString kSynthPadAnalog = "Synth Pad|Analog";
|
||||
const CString kSynthPadDigital = "Synth Pad|Digital";
|
||||
const CString kSynthPadMotion = "Synth Pad|Motion";
|
||||
const CString kSynthPadOther = "Synth Pad|Other";
|
||||
|
||||
const CString kSynthComp = "Synth Comp";
|
||||
const CString kSynthCompAnalog = "Synth Comp|Analog";
|
||||
const CString kSynthCompDigital = "Synth Comp|Digital";
|
||||
const CString kSynthCompOther = "Synth Comp|Other";
|
||||
|
||||
const CString kVocal = "Vocal";
|
||||
const CString kVocalLeadVocal = "Vocal|Lead Vocal";
|
||||
const CString kVocalAdlibs = "Vocal|Adlibs";
|
||||
const CString kVocalChoir = "Vocal|Choir";
|
||||
const CString kVocalSolo = "Vocal|Solo";
|
||||
const CString kVocalFX = "Vocal|FX";
|
||||
const CString kVocalSpoken = "Vocal|Spoken";
|
||||
const CString kVocalOther = "Vocal|Other";
|
||||
|
||||
const CString kWoodwinds = "Woodwinds";
|
||||
const CString kWoodwindsEthnic = "Woodwinds|Ethnic";
|
||||
const CString kWoodwindsFlute = "Woodwinds|Flute";
|
||||
const CString kWoodwindsOboe = "Woodwinds|Oboe";
|
||||
const CString kWoodwindsEnglHorn = "Woodwinds|Engl. Horn";
|
||||
const CString kWoodwindsClarinet = "Woodwinds|Clarinet";
|
||||
const CString kWoodwindsSaxophone = "Woodwinds|Saxophone";
|
||||
const CString kWoodwindsBassoon = "Woodwinds|Bassoon";
|
||||
const CString kWoodwindsOther = "Woodwinds|Other";
|
||||
/**@}*/
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Predefined Musical Style */
|
||||
namespace MusicalStyle
|
||||
{
|
||||
/**
|
||||
* \defgroup musicalStyle Predefined Musical Style
|
||||
*/
|
||||
/**@{*/
|
||||
const CString kAlternativeIndie = "Alternative/Indie";
|
||||
const CString kAlternativeIndieGothRock = "Alternative/Indie|Goth Rock";
|
||||
const CString kAlternativeIndieGrunge = "Alternative/Indie|Grunge";
|
||||
const CString kAlternativeIndieNewWave = "Alternative/Indie|New Wave";
|
||||
const CString kAlternativeIndiePunk = "Alternative/Indie|Punk";
|
||||
const CString kAlternativeIndieCollegeRock = "Alternative/Indie|College Rock";
|
||||
const CString kAlternativeIndieDarkWave = "Alternative/Indie|Dark Wave";
|
||||
const CString kAlternativeIndieHardcore = "Alternative/Indie|Hardcore";
|
||||
|
||||
const CString kAmbientChillOut = "Ambient/ChillOut";
|
||||
const CString kAmbientChillOutNewAgeMeditation = "Ambient/ChillOut|New Age/Meditation";
|
||||
const CString kAmbientChillOutDarkAmbient = "Ambient/ChillOut|Dark Ambient";
|
||||
const CString kAmbientChillOutDowntempo = "Ambient/ChillOut|Downtempo";
|
||||
const CString kAmbientChillOutLounge = "Ambient/ChillOut|Lounge";
|
||||
|
||||
const CString kBlues = "Blues";
|
||||
const CString kBluesAcousticBlues = "Blues|Acoustic Blues";
|
||||
const CString kBluesCountryBlues = "Blues|Country Blues";
|
||||
const CString kBluesElectricBlues = "Blues|Electric Blues";
|
||||
const CString kBluesChicagoBlues = "Blues|Chicago Blues";
|
||||
|
||||
const CString kClassical = "Classical";
|
||||
const CString kClassicalBaroque = "Classical|Baroque";
|
||||
const CString kClassicalChamberMusic = "Classical|Chamber Music";
|
||||
const CString kClassicalMedieval = "Classical|Medieval";
|
||||
const CString kClassicalModernComposition = "Classical|Modern Composition";
|
||||
const CString kClassicalOpera = "Classical|Opera";
|
||||
const CString kClassicalGregorian = "Classical|Gregorian";
|
||||
const CString kClassicalRenaissance = "Classical|Renaissance";
|
||||
const CString kClassicalClassic = "Classical|Classic";
|
||||
const CString kClassicalRomantic = "Classical|Romantic";
|
||||
const CString kClassicalSoundtrack = "Classical|Soundtrack";
|
||||
|
||||
const CString kCountry = "Country";
|
||||
const CString kCountryCountryWestern = "Country|Country/Western";
|
||||
const CString kCountryHonkyTonk = "Country|Honky Tonk";
|
||||
const CString kCountryUrbanCowboy = "Country|Urban Cowboy";
|
||||
const CString kCountryBluegrass = "Country|Bluegrass";
|
||||
const CString kCountryAmericana = "Country|Americana";
|
||||
const CString kCountrySquaredance = "Country|Squaredance";
|
||||
const CString kCountryNorthAmericanFolk = "Country|North American Folk";
|
||||
|
||||
const CString kElectronicaDance = "Electronica/Dance";
|
||||
const CString kElectronicaDanceMinimal = "Electronica/Dance|Minimal";
|
||||
const CString kElectronicaDanceClassicHouse = "Electronica/Dance|Classic House";
|
||||
const CString kElectronicaDanceElektroHouse = "Electronica/Dance|Elektro House";
|
||||
const CString kElectronicaDanceFunkyHouse = "Electronica/Dance|Funky House";
|
||||
const CString kElectronicaDanceIndustrial = "Electronica/Dance|Industrial";
|
||||
const CString kElectronicaDanceElectronicBodyMusic = "Electronica/Dance|Electronic Body Music";
|
||||
const CString kElectronicaDanceTripHop = "Electronica/Dance|Trip Hop";
|
||||
const CString kElectronicaDanceTechno = "Electronica/Dance|Techno";
|
||||
const CString kElectronicaDanceDrumNBassJungle = "Electronica/Dance|Drum'n'Bass/Jungle";
|
||||
const CString kElectronicaDanceElektro = "Electronica/Dance|Elektro";
|
||||
const CString kElectronicaDanceTrance = "Electronica/Dance|Trance";
|
||||
const CString kElectronicaDanceDub = "Electronica/Dance|Dub";
|
||||
const CString kElectronicaDanceBigBeats = "Electronica/Dance|Big Beats";
|
||||
|
||||
const CString kExperimental = "Experimental";
|
||||
const CString kExperimentalNewMusic = "Experimental|New Music";
|
||||
const CString kExperimentalFreeImprovisation = "Experimental|Free Improvisation";
|
||||
const CString kExperimentalElectronicArtMusic = "Experimental|Electronic Art Music";
|
||||
const CString kExperimentalNoise = "Experimental|Noise";
|
||||
|
||||
const CString kJazz = "Jazz";
|
||||
const CString kJazzNewOrleansJazz = "Jazz|New Orleans Jazz";
|
||||
const CString kJazzTraditionalJazz = "Jazz|Traditional Jazz";
|
||||
const CString kJazzOldtimeJazzDixiland = "Jazz|Oldtime Jazz/Dixiland";
|
||||
const CString kJazzFusion = "Jazz|Fusion";
|
||||
const CString kJazzAvantgarde = "Jazz|Avantgarde";
|
||||
const CString kJazzLatinJazz = "Jazz|Latin Jazz";
|
||||
const CString kJazzFreeJazz = "Jazz|Free Jazz";
|
||||
const CString kJazzRagtime = "Jazz|Ragtime";
|
||||
|
||||
const CString kPop = "Pop";
|
||||
const CString kPopBritpop = "Pop|Britpop";
|
||||
const CString kPopRock = "Pop|Pop/Rock";
|
||||
const CString kPopTeenPop = "Pop|Teen Pop";
|
||||
const CString kPopChartDance = "Pop|Chart Dance";
|
||||
const CString kPop80sPop = "Pop|80's Pop";
|
||||
const CString kPopDancehall = "Pop|Dancehall";
|
||||
const CString kPopDisco = "Pop|Disco";
|
||||
|
||||
const CString kRockMetal = "Rock/Metal";
|
||||
const CString kRockMetalBluesRock = "Rock/Metal|Blues Rock";
|
||||
const CString kRockMetalClassicRock = "Rock/Metal|Classic Rock";
|
||||
const CString kRockMetalHardRock = "Rock/Metal|Hard Rock";
|
||||
const CString kRockMetalRockRoll = "Rock/Metal|Rock & Roll";
|
||||
const CString kRockMetalSingerSongwriter = "Rock/Metal|Singer/Songwriter";
|
||||
const CString kRockMetalHeavyMetal = "Rock/Metal|Heavy Metal";
|
||||
const CString kRockMetalDeathBlackMetal = "Rock/Metal|Death/Black Metal";
|
||||
const CString kRockMetalNuMetal = "Rock/Metal|NuMetal";
|
||||
const CString kRockMetalReggae = "Rock/Metal|Reggae";
|
||||
const CString kRockMetalBallad = "Rock/Metal|Ballad";
|
||||
const CString kRockMetalAlternativeRock = "Rock/Metal|Alternative Rock";
|
||||
const CString kRockMetalRockabilly = "Rock/Metal|Rockabilly";
|
||||
const CString kRockMetalThrashMetal = "Rock/Metal|Thrash Metal";
|
||||
const CString kRockMetalProgressiveRock = "Rock/Metal|Progressive Rock";
|
||||
|
||||
const CString kUrbanHipHopRB = "Urban (Hip-Hop / R&B)";
|
||||
const CString kUrbanHipHopRBClassic = "Urban (Hip-Hop / R&B)|Classic R&B";
|
||||
const CString kUrbanHipHopRBModern = "Urban (Hip-Hop / R&B)|Modern R&B";
|
||||
const CString kUrbanHipHopRBPop = "Urban (Hip-Hop / R&B)|R&B Pop";
|
||||
const CString kUrbanHipHopRBWestCoastHipHop = "Urban (Hip-Hop / R&B)|WestCoast Hip-Hop";
|
||||
const CString kUrbanHipHopRBEastCoastHipHop = "Urban (Hip-Hop / R&B)|EastCoast Hip-Hop";
|
||||
const CString kUrbanHipHopRBRapHipHop = "Urban (Hip-Hop / R&B)|Rap/Hip Hop";
|
||||
const CString kUrbanHipHopRBSoul = "Urban (Hip-Hop / R&B)|Soul";
|
||||
const CString kUrbanHipHopRBFunk = "Urban (Hip-Hop / R&B)|Funk";
|
||||
|
||||
const CString kWorldEthnic = "World/Ethnic";
|
||||
const CString kWorldEthnicAfrica = "World/Ethnic|Africa";
|
||||
const CString kWorldEthnicAsia = "World/Ethnic|Asia";
|
||||
const CString kWorldEthnicCeltic = "World/Ethnic|Celtic";
|
||||
const CString kWorldEthnicEurope = "World/Ethnic|Europe";
|
||||
const CString kWorldEthnicKlezmer = "World/Ethnic|Klezmer";
|
||||
const CString kWorldEthnicScandinavia = "World/Ethnic|Scandinavia";
|
||||
const CString kWorldEthnicEasternEurope = "World/Ethnic|Eastern Europe";
|
||||
const CString kWorldEthnicIndiaOriental = "World/Ethnic|India/Oriental";
|
||||
const CString kWorldEthnicNorthAmerica = "World/Ethnic|North America";
|
||||
const CString kWorldEthnicSouthAmerica = "World/Ethnic|South America";
|
||||
const CString kWorldEthnicAustralia = "World/Ethnic|Australia";
|
||||
/**@}*/
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** Predefined Musical Character */
|
||||
namespace MusicalCharacter
|
||||
{
|
||||
/**
|
||||
\defgroup musicalCharacter Predefined Musical Character */
|
||||
/**@{*/
|
||||
//----TYPE------------------------------------
|
||||
const CString kMono = "Mono";
|
||||
const CString kPoly = "Poly";
|
||||
|
||||
const CString kSplit = "Split";
|
||||
const CString kLayer = "Layer";
|
||||
|
||||
const CString kGlide = "Glide";
|
||||
const CString kGlissando = "Glissando";
|
||||
|
||||
const CString kMajor = "Major";
|
||||
const CString kMinor = "Minor";
|
||||
|
||||
const CString kSingle = "Single";
|
||||
const CString kEnsemble = "Ensemble";
|
||||
|
||||
const CString kAcoustic = "Acoustic";
|
||||
const CString kElectric = "Electric";
|
||||
|
||||
const CString kAnalog = "Analog";
|
||||
const CString kDigital = "Digital";
|
||||
|
||||
const CString kVintage = "Vintage";
|
||||
const CString kModern = "Modern";
|
||||
|
||||
const CString kOld = "Old";
|
||||
const CString kNew = "New";
|
||||
|
||||
//----TONE------------------------------------
|
||||
const CString kClean = "Clean";
|
||||
const CString kDistorted = "Distorted";
|
||||
|
||||
const CString kDry = "Dry";
|
||||
const CString kProcessed = "Processed";
|
||||
|
||||
const CString kHarmonic = "Harmonic";
|
||||
const CString kDissonant = "Dissonant";
|
||||
|
||||
const CString kClear = "Clear";
|
||||
const CString kNoisy = "Noisy";
|
||||
|
||||
const CString kThin = "Thin";
|
||||
const CString kRich = "Rich";
|
||||
|
||||
const CString kDark = "Dark";
|
||||
const CString kBright = "Bright";
|
||||
|
||||
const CString kCold = "Cold";
|
||||
const CString kWarm = "Warm";
|
||||
|
||||
const CString kMetallic = "Metallic";
|
||||
const CString kWooden = "Wooden";
|
||||
|
||||
const CString kGlass = "Glass";
|
||||
const CString kPlastic = "Plastic";
|
||||
|
||||
//----ENVELOPE------------------------------------
|
||||
const CString kPercussive = "Percussive";
|
||||
const CString kSoft = "Soft";
|
||||
|
||||
const CString kFast = "Fast";
|
||||
const CString kSlow = "Slow";
|
||||
|
||||
const CString kShort = "Short";
|
||||
const CString kLong = "Long";
|
||||
|
||||
const CString kAttack = "Attack";
|
||||
const CString kRelease = "Release";
|
||||
|
||||
const CString kDecay = "Decay";
|
||||
const CString kSustain = "Sustain";
|
||||
|
||||
const CString kFastAttack = "Fast Attack";
|
||||
const CString kSlowAttack = "Slow Attack";
|
||||
|
||||
const CString kShortRelease = "Short Release";
|
||||
const CString kLongRelease = "Long Release";
|
||||
|
||||
const CString kStatic = "Static";
|
||||
const CString kMoving = "Moving";
|
||||
|
||||
const CString kLoop = "Loop";
|
||||
const CString kOneShot = "One Shot";
|
||||
/**@}*/
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/vstpshpack4.h
|
||||
// Created by : Steinberg, 05/2010
|
||||
// Description : This file turns 4 Bytes packing of structures on. The file
|
||||
// pluginterfaces/base/falignpop.h is the complement to this file.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
//----------------------------------------------------------------------------------------------
|
||||
#if defined __BORLANDC__
|
||||
#pragma -a4
|
||||
#else
|
||||
#if (_MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED)
|
||||
#pragma warning(disable:4103)
|
||||
#endif
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(4)
|
||||
#endif
|
||||
+1367
File diff suppressed because it is too large
Load Diff
+166
@@ -0,0 +1,166 @@
|
||||
//------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Interfaces
|
||||
// Filename : pluginterfaces/vst/vsttypes.h
|
||||
// Created by : Steinberg, 12/2005
|
||||
// Description : Common Defines
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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/fstrdefs.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
namespace Steinberg {
|
||||
namespace Vst {
|
||||
//------------------------------------------------------------------------
|
||||
/** VST 3 SDK Version */
|
||||
#ifndef kVstVersionString
|
||||
#define kVstVersionString "VST 3.8.0" ///< SDK version for PClassInfo2
|
||||
#endif
|
||||
|
||||
#define kVstVersionMajor 3
|
||||
#define kVstVersionMinor 8
|
||||
#define kVstVersionSub 0
|
||||
|
||||
#define VST_VERSION ((kVstVersionMajor << 16) | (kVstVersionMinor << 8) | kVstVersionSub)
|
||||
|
||||
// Versions History which allows to write such code:
|
||||
// #if VST_VERSION >= VST_3_6_5_VERSION
|
||||
#define VST_3_8_0_VERSION 0x030800
|
||||
#define VST_3_7_14_VERSION 0x03070E
|
||||
#define VST_3_7_13_VERSION 0x03070D
|
||||
#define VST_3_7_12_VERSION 0x03070C
|
||||
#define VST_3_7_11_VERSION 0x03070B
|
||||
#define VST_3_7_10_VERSION 0x03070A
|
||||
#define VST_3_7_9_VERSION 0x030709
|
||||
#define VST_3_7_8_VERSION 0x030708
|
||||
#define VST_3_7_7_VERSION 0x030707
|
||||
#define VST_3_7_6_VERSION 0x030706
|
||||
#define VST_3_7_5_VERSION 0x030705
|
||||
#define VST_3_7_4_VERSION 0x030704
|
||||
#define VST_3_7_3_VERSION 0x030703
|
||||
#define VST_3_7_2_VERSION 0x030702
|
||||
#define VST_3_7_1_VERSION 0x030701
|
||||
#define VST_3_7_0_VERSION 0x030700
|
||||
#define VST_3_6_14_VERSION 0x03060E
|
||||
#define VST_3_6_13_VERSION 0x03060D
|
||||
#define VST_3_6_12_VERSION 0x03060C
|
||||
#define VST_3_6_11_VERSION 0x03060B
|
||||
#define VST_3_6_10_VERSION 0x03060A
|
||||
#define VST_3_6_9_VERSION 0x030609
|
||||
#define VST_3_6_8_VERSION 0x030608
|
||||
#define VST_3_6_7_VERSION 0x030607
|
||||
#define VST_3_6_6_VERSION 0x030606
|
||||
#define VST_3_6_5_VERSION 0x030605
|
||||
#define VST_3_6_0_VERSION 0x030600
|
||||
#define VST_3_5_0_VERSION 0x030500
|
||||
#define VST_3_1_0_VERSION 0x030100
|
||||
#define VST_3_0_0_VERSION 0x030000
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
/** \defgroup vst3typedef VST 3 Data Types
|
||||
* Data Types defined by VST 3
|
||||
*/
|
||||
/**@{*/
|
||||
//------------------------------------------------------------------------
|
||||
// String Types
|
||||
//------------------------------------------------------------------------
|
||||
typedef char16 TChar; ///< UTF-16 character
|
||||
typedef TChar String128[128]; ///< 128 character UTF-16 string
|
||||
typedef const char8* CString; ///< C-String
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// General
|
||||
//------------------------------------------------------------------------
|
||||
typedef int32 MediaType; ///< media type (audio/event)
|
||||
typedef int32 BusDirection; ///< bus direction (in/out)
|
||||
typedef int32 BusType; ///< bus type (main/aux)
|
||||
typedef int32 IoMode; ///< I/O mode (see \ref vst3IoMode)
|
||||
typedef int32 UnitID; ///< unit identifier
|
||||
|
||||
typedef double ParamValue; ///< parameter value type: normalized value => [0.0, 1.0]
|
||||
typedef uint32 ParamID; ///< parameter identifier: value in range [0, 0x7FFFFFFF].
|
||||
/// The range [0x80000000, 0xFFFFFFFF], is reserved for host application.
|
||||
|
||||
typedef int32 ProgramListID; ///< program list identifier
|
||||
typedef int16 CtrlNumber; ///< MIDI controller number (see \ref ControllerNumbers for allowed values)
|
||||
|
||||
typedef double TQuarterNotes; ///< time expressed in quarter notes
|
||||
typedef int64 TSamples; ///< time expressed in audio samples
|
||||
|
||||
typedef uint32 ColorSpec; ///< color defining by 4 component ARGB value (Alpha/Red/Green/Blue)
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static const ParamID kNoParamId = 0xFFFFFFFF; ///< default for uninitialized parameter ID
|
||||
static const ParamID kMinParamId = 0; ///< value min for a parameter ID
|
||||
static const ParamID kMaxParamId = 0x7FFFFFFF; ///< value max for a parameter ID
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Audio Types
|
||||
//------------------------------------------------------------------------
|
||||
typedef float Sample32; ///< 32-bit precision audio sample
|
||||
typedef double Sample64; ///< 64-bit precision audio sample
|
||||
typedef double SampleRate; ///< sample rate
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Speaker Arrangements Types
|
||||
//------------------------------------------------------------------------
|
||||
typedef uint64 SpeakerArrangement; ///< Bitset of speakers
|
||||
typedef uint64 Speaker; ///< Bit for one speaker
|
||||
|
||||
/**@}*/
|
||||
|
||||
static SMTG_CONSTEXPR const FIDString SDKVersionString = kVstVersionString;
|
||||
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersionMajor = kVstVersionMajor;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersionMinor = kVstVersionMinor;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersionSub = kVstVersionSub;
|
||||
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion =
|
||||
((SDKVersionMajor << 16) | (SDKVersionMinor << 8) | SDKVersionSub);
|
||||
|
||||
// Versions History which allows to write such code:
|
||||
// if constexpr (SDKVersion >= SDKVersion_3_6_5) { ... }
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_8_0 = VST_3_8_0_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_14 = VST_3_7_14_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_13 = VST_3_7_13_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_12 = VST_3_7_12_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_11 = VST_3_7_11_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_10 = VST_3_7_10_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_9 = VST_3_7_9_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_8 = VST_3_7_8_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_7 = VST_3_7_7_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_6 = VST_3_7_6_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_5 = VST_3_7_5_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_4 = VST_3_7_4_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_3 = VST_3_7_3_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_2 = VST_3_7_2_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_1 = VST_3_7_1_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_7_0 = VST_3_7_0_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_14 = VST_3_6_14_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_13 = VST_3_6_13_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_12 = VST_3_6_12_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_11 = VST_3_6_11_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_10 = VST_3_6_10_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_9 = VST_3_6_9_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_8 = VST_3_6_8_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_7 = VST_3_6_7_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_6 = VST_3_6_6_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_5 = VST_3_6_5_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_6_0 = VST_3_6_0_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_5_0 = VST_3_5_0_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_1_0 = VST_3_1_0_VERSION;
|
||||
static SMTG_CONSTEXPR const uint32 SDKVersion_3_0_0 = VST_3_0_0_VERSION;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
} // namespace Vst
|
||||
} // namespace Steinberg
|
||||
Reference in New Issue
Block a user