Public Member Functions | Protected Member Functions | List of all members
TimeModulation Class Referenceabstract

If a modulator subclasses this, you can calculate varying modulation values over a time. More...

Inheritance diagram for TimeModulation:
Modulation EnvelopeModulator TimeVariantModulator AhdsrEnvelope ModulatorChain MonophonicEnvelope MPEModulator SimpleEnvelope TableEnvelope AudioFileEnvelope ControlModulator GlobalTimeVariantModulator LfoModulator MacroModulator PitchwheelModulator

Public Member Functions

void applyTimeModulation (float *destinationBuffer, int startIndex, int samplesToCopy)
 This applies the intensity to the calculated values. More...
 
virtual void calculateBlock (int startSample, int numSamples)=0
 This calculates the time modulated values and stores them in the internal buffer.
 
virtual const float * getCalculatedValues (int)
 Returns a read pointer to the calculated values. More...
 
- Public Member Functions inherited from Modulation
void applyModulationValue (float calculatedModulationValue, float &destinationValue) const noexcept
 This applies the previously calculated value to the supplied destination value depending on the modulation mode (adding or multiplying). More...
 
float calcIntensityValue (float calculatedModulationValue) const noexcept
 This applies the intensity to the given value and returns the applied value. More...
 
float getDisplayIntensity () const noexcept
 Returns the actual intensity of the Modulation. More...
 
float getIntensity () const noexcept
 Returns the intensity. More...
 
Mode getMode () const noexcept
 returns the mode the Modulator is operating. More...
 
void setIntensity (float newIntensity) noexcept
 Sets the intensity of the modulation. More...
 
void setIntensityFromSlider (float sliderValue) noexcept
 Use this method to set the intensity from the ModulatorEditorHeader's intensity slider converting linear -12 ... More...
 

Protected Member Functions

void applyGainModulation (float *calculatedModulationValues, float *destinationValues, float fixedIntensity, int numValues) const noexcept
 a vectorized version of the calcIntensityValue() and applyModulationValue() for Gain modulation with a fixed intensity value. More...
 
void applyGainModulation (float *calculatedModulationValues, float *destinationValues, float fixedIntensity, const float *intensityValues, int numValues) const noexcept
 A vectorized version of the calcIntensityValue() and applyModulationValue() for Gain modulation with varying intensities. More...
 
void applyPitchModulation (float *calculatedModulationValues, float *destinationValues, float fixedIntensity, const float *intensityValues, int numValues) const noexcept
 A vectorized version of the calcIntensityValue() and applyModulationValue() for Pitch modulation with varying intensities. More...
 
void applyPitchModulation (float *calculatedModulationValues, float *destinationValues, float fixedIntensity, int numValues) const noexcept
 a vectorized version of the calcIntensityValue() and applyModulationValue() for Pitch modulation with a fixed intensity value. More...
 
virtual bool isInitialized ()
 Checks if the prepareToPlay method has been called. More...
 
virtual void prepareToModulate (double, int samplesPerBlock)
 Creates the internal buffer with double the size of the expected buffer block size.
 

Additional Inherited Members

- Public Types inherited from Modulation
enum  Mode { GainMode = 0, PitchMode, PanMode }
 There are two modes that Modulation can work: GainMode and PitchMode. More...
 

Detailed Description

If a modulator subclasses this, you can calculate varying modulation values over a time.

Member Function Documentation

void applyGainModulation ( float *  calculatedModulationValues,
float *  destinationValues,
float  fixedIntensity,
int  numValues 
) const
protectednoexcept

a vectorized version of the calcIntensityValue() and applyModulationValue() for Gain modulation with a fixed intensity value.

void applyGainModulation ( float *  calculatedModulationValues,
float *  destinationValues,
float  fixedIntensity,
const float *  intensityValues,
int  numValues 
) const
protectednoexcept

A vectorized version of the calcIntensityValue() and applyModulationValue() for Gain modulation with varying intensities.

Parameters
fixedIntensitythe intensity of the modulator. Normally you will pass the subclasses getIntensity() here.
intensityValuesa pointer to the precalculated intensity array. It changes the array, so don't use it afterwards!
void applyPitchModulation ( float *  calculatedModulationValues,
float *  destinationValues,
float  fixedIntensity,
const float *  intensityValues,
int  numValues 
) const
protectednoexcept

A vectorized version of the calcIntensityValue() and applyModulationValue() for Pitch modulation with varying intensities.

Parameters
fixedIntensitythe intensity of the modulator. Normally you will pass the subclasses getIntensity() here.
intensityValuesa pointer to the precalculated intensity array. It changes the array, so don't use it afterwards!
void applyPitchModulation ( float *  calculatedModulationValues,
float *  destinationValues,
float  fixedIntensity,
int  numValues 
) const
protectednoexcept

a vectorized version of the calcIntensityValue() and applyModulationValue() for Pitch modulation with a fixed intensity value.

If you need varying intensity, use the other function and pass an array with the calculated intensity values.

void applyTimeModulation ( float *  destinationBuffer,
int  startIndex,
int  samplesToCopy 
)

This applies the intensity to the calculated values.

By default, it applies one intensity value to all calculated values, but you can override it if your Modulator has a internal Chain for the intensity.

const float * getCalculatedValues ( int  )
virtual

Returns a read pointer to the calculated values.

This is used by the global modulator system.

bool isInitialized ( )
protectedvirtual

Checks if the prepareToPlay method has been called.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.