Holds a list of modulation destinations and sends events to them when the modulator output is updated.
More...
#include <ModulationSource.h>
|
| float(* | mappingFunctionPtr )(const float *parameterValuesVector, const float depth) = nullptr |
| |
Holds a list of modulation destinations and sends events to them when the modulator output is updated.
This class is used by modulators to store and send out modulation signals to any destination parameter.
Generally, the process of creating and sending a modulation signal looks like this:
- At the beginning of processing for a particular block, modulator Kwidgets are processed first
- Modulator Kwidgets write their modulation signals into a Modulator object
- The Modulator sends a signal to all of its destination parameters, letting them know that their values are being modulated during the next block
- This signal is received by the corresponding KAttachment, which then provides the parameter values to its KwidgetProcessor for the next block
◆ Modulator()
| krotos::Modulator::Modulator |
( |
bool | isFast = true | ) |
|
◆ ~Modulator()
| virtual krotos::Modulator::~Modulator |
( |
| ) |
|
|
virtualdefault |
◆ addListener()
| void krotos::Modulator::addListener |
( |
Listener * | l | ) |
|
◆ callListeners()
| void krotos::Modulator::callListeners |
( |
| ) |
|
◆ getNumValues()
| int krotos::Modulator::getNumValues |
( |
| ) |
const |
|
inline |
◆ getValues()
| const float * krotos::Modulator::getValues |
( |
| ) |
const |
|
inline |
◆ isFast()
| bool krotos::Modulator::isFast |
( |
| ) |
const |
|
inline |
◆ removeListener()
| void krotos::Modulator::removeListener |
( |
Listener * | l | ) |
|
◆ setValues()
| void krotos::Modulator::setValues |
( |
const float * | values, |
|
|
int | numValues ) |
|
inline |
◆ m_amounts
| std::map<Listener*, float> krotos::Modulator::m_amounts |
|
private |
◆ m_isFast
| const bool krotos::Modulator::m_isFast |
|
private |
◆ m_listeners
| ListenerList<Listener> krotos::Modulator::m_listeners |
|
private |
◆ m_numValues
| int krotos::Modulator::m_numValues |
|
private |
◆ m_values
| const float* krotos::Modulator::m_values |
|
private |
◆ mappingFunctionPtr
| float(* krotos::Modulator::mappingFunctionPtr) (const float *parameterValuesVector, const float depth) = nullptr |
Function pointer to set mapping functions. Set from the respective KwidgetProcessor who is adding the modulator. To make this generic as possible, the mapping function needs to be declared static!! It is then in the responsibility of the function to retrieve as many values as it needs, iterating through the vector of parameter values.
- Parameters
-
| parameterValuesVector | This points to a vector storing the parameterValues, whose changes this modulator picks up and updates his values.(example posX and posY of a XYPad). |
| depth | The depth input value. To keep the system generic as possible it is in the responsibility of the mapping function to interpret this value (can be offset, gain multiplier or anything else). |
The documentation for this class was generated from the following files: