C++ API Reference RNBO: RNBO::ParameterInterface Class Reference

RNBO: RNBO::ParameterInterface Class Reference

Inheritance diagram for RNBO::ParameterInterface:
parameter_interface RNBO::BaseInterface RNBO::ParameterEventInterface RNBO::CoreObject RNBO::ProcessInterface RNBO::PatcherInterface RNBO::PatcherInterfaceImpl

Public Member Functions

virtual ParameterIndex getNumParameters () const =0
 Get the number of visible parameters. More...
 
virtual ConstCharPointer getParameterName (ParameterIndex index) const =0
 Get the parameter name (may not be unique) More...
 
virtual ConstCharPointer getParameterId (ParameterIndex index) const =0
 Get the unique ID of a parameter. More...
 
virtual void getParameterInfo (ParameterIndex index, ParameterInfo *info) const =0
 Get detailed information about a parameter. More...
 
virtual ParameterValue getParameterValue (ParameterIndex index)=0
 
virtual void setParameterValue (ParameterIndex index, ParameterValue value, MillisecondTime time=RNBOTimeNow)=0
 Set a parameter's normalized [0..1] value. More...
 
virtual ParameterValue getParameterNormalized (ParameterIndex index)
 Get a parameter's normalized [0..1] value. More...
 
virtual void setParameterValueNormalized (ParameterIndex index, ParameterValue normalizedValue, MillisecondTime time=RNBOTimeNow)
 Set a parameter's normalized [0..1] value. More...
 
virtual ParameterValue convertToNormalizedParameterValue (ParameterIndex index, ParameterValue value) const =0
 Convert a parameter value from its real value to a normalized representation [0..1]. More...
 
virtual ParameterValue convertFromNormalizedParameterValue (ParameterIndex index, ParameterValue normalizedValue) const =0
 Convert a parameter value from a normalized representation [0..1] to its real value. More...
 
virtual ParameterValue constrainParameterValue (ParameterIndex, ParameterValue value) const
 Apply and get the constrained parameter value. More...
 

Member Function Documentation

◆ constrainParameterValue()

virtual ParameterValue RNBO::ParameterInterface::constrainParameterValue ( ParameterIndex  ,
ParameterValue  value 
) const
inlinevirtual

Apply and get the constrained parameter value.

Parameter constraints include a minimum/maximum value and step constraints

Parameters
indexthe parameter index
valuean unconstrained parameter value
Returns
the constrained parameter value

Reimplemented in RNBO::CoreObject.

◆ convertFromNormalizedParameterValue()

virtual ParameterValue RNBO::ParameterInterface::convertFromNormalizedParameterValue ( ParameterIndex  index,
ParameterValue  normalizedValue 
) const
pure virtual

Convert a parameter value from a normalized representation [0..1] to its real value.

Parameters
indexthe parameter index
normalizedValuethe normalized value
Returns
the real value of the parameter

Implemented in RNBO::CoreObject.

◆ convertToNormalizedParameterValue()

virtual ParameterValue RNBO::ParameterInterface::convertToNormalizedParameterValue ( ParameterIndex  index,
ParameterValue  value 
) const
pure virtual

Convert a parameter value from its real value to a normalized representation [0..1].

Parameters
indexthe parameter index
valuethe real value of the parameter
Returns
a normalized ParameterValue

Implemented in RNBO::CoreObject.

◆ getNumParameters()

virtual ParameterIndex RNBO::ParameterInterface::getNumParameters ( ) const
pure virtual

Get the number of visible parameters.

Note that not all parameters are visible (for example, params in gen~ are not automatically exposed as RNBO parameters). The count of visible parameters is usually the same as the number of param/param~ objects in a RNBO~ patch.

Returns
the number of visible parameters

Implemented in RNBO::CoreObject.

◆ getParameterId()

virtual ConstCharPointer RNBO::ParameterInterface::getParameterId ( ParameterIndex  index) const
pure virtual

Get the unique ID of a parameter.

The unique ID of a parameter can be the same as the parameter ID. If a parameter is nested in a subpatcher, a prefix is added to the parameter name in order to disambiguate. Examples of parameter IDs:

  • "my_toplevel_param"
  • "p_obj-2/my_nested_param"
  • "poly/p_obj-18/my_nested_poly_param"
Parameters
indexthe parameter index
Returns
a C-style string containing the parameter ID

Implemented in RNBO::CoreObject.

◆ getParameterInfo()

virtual void RNBO::ParameterInterface::getParameterInfo ( ParameterIndex  index,
ParameterInfo info 
) const
pure virtual

Get detailed information about a parameter.

Parameters
indexthe parameter index
infoa pointer to a ParameterInfo object to fill

Implemented in RNBO::CoreObject.

◆ getParameterName()

virtual ConstCharPointer RNBO::ParameterInterface::getParameterName ( ParameterIndex  index) const
pure virtual

Get the parameter name (may not be unique)

Parameters
indexthe parameter index
Returns
a C-style string containing the parameter name

Implemented in RNBO::CoreObject.

◆ getParameterNormalized()

virtual ParameterValue RNBO::ParameterInterface::getParameterNormalized ( ParameterIndex  index)
inlinevirtual

Get a parameter's normalized [0..1] value.

Parameters
indexthe parameter index

◆ getParameterValue()

virtual ParameterValue RNBO::ParameterInterface::getParameterValue ( ParameterIndex  index)
pure virtual
Parameters
indexthe parameter index
Returns
the value of the parameter

Implemented in RNBO::CoreObject.

◆ setParameterValue()

virtual void RNBO::ParameterInterface::setParameterValue ( ParameterIndex  index,
ParameterValue  value,
MillisecondTime  time = RNBOTimeNow 
)
pure virtual

Set a parameter's normalized [0..1] value.

Parameters
indexthe parameter index
normalizedValueparameter normalized value to set
timewhen the parameter change should happen (default is RNBOTimeNow)

Implemented in RNBO::CoreObject.

◆ setParameterValueNormalized()

virtual void RNBO::ParameterInterface::setParameterValueNormalized ( ParameterIndex  index,
ParameterValue  normalizedValue,
MillisecondTime  time = RNBOTimeNow 
)
inlinevirtual

Set a parameter's normalized [0..1] value.

Parameters
indexthe parameter index
normalizedValueparameter normalized value to set
timewhen the parameter change should happen (default is RNBOTimeNow)

Reimplemented in RNBO::CoreObject.


The documentation for this class was generated from the following file: