Jamba C++ API 7.5.0
Loading...
Searching...
No Matches
pongasoft::VST Namespace Reference

Namespaces

namespace  Clock
namespace  Debug
namespace  GUI
namespace  IBStreamHelper
 IBStreamHelper - Helper functions.
namespace  RT
namespace  VstUtils

Classes

class  AudioBuffers
 Represents all the buffers (example for a stereo channel there is 2 underlying sample buffers). More...
class  AutoReleaseTimer
 Simple wrapper class around Steinberg::Timer which will automatically release the timer on delete. More...
class  BooleanParamConverter
 Manages the very common case when a param represents a boolean value. More...
class  BooleanParamSerializer
 This parameter handles serializing a bool parameter. More...
class  CStringParamSerializer
 A parameter backed by a C type string (char[size]). More...
class  DiscreteTypeParamConverter
 This converters maps a list of values of type T to discrete values. More...
class  DiscreteTypeParamSerializer
 This converters maps a list of values of type T to discrete values. More...
class  DiscreteValueParamConverter
 A converter to deal with a discrete value which has StepCount steps. More...
class  DoubleParamSerializer
 This parameter handles serializing a double parameter. More...
class  EnumParamConverter
 A converter to deal with an enum (assumes that the enum is contiguous, starts at 0 and that MaxValue is the latest value in the enum). More...
class  FObjectCx
 Wrapper class which maintains a connection between the target and this object. More...
class  FObjectCxCallback
 Wrapper class which will invoke the callback when the target is changed. More...
class  IDiscreteConverter
 Interface that defines a converter from a type T to an int32 given a number of steps (provided by getStepCount). More...
class  IJmbParamDef
 Base class for jamba parameters (non templated). More...
class  IMessageHandler
 Interface defining a message handler. More...
class  IMessageProducer
 Abstraction for allocating and sending a message. More...
class  Int32ParamSerializer
 This parameter handles serializing a int32 parameter. More...
class  Int64ParamSerializer
 This parameter handles serializing a int64 parameter. More...
class  IParamConverter
 A vst parameter is represented by a ParamValue type which is a double in the range [0,1]. More...
class  IParamDef
 Base class for all ParamDef. More...
class  IParamSerializer
 A vst parameter is represented by a ParamValue type which is a double in the range [0,1]. More...
class  JambaPluginFactory
 The purpose of this class is to make it easier and safer to create the plugin factory. More...
class  JmbParamDef
 Base class for all non vst parameters (need to provide serialization/deserialization). More...
class  Message
 Simple wrapper class with better api. More...
class  MessageHandler
 Simple implementation of IMessageHandler which will delegate the message handling based on MessageID. More...
class  NormalizedState
 Used to communicate the state between the UI and the RT and read/write to stream. More...
class  Parameters
 This is the class which maintains all the registered parameters. More...
class  PercentParamConverter
 A trivial percent converter. More...
class  RawParamConverter
 This parameter is just a no-op wrapper to the ParamValue to adapt it to the use of the ParamConverter concept. More...
class  RawParamSerializer
 This parameter handles serializing a raw parameter (ParamValue). More...
class  RawVstParamDef
 Base class for a raw vst parameter definition. More...
class  SampleRateBasedClock
 The purpose of this class is to deal with timing based on the sample rate and do the proper conversions. More...
class  StaticCastDiscreteConverter
 This implementation simply cast T to an int32 (and vice-versa). More...
class  VstParamDef
 Typed parameter definition. More...
class  VstParameterImpl
 Internal class which extends the Vst::Parameter to override toString and delegate to the param def. More...

Typedefs

typedef AudioBuffers< Sample32 > AudioBuffers32
typedef AudioBuffers< Sample64 > AudioBuffers64
template<typename T>
using JmbParam = std::shared_ptr<JmbParamDef<T>>
template<typename T, size_t N>
using JmbParams = std::array<JmbParam<T>, N>
using MessageID = int
using Percent = double
 Percent type represented by a double.
using RawVstParam = std::shared_ptr<RawVstParamDef>
template<size_t N>
using RawVstParams = std::array<RawVstParam, N>
using TagID = ParamID
 Defining a type for tags.
template<typename T>
using VstParam = std::shared_ptr<VstParamDef<T>>
template<typename T, size_t N>
using VstParams = std::array<VstParam<T>, N>
using VstString16 = std::basic_string<Steinberg::char16>
 Strings made of char16 characters are represented by the native C++11 type std::basic_string<Steinberg::char16> and properly converted to what is required by the VST classes.

Functions

uint16 __readStateVersion (IBStreamer &iStreamer)
template<typename T>
constexpr T bitClear (T a, int bit)
 Clears bit bit in a.
template<typename T>
constexpr T bitSet (T a, int bit)
 Sets bit bit in a.
template<typename T>
constexpr bool bitTest (T a, int bit)
 Test if bit bit is set in a.
static int32 computeNextDiscreteValue (int32 iValue, int32 iStepCount, int32 iIncrement, bool iWrap)
 Implements a standard behavior for what it means to increment (resp.
static ParamValue convertDiscreteValueToNormalizedValue (int32 iStepCount, int32 iDiscreteValue)
 Implements the algorithm described in the VST documentation on how to interpret a discrete value into a normalized value.
static int32 convertNormalizedValueToDiscreteValue (int32 iStepCount, ParamValue iNormalizedValue)
 Implements the algorithm described in the VST documentation on how to interpret a normalized value as a discrete value.
template<typename SampleType>
SampleType dbToSample (double valueInDb)
template<typename SampleType>
SampleType getSampleSilentThreshold () noexcept
template<>
constexpr Sample32 getSampleSilentThreshold< Sample32 > () noexcept
template<>
constexpr Sample64 getSampleSilentThreshold< Sample64 > () noexcept
bool isSilent (Sample32 value)
bool isSilent (Sample64 value)
template<typename SampleType>
double sampleToDb (SampleType valueInSample)

Variables

static const auto ATTR_MSG_ID = "ATTR_MSG_ID"
constexpr int32 DEFAULT_LEFT_CHANNEL = 0
constexpr int32 DEFAULT_RIGHT_CHANNEL = 1
constexpr Sample32 Sample32SilentThreshold = ((Sample32)2.0e-8)
constexpr Sample64 Sample64SilentThreshold = ((Sample64)2.0e-8)
constexpr ParamID UNDEFINED_PARAM_ID = static_cast<ParamID>(-1)
 Constant used throughout the code to test whether the ParamID represents a valid id or an undefined one.
constexpr TagID UNDEFINED_TAG_ID = UNDEFINED_PARAM_ID
 Constant used to test whether the TagID represents a valid id or an undefined one.

Typedef Documentation

◆ AudioBuffers32

typedef AudioBuffers<Sample32> AudioBuffers32

◆ AudioBuffers64

typedef AudioBuffers<Sample64> AudioBuffers64

◆ JmbParam

template<typename T>
using JmbParam = std::shared_ptr<JmbParamDef<T>>

◆ JmbParams

template<typename T, size_t N>
using JmbParams = std::array<JmbParam<T>, N>

◆ MessageID

using MessageID = int

◆ Percent

using Percent = double

Percent type represented by a double.

◆ RawVstParam

using RawVstParam = std::shared_ptr<RawVstParamDef>

◆ RawVstParams

template<size_t N>
using RawVstParams = std::array<RawVstParam, N>

◆ TagID

using TagID = ParamID

Defining a type for tags.

Warning
Since 4.0.0, this type has changed to be non negative. The issue stems from the fact that the VST SDK uses ParamID throughout and is mapped to an uint32 but the VSTGUI layer uses int32_t for what they call tags (ex: CControl::getTag()) but is in fact a parameter ID, hence a uint32 (essentially this is a mess...). So reverting to use what the VST SDK deals with: uint32

◆ VstParam

template<typename T>
using VstParam = std::shared_ptr<VstParamDef<T>>

◆ VstParams

template<typename T, size_t N>
using VstParams = std::array<VstParam<T>, N>

◆ VstString16

using VstString16 = std::basic_string<Steinberg::char16>

Strings made of char16 characters are represented by the native C++11 type std::basic_string<Steinberg::char16> and properly converted to what is required by the VST classes.

The Steinberg::String class can be used to generate a formatted string like this:

int pad = 3;
String title;
title.printf(STR16("Pad [%d]"), pad);
// because std::basic_string<Steinberg::char16> can be created from a char16 const *,
// then you can simply use title.text16() wherever a VstString16 is requested
myParam = vst<BooleanParamConverter>(id, title.text16()).add();

Function Documentation

◆ __readStateVersion()

uint16 __readStateVersion ( IBStreamer & iStreamer)

◆ bitClear()

template<typename T>
T bitClear ( T a,
int bit )
constexpr

Clears bit bit in a.

◆ bitSet()

template<typename T>
T bitSet ( T a,
int bit )
constexpr

Sets bit bit in a.

◆ bitTest()

template<typename T>
bool bitTest ( T a,
int bit )
constexpr

Test if bit bit is set in a.

◆ computeNextDiscreteValue()

int32 computeNextDiscreteValue ( int32 iValue,
int32 iStepCount,
int32 iIncrement,
bool iWrap )
inlinestatic

Implements a standard behavior for what it means to increment (resp.

decrement if iIncrement is negative) a discrete value.

Parameters
iValuethe current value from which we want to compute the "next" one
iStepCountthe number of steps for the discrete property (no action if <= 0)
iIncrementhow much to increment (if positive) or decrement (if negative) the current value
iWrapif true wraps the property around if it goes beyond the limit after increment (resp. decrement) or stay at the limit if false
Returns
the computed "next" discrete value

◆ convertDiscreteValueToNormalizedValue()

ParamValue convertDiscreteValueToNormalizedValue ( int32 iStepCount,
int32 iDiscreteValue )
inlinestatic

Implements the algorithm described in the VST documentation on how to interpret a discrete value into a normalized value.

◆ convertNormalizedValueToDiscreteValue()

int32 convertNormalizedValueToDiscreteValue ( int32 iStepCount,
ParamValue iNormalizedValue )
inlinestatic

Implements the algorithm described in the VST documentation on how to interpret a normalized value as a discrete value.

◆ dbToSample()

template<typename SampleType>
SampleType dbToSample ( double valueInDb)
inline

◆ getSampleSilentThreshold()

template<typename SampleType>
SampleType getSampleSilentThreshold ( )
noexcept

◆ getSampleSilentThreshold< Sample32 >()

template<>
Sample32 getSampleSilentThreshold< Sample32 > ( )
constexprnoexcept

◆ getSampleSilentThreshold< Sample64 >()

template<>
Sample64 getSampleSilentThreshold< Sample64 > ( )
constexprnoexcept

◆ isSilent() [1/2]

bool isSilent ( Sample32 value)
inline

◆ isSilent() [2/2]

bool isSilent ( Sample64 value)
inline

◆ sampleToDb()

template<typename SampleType>
double sampleToDb ( SampleType valueInSample)
inline

Variable Documentation

◆ ATTR_MSG_ID

const auto ATTR_MSG_ID = "ATTR_MSG_ID"
static

◆ DEFAULT_LEFT_CHANNEL

int32 DEFAULT_LEFT_CHANNEL = 0
constexpr

◆ DEFAULT_RIGHT_CHANNEL

int32 DEFAULT_RIGHT_CHANNEL = 1
constexpr

◆ Sample32SilentThreshold

Sample32 Sample32SilentThreshold = ((Sample32)2.0e-8)
constexpr

◆ Sample64SilentThreshold

Sample64 Sample64SilentThreshold = ((Sample64)2.0e-8)
constexpr

◆ UNDEFINED_PARAM_ID

ParamID UNDEFINED_PARAM_ID = static_cast<ParamID>(-1)
constexpr

Constant used throughout the code to test whether the ParamID represents a valid id or an undefined one.

◆ UNDEFINED_TAG_ID

TagID UNDEFINED_TAG_ID = UNDEFINED_PARAM_ID
constexpr

Constant used to test whether the TagID represents a valid id or an undefined one.