:)
Loading...
Searching...
No Matches
RustyProcessor Class Referenceabstract

PARENT - DSP unit (RustyProcessors) parent class. More...

#include <RustyProcessor.hpp>

Inheritance diagram for RustyProcessor:
RustyCompressor RustyFilter RustyGain RustyOverdrive

Public Member Functions

virtual void process (float *sample)=0
 Performs DSP on an audio sample.
 
virtual void setModulatorForParameter (std::string parameter, RustyModulator *modulator)=0
 Binds a RustyModulator to a RustyProcessor instance parameter.
 
virtual void setParameter (std::string parameter, std::string value)=0
 Sets RustyProcessor parameter to new value.
 
bool isNumeric (const std::string &str)
 Function to test if value contains numeric characters.
 
virtual std::string getProcessorType ()=0
 Function to get processor type.
 
virtual std::string getParams ()=0
 Function to get processor params.
 

Public Attributes

std::map< std::string, RustyModulator * > _modulators
 Map of processors affecting derived RustyProcessor.
 

Detailed Description

PARENT - DSP unit (RustyProcessors) parent class.

Standardises processing within the library. All processor classes inherit from this base class.

RustyProcessor uses process() to handle audio manipulation on a sample by sample basis.

Definition at line 28 of file RustyProcessor.hpp.

Constructor & Destructor Documentation

◆ ~RustyProcessor()

virtual RustyProcessor::~RustyProcessor ( )
inlinevirtual

Definition at line 31 of file RustyProcessor.hpp.

Member Function Documentation

◆ process()

virtual void RustyProcessor::process ( float *  sample)
pure virtual

Performs DSP on an audio sample.


This pure virtual function performs DSP algorithms on a sample by sample basis. A pointer to a 32bitFloat audio sample is passed as an argument and this will be the value used as the input to the DSP function f(x).

Parameters
samplePointer to a 32bitFloat audio sample value.

Implemented in RustyCompressor, RustyFilter, RustyGain, and RustyOverdrive.

◆ setModulatorForParameter()

virtual void RustyProcessor::setModulatorForParameter ( std::string  parameter,
RustyModulator *  modulator 
)
pure virtual

Binds a RustyModulator to a RustyProcessor instance parameter.


This is pure virtual function assigns modulator manipulation to parameters within the DSP unit. Each RustyProcessor derived DSP unit will check the parameter name against suitable parameters, if there is a match the modulator will affect the parameter.

Parameters
parameterString of the parameter to affect.
modulatorPointer to instance of RustyModulator.
See also
setParameter()

Implemented in RustyCompressor, RustyFilter, RustyGain, and RustyOverdrive.

◆ setParameter()

virtual void RustyProcessor::setParameter ( std::string  parameter,
std::string  value 
)
pure virtual

Sets RustyProcessor parameter to new value.


This is pure virtual function that assigns a new value to a parameter of RustyProcessor derived DSP units. This function is used at runtime from CLI interaction.

Parameters
parameterString of the parameter to affect.
modulatorPointer to instance of RustyModulator.
See also
setModulatorForParameter()

Implemented in RustyCompressor, RustyFilter, RustyGain, and RustyOverdrive.

◆ isNumeric()

bool RustyProcessor::isNumeric ( const std::string &  str)
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.

Parameters
strConstant reference of a string.
Returns
Returns true if string characters are numerical.

Definition at line 90 of file RustyProcessor.hpp.

◆ getProcessorType()

virtual std::string RustyProcessor::getProcessorType ( )
pure virtual

Function to get processor type.


Simple function allows CLI to test Processor types for user interaction.

Returns
Returns string of RustyProcessor child type.

Implemented in RustyCompressor, RustyFilter, RustyGain, and RustyOverdrive.

◆ getParams()

virtual std::string RustyProcessor::getParams ( )
pure virtual

Function to get processor params.


Simple function allows CLI to get available params for RustyProcessor child.

Returns
Returns string of parameters available for RustyProcessor child.

Implemented in RustyCompressor, RustyFilter, RustyGain, and RustyOverdrive.

Member Data Documentation

◆ _modulators

std::map<std::string, RustyModulator*> RustyProcessor::_modulators

Map of processors affecting derived RustyProcessor.

Definition at line 119 of file RustyProcessor.hpp.


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