![]() |
:)
|
PARENT - Modulator unit (RustyModulators) parent class. More...
#include <RustyModulator.hpp>
Public Member Functions | |
| virtual double | getCurrentValue ()=0 |
| Returns a modulator value for use on a RustyProcessor. | |
| virtual void | updateState ()=0 |
| Update modulator state and iterate forward a step. | |
| virtual void | setParameter (std::string parameter, std::string value)=0 |
| Sets RustyModulator parameter to new value. | |
| void | addReference () |
| Tells RustyModulator that a RustyProcessor has been attached. | |
| void | removeReference () |
| Tells RustyModulator that a RustyProcessor has been removed. | |
| void | usedByProcessor () |
| Called after every modulator read. | |
| bool | isNumeric (const std::string &str) |
| Function to test if value contains numeric characters. | |
| virtual std::string | getModulatorType ()=0 |
| Function to get modulator type. | |
| virtual std::string | getParams ()=0 |
| Function to get modulator params. | |
Protected Attributes | |
| int | _refCount = 0 |
| Count of RustyProcessors that modulator is attached to. | |
| int | _useCount = 0 |
| Count of RustyProcessors usage at that moment in time. | |
PARENT - Modulator unit (RustyModulators) parent class.
Standardises modulator behaviour within the library. All modulator classes inherit from this base class.
RustyModulator uses getCurrentValue() to return the current position of the modulator and then updateState() to iterate the modulator one step when all processors that are attached to the modulator have used that value.
Definition at line 26 of file RustyModulator.hpp.
|
inlinevirtual |
Definition at line 29 of file RustyModulator.hpp.
|
pure virtual |
Returns a modulator value for use on a RustyProcessor.
This pure virtual function will get the state of the modulator at that moment in time. Ie. LFO position.
Implemented in RustyLFO.
|
pure virtual |
Update modulator state and iterate forward a step.
This function iterates the modulator. This isn't called directly by any RustyProcessor but is instead called from within the RustyModulator when it has been informed that all attached processors have used the modulator.
Implemented in RustyLFO.
|
pure virtual |
Sets RustyModulator parameter to new value.
This is pure virtual function that assigns a new value to a parameter of RustyModulator derived units. This function is used at runtime from CLI interaction.
| parameter | String of the parameter to affect. |
| modulator | Pointer to instance of RustyModulator. |
Implemented in RustyLFO.
|
inline |
Tells RustyModulator that a RustyProcessor has been attached.
This function keeps track of how many processor units have parameters bound to an instance of a RustyModulator derived class. This is so update state isn't called after every read of the RustyModulator.
Definition at line 79 of file RustyModulator.hpp.
|
inline |
Tells RustyModulator that a RustyProcessor has been removed.
This function removes a processor reference. This function isn't actually used at any point but was added to allow for expansion in the future.
Definition at line 92 of file RustyModulator.hpp.
|
inline |
Called after every modulator read.
This function keeps track of whether all RustyProcessors have read the RustyModulator at that point in time. This was necessary as if there was more than one processor using the same LFO, how else would it know when to update.
Definition at line 107 of file RustyModulator.hpp.
|
inline |
Function to test if value contains numeric characters.
Function takes a const reference to string and checks it's component chars with std::isDigit(). If there are any values that are non-numeric and could cause a conversion error at runtime the function return false. Else it returns true.
| str | Constant reference of a string. |
Definition at line 126 of file RustyModulator.hpp.
|
pure virtual |
Function to get modulator type.
Simple function allows CLI to test modulator types for user interaction.
Implemented in RustyLFO.
|
pure virtual |
Function to get modulator params.
Simple function allows CLI to get available params for RustyModulator child.
Implemented in RustyLFO.
|
protected |
Count of RustyProcessors that modulator is attached to.
Definition at line 156 of file RustyModulator.hpp.
|
protected |
Count of RustyProcessors usage at that moment in time.
Definition at line 157 of file RustyModulator.hpp.