libAlgAudio  v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AlgAudio::ParamController Class Reference

#include <ParamController.hpp>

Public Member Functions

float Get () const
 
float GetRangeMax () const
 
float GetRangeMin () const
 
float GetRelative () const
 
void Reset ()
 
void Set (float value)
 
void SetRangeMax (float v)
 
void SetRangeMin (float v)
 
void SetRelative (float value)
 

Static Public Member Functions

static std::shared_ptr
< ParamController
Create (std::shared_ptr< Module > m, const std::shared_ptr< ParamTemplate > templ)
 

Public Attributes

Signal< float, float > after_set
 
std::string id
 
Signal< float > on_range_max_set
 
Signal< float > on_range_min_set
 
Signal< float, float > on_set
 
const std::shared_ptr
< ParamTemplate
templ
 

Detailed Description

A ParamController is the representation of a Param state. All ParamControllers belong to some Module, and are always build according to a ParramTemplate. The internal state of a ParamController represents it's current value. A ParamController's value may be Set(...), which sends the value to SC, or to user-defined custom reaction routine.

Member Function Documentation

static std::shared_ptr<ParamController> AlgAudio::ParamController::Create ( std::shared_ptr< Module m,
const std::shared_ptr< ParamTemplate templ 
)
static
float AlgAudio::ParamController::Get ( ) const
inline
float AlgAudio::ParamController::GetRangeMax ( ) const
inline
float AlgAudio::ParamController::GetRangeMin ( ) const
inline
float AlgAudio::ParamController::GetRelative ( ) const
void AlgAudio::ParamController::Reset ( )
void AlgAudio::ParamController::Set ( float  value)
void AlgAudio::ParamController::SetRangeMax ( float  v)
inline
void AlgAudio::ParamController::SetRangeMin ( float  v)
inline
void AlgAudio::ParamController::SetRelative ( float  value)

Member Data Documentation

Signal<float, float> AlgAudio::ParamController::after_set

Passing values to other controllers should be done once this controller has it value set.

std::string AlgAudio::ParamController::id
Signal<float> AlgAudio::ParamController::on_range_max_set
Signal<float> AlgAudio::ParamController::on_range_min_set
Signal<float, float> AlgAudio::ParamController::on_set

This signal passes two values: the absolute value of this param, and the relative fraction of the range it operates in. CAREFUL when subscribing to this signal: When a param changes quickly, subscriber will be called frequently. It is not a good idea to render any text textures in this handler. Schedule it for next Redraw.

const std::shared_ptr<ParamTemplate> AlgAudio::ParamController::templ

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