Jamba C++ API
4.1.0
|
This is the class which maintains all the registered parameters. More...
#include <Parameters.h>
Classes | |
class | IChangeListener |
Interface to implement to receive parameter changes. More... | |
struct | JmbParamDefBuilder |
Implements the builder pattern for ease of build. More... | |
struct | RawVstParamDefBuilder |
Implements the builder pattern for ease of build. More... | |
struct | VstParamDefBuilder |
Implements the builder pattern for ease of build. More... | |
Public Types | |
using | ChangeCallback = std::function< void()> |
A callback that will be invoked for changes. More... | |
template<typename Param > | |
using | ChangeCallback1 = std::function< void(Param &)> |
A callback which will be invoked for changes with the param as an argument. More... | |
template<typename TView , typename Param > | |
using | ChangeCallback2 = std::function< void(TView *, Param &)> |
A callback which will be invoked for changes with the view and param as arguments. More... | |
Public Member Functions | |
std::vector< ParamID > const & | getAllRegistrationOrder () const |
NormalizedState::SaveOrder const & | getGUISaveStateOrder () const |
std::shared_ptr< IJmbParamDef > | getJmbParamDef (ParamID iParamID) const |
std::shared_ptr< RawVstParamDef > | getRawVstParamDef (ParamID iParamID) const |
NormalizedState::SaveOrder const & | getRTSaveStateOrder () const |
std::vector< ParamID > const & | getVstRegistrationOrder () const |
template<typename ParamSerializer , typename... Args> | |
JmbParamDefBuilder< typename ParamSerializer::ParamType > | jmb (ParamID iParamID, VstString16 iTitle, Args &&...iSerializerArgs) |
Used from derived classes to build a non vst parameter (not convertible to a ParamValue) More... | |
template<typename ParamSerializer > | |
JmbParamDefBuilder< typename ParamSerializer::ParamType > | jmb (int32 iParamID, VstString16 iTitle, typename ParamSerializer::ConstructorType initValue) |
This flavor allows the ParamSerializer to provide an actual type for the primary constructor. More... | |
template<typename T > | |
JmbParamDefBuilder< T > | jmbFromType (ParamID iParamID, VstString16 iTitle) |
Used from derived classes to build a non vst parameter (not convertible to a ParamValue). More... | |
virtual std::unique_ptr< NormalizedState > | newRTState () const |
Parameters ()=default | |
RawVstParamDefBuilder | raw (ParamID iParamID, VstString16 iTitle) |
Used from derived classes to build a parameter backed by a raw VST parameter. More... | |
virtual ParamValue | readNormalizedValue (ParamID iParamID, IBStreamer &iStreamer) const |
virtual tresult | readRTState (IBStreamer &iStreamer, NormalizedState *oNormalizedState) const |
This method is called to read the RTState from the stream. More... | |
void | registerVstParameters (Vst::ParameterContainer &iParameterContainer) const |
This method is called from the GUI controller to register all the parameters to the ParameterContainer class which is the class managing the parameters in the vst sdk. More... | |
template<typename... Args> | |
tresult | setGUISaveStateOrder (int16 iVersion, Args &&...args) |
Used to change the default order (registration order) used when saving the GUI state (getState/setState in the controller) More... | |
tresult | setGUISaveStateOrder (NormalizedState::SaveOrder const &iSaveOrder) |
Used to change the default order (registration order) used when saving the GUI state (getState/setState in the controller) More... | |
template<typename... Args> | |
tresult | setRTSaveStateOrder (int16 iVersion, Args &&...args) |
Used to change the default order (registration order) used when saving the RT state (getState/setState in the processor, setComponentState in the controller) More... | |
tresult | setRTSaveStateOrder (NormalizedState::SaveOrder const &iSaveOrder) |
Used to change the default order (registration order) used when saving the RT state (getState/setState in the processor, setComponentState in the controller) More... | |
template<typename ParamConverter , typename... Args> | |
VstParamDefBuilder< typename ParamConverter::ParamType > | vst (ParamID iParamID, VstString16 iTitle, Args &&...iConverterArgs) |
Used from derived classes to build a parameter backed by a VST parameter. More... | |
template<typename ParamConverter > | |
VstParamDefBuilder< typename ParamConverter::ParamType > | vst (int32 iParamID, VstString16 iTitle, typename ParamConverter::ConstructorType initValue) |
This flavor allows the ParamConverter to provide an actual type for the primary constructor. More... | |
template<typename T > | |
VstParamDefBuilder< T > | vstFromType (ParamID iParamID, VstString16 iTitle) |
Used from derived classes to build a parameter backed by a VST parameter. More... | |
virtual tresult | writeRTState (NormalizedState const *iNormalizedState, IBStreamer &oStreamer) const |
This method is called to write the NormalizedState to the stream. More... | |
virtual | ~Parameters ()=default |
Protected Member Functions | |
RawVstParam | add (RawVstParamDefBuilder const &iBuilder) |
template<typename T > | |
VstParam< T > | add (VstParamDefBuilder< T > const &iBuilder) |
template<typename T > | |
JmbParam< T > | add (JmbParamDefBuilder< T > const &iBuilder) |
tresult | addJmbParamDef (std::shared_ptr< IJmbParamDef > iParamDef) |
tresult | addVstParamDef (std::shared_ptr< RawVstParamDef > iParamDef) |
Private Member Functions | |
tresult | buildParamIDs (std::vector< ParamID > &iParamIDs) |
template<typename... Args> | |
tresult | buildParamIDs (std::vector< ParamID > &iParamIDs, ParamID id, Args &&...args) |
template<typename... Args> | |
tresult | buildParamIDs (std::vector< ParamID > &iParamIDs, std::shared_ptr< IJmbParamDef > &iParamDef, Args &&...args) |
template<typename T , typename... Args> | |
tresult | buildParamIDs (std::vector< ParamID > &iParamIDs, std::shared_ptr< JmbParamDef< T >> &iParamDef, Args &&...args) |
template<typename ParamConverver , typename... Args> | |
tresult | buildParamIDs (std::vector< ParamID > &iParamIDs, std::shared_ptr< VstParamDef< ParamConverver >> &iParamDef, Args &&...args) |
template<typename... Args> | |
tresult | buildParamIDs (std::vector< ParamID > &iParamIDs, std::shared_ptr< RawVstParamDef > &iParamDef, Args &&...args) |
Private Attributes | |
std::vector< ParamID > | fAllRegistrationOrder {} |
NormalizedState::SaveOrder | fGUISaveStateOrder {} |
std::map< ParamID, std::shared_ptr< IJmbParamDef > > | fJmbParams {} |
NormalizedState::SaveOrder | fRTSaveStateOrder {} |
std::map< ParamID, std::shared_ptr< RawVstParamDef > > | fVstParams {} |
std::vector< ParamID > | fVstRegistrationOrder {} |
Friends | |
class | Debug::ParamDisplay |
This is the class which maintains all the registered parameters.
using ChangeCallback = std::function<void()> |
A callback that will be invoked for changes.
Note that unlike the IChangeListener, there is no parameter since it is expected to be used like this:
fMyParam = registerVstParam(myParamId, [this]() { .... ; });
using ChangeCallback1 = std::function<void(Param &)> |
A callback which will be invoked for changes with the param as an argument.
using ChangeCallback2 = std::function<void(TView *, Param &)> |
A callback which will be invoked for changes with the view and param as arguments.
|
explicitdefault |
|
virtualdefault |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprivate |
|
private |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
std::shared_ptr< IJmbParamDef > getJmbParamDef | ( | ParamID | iParamID | ) | const |
std::shared_ptr< RawVstParamDef > getRawVstParamDef | ( | ParamID | iParamID | ) | const |
|
inline |
|
inline |
Parameters::JmbParamDefBuilder< typename ParamSerializer::ParamType > jmb | ( | ParamID | iParamID, |
VstString16 | iTitle, | ||
Args &&... | iSerializerArgs | ||
) |
Used from derived classes to build a non vst parameter (not convertible to a ParamValue)
Parameters::JmbParamDefBuilder< typename ParamSerializer::ParamType > jmb | ( | int32 | iParamID, |
VstString16 | iTitle, | ||
typename ParamSerializer::ConstructorType | initValue | ||
) |
This flavor allows the ParamSerializer
to provide an actual type for the primary constructor.
Parameters::JmbParamDefBuilder< T > jmbFromType | ( | ParamID | iParamID, |
VstString16 | iTitle | ||
) |
Used from derived classes to build a non vst parameter (not convertible to a ParamValue).
Use this version if you want to provide a different serializer.
|
virtual |
Parameters::RawVstParamDefBuilder raw | ( | ParamID | iParamID, |
VstString16 | iTitle | ||
) |
Used from derived classes to build a parameter backed by a raw VST parameter.
|
virtual |
|
virtual |
This method is called to read the RTState from the stream.
void registerVstParameters | ( | Vst::ParameterContainer & | iParameterContainer | ) | const |
This method is called from the GUI controller to register all the parameters to the ParameterContainer class which is the class managing the parameters in the vst sdk.
tresult setGUISaveStateOrder | ( | int16 | iVersion, |
Args &&... | args | ||
) |
Used to change the default order (registration order) used when saving the GUI state (getState/setState in the controller)
iVersion | should be a >= 0 number. If negative it will be ignored |
args | can be any combination of ParamID , RawVstParamDef, VstParamDef, JmbParamDef |
tresult setGUISaveStateOrder | ( | NormalizedState::SaveOrder const & | iSaveOrder | ) |
Used to change the default order (registration order) used when saving the GUI state (getState/setState in the controller)
tresult setRTSaveStateOrder | ( | int16 | iVersion, |
Args &&... | args | ||
) |
Used to change the default order (registration order) used when saving the RT state (getState/setState in the processor, setComponentState in the controller)
iVersion | should be a >= 0 number. If negative it will be ignored |
args | can be any combination of ParamID , RawVstParamDef, VstParamDef, JmbParamDef |
tresult setRTSaveStateOrder | ( | NormalizedState::SaveOrder const & | iSaveOrder | ) |
Used to change the default order (registration order) used when saving the RT state (getState/setState in the processor, setComponentState in the controller)
Parameters::VstParamDefBuilder< typename ParamConverter::ParamType > vst | ( | ParamID | iParamID, |
VstString16 | iTitle, | ||
Args &&... | iConverterArgs | ||
) |
Used from derived classes to build a parameter backed by a VST parameter.
Parameters::VstParamDefBuilder< typename ParamConverter::ParamType > vst | ( | int32 | iParamID, |
VstString16 | iTitle, | ||
typename ParamConverter::ConstructorType | initValue | ||
) |
This flavor allows the ParamConverter
to provide an actual type for the primary constructor.
Parameters::VstParamDefBuilder< T > vstFromType | ( | ParamID | iParamID, |
VstString16 | iTitle | ||
) |
Used from derived classes to build a parameter backed by a VST parameter.
Use this version if you want to provide a different converter.
|
virtual |
This method is called to write the NormalizedState to the stream.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |