Vital
|
A structure representing a single modulation connection between a modulation source and a destination parameter. More...
#include <synth_types.h>
Public Member Functions | |
ModulationConnection (int index) | |
Constructs a ModulationConnection with an index and empty source/destination. | |
ModulationConnection (int index, std::string from, std::string to) | |
Constructs a ModulationConnection with given index and names. | |
~ModulationConnection () | |
Destroys the ModulationConnection, cleaning up its processor. | |
void | resetConnection (const std::string &from, const std::string &to) |
Resets this modulation connection to a new source and destination. | |
Static Public Member Functions | |
static bool | isModulationSourceDefaultBipolar (const std::string &source) |
Checks if a given modulation source is bipolar by default. | |
Public Attributes | |
std::string | source_name |
The name of the modulation source. | |
std::string | destination_name |
The name of the destination parameter. | |
std::unique_ptr< ModulationConnectionProcessor > | modulation_processor |
Processor applying scaling/mapping. | |
A structure representing a single modulation connection between a modulation source and a destination parameter.
Each ModulationConnection links a source_name
(e.g., an LFO or envelope) to a destination_name
(a synth parameter). It holds a ModulationConnectionProcessor to apply transformations like scaling or mapping curves.
The isModulationSourceDefaultBipolar
method checks if the source typically produces bipolar values (e.g., LFOs). Connections can be reset, and by default start disconnected until resetConnection
is called.
|
inline |
Constructs a ModulationConnection with an index and empty source/destination.
index | The connection index, often used to identify this modulation slot. |
vital::ModulationConnection::ModulationConnection | ( | int | index, |
std::string | from, | ||
std::string | to ) |
Constructs a ModulationConnection with given index and names.
index | The connection index. |
from | The modulation source name. |
to | The destination parameter name. |
vital::ModulationConnection::~ModulationConnection | ( | ) |
Destroys the ModulationConnection, cleaning up its processor.
|
static |
Checks if a given modulation source is bipolar by default.
Some modulation sources (e.g., LFOs) naturally produce values in a bipolar range.
source | The modulation source name. |
|
inline |
Resets this modulation connection to a new source and destination.
from | The new modulation source name. |
to | The new destination parameter name. |
std::string vital::ModulationConnection::destination_name |
The name of the destination parameter.
std::unique_ptr<ModulationConnectionProcessor> vital::ModulationConnection::modulation_processor |
Processor applying scaling/mapping.
std::string vital::ModulationConnection::source_name |
The name of the modulation source.