Jamba C++ API  6.0.0
pongasoft::VST Namespace Reference

Namespaces

 Clock
 
 Debug
 
 GUI
 
 IBStreamHelper
 IBStreamHelper - Helper functions.
 
 RT
 
 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  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  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  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  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  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
 
using MessageID = int
 
using Percent = double
 Percent type represented by a double. More...
 
using TagID = ParamID
 Defining a type for tags. More...
 
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. More...
 

Functions

uint16 __readStateVersion (IBStreamer &iStreamer)
 
template<typename T >
constexpr T bitClear (T a, int bit)
 Clears bit bit in a More...
 
template<typename T >
constexpr T bitSet (T a, int bit)
 Sets bit bit in a More...
 
template<typename T >
constexpr bool bitTest (T a, int bit)
 Test if bit bit is set in a More...
 
static int32 computeNextDiscreteValue (int32 iValue, int32 iStepCount, int32 iIncrement, bool iWrap)
 Implements a standard behavior for what it means to increment (resp. More...
 
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. More...
 
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. More...
 
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. More...
 
constexpr TagID UNDEFINED_TAG_ID = UNDEFINED_PARAM_ID
 Constant used to test whether the TagID represents a valid id or an undefined one. More...
 

Typedef Documentation

◆ AudioBuffers32

typedef AudioBuffers<Sample32> AudioBuffers32

◆ AudioBuffers64

typedef AudioBuffers<Sample64> AudioBuffers64

◆ MessageID

using MessageID = int

◆ Percent

using Percent = double

Percent type represented by a double.

◆ 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

◆ 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 pongasoft::VST::__readStateVersion ( IBStreamer &  iStreamer)

◆ bitClear()

constexpr T pongasoft::VST::bitClear ( a,
int  bit 
)

Clears bit bit in a

◆ bitSet()

constexpr T pongasoft::VST::bitSet ( a,
int  bit 
)

Sets bit bit in a

◆ bitTest()

constexpr bool pongasoft::VST::bitTest ( a,
int  bit 
)

Test if bit bit is set in a

◆ computeNextDiscreteValue()

static int32 pongasoft::VST::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()

static ParamValue pongasoft::VST::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()

static int32 pongasoft::VST::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()

SampleType pongasoft::VST::dbToSample ( double  valueInDb)
inline

◆ getSampleSilentThreshold()

SampleType pongasoft::VST::getSampleSilentThreshold ( )
noexcept

◆ getSampleSilentThreshold< Sample32 >()

constexpr Sample32 pongasoft::VST::getSampleSilentThreshold< Sample32 > ( )
noexcept

◆ getSampleSilentThreshold< Sample64 >()

constexpr Sample64 pongasoft::VST::getSampleSilentThreshold< Sample64 > ( )
noexcept

◆ isSilent() [1/2]

bool pongasoft::VST::isSilent ( Sample32  value)
inline

◆ isSilent() [2/2]

bool pongasoft::VST::isSilent ( Sample64  value)
inline

◆ sampleToDb()

double pongasoft::VST::sampleToDb ( SampleType  valueInSample)
inline

Variable Documentation

◆ ATTR_MSG_ID

const auto ATTR_MSG_ID = "ATTR_MSG_ID"
static

◆ DEFAULT_LEFT_CHANNEL

constexpr int32 DEFAULT_LEFT_CHANNEL = 0

◆ DEFAULT_RIGHT_CHANNEL

constexpr int32 DEFAULT_RIGHT_CHANNEL = 1

◆ Sample32SilentThreshold

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

◆ Sample64SilentThreshold

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

◆ UNDEFINED_PARAM_ID

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.

◆ UNDEFINED_TAG_ID

constexpr TagID UNDEFINED_TAG_ID = UNDEFINED_PARAM_ID

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