All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | Protected Member Functions | List of all members
TimeModulation Class Referenceabstract
Inheritance diagram for TimeModulation:
Modulation EnvelopeModulator TimeVariantModulator AhdsrEnvelope ModulatorChain SimpleEnvelope TableEnvelope AudioFileEnvelope ControlModulator LfoModulator MacroModulator PitchwheelModulator

Public Member Functions

virtual void renderNextBlock (AudioSampleBuffer &buffer, int startSample, int numSamples)
 
virtual void calculateBlock (int startSample, int numSamples)=0
 
virtual void applyTimeModulation (AudioSampleBuffer &buffer, int startIndex, int samplesToCopy)
 
virtual const float * getCalculatedValues (int)
 
- Public Member Functions inherited from Modulation
Mode getMode () const noexcept
 
float calcIntensityValue (float calculatedModulationValue) const noexcept
 
void applyModulationValue (float calculatedModulationValue, float &destinationValue) const noexcept
 
void setIntensity (float newIntensity) noexcept
 
void setIntensityFromSlider (float sliderValue) noexcept
 
virtual float getIntensity () const noexcept
 
float getDisplayIntensity () const noexcept
 

Protected Member Functions

virtual void prepareToModulate (double, int samplesPerBlock)
 
virtual void updatePlotter (const AudioSampleBuffer &processedBuffer, int startSample, int numSamples)=0
 
virtual bool shouldUpdatePlotter () const =0
 
virtual bool isInitialized ()
 
void applyGainModulation (float *calculatedModulationValues, float *destinationValues, float fixedIntensity, int numValues) const noexcept
 
void applyGainModulation (float *calculatedModulationValues, float *destinationValues, float fixedIntensity, float *intensityValues, int numValues) const noexcept
 
void applyPitchModulation (float *calculatedModulationValues, float *destinationValues, float fixedIntensity, float *intensityValues, int numValues) const noexcept
 
void applyPitchModulation (float *calculatedModulationValues, float *destinationValues, float fixedIntensity, int numValues) const noexcept
 

Additional Inherited Members

- Public Types inherited from Modulation
enum  Mode { GainMode = 0, PitchMode }
 

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,
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,
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 ( AudioSampleBuffer &  buffer,
int  startIndex,
int  samplesToCopy 
)
virtual

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.

Reimplemented in LfoModulator, and AudioFileEnvelope.

virtual void calculateBlock ( int  startSample,
int  numSamples 
)
pure virtual

This calculates the time modulated values and stores them in the internal buffer.

Implemented in ModulatorChain.

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.

void prepareToModulate ( double  ,
int  samplesPerBlock 
)
protectedvirtual

Creates the internal buffer with double the size of the expected buffer block size.

void renderNextBlock ( AudioSampleBuffer &  buffer,
int  startSample,
int  numSamples 
)
virtual

This renders the next chunk of samples. It repeatedly calls calculateNewValue() until the buffer is filled.

Parameters
bufferthe AudioSampleBuffer that the function operates on.
startSamplethe start index within the buffer. If you need to change only a part of the buffer (eg. if a voice starts in the middle), use this parameter
numSamplesthe amount of samples that are processed (numSamples = buffersize - startSample)

Reimplemented in ModulatorChain.

virtual bool shouldUpdatePlotter ( ) const
protectedpure virtual

Overwrite this method to determine whether the modulation values should be sent to the Gui.

virtual void updatePlotter ( const AudioSampleBuffer &  processedBuffer,
int  startSample,
int  numSamples 
)
protectedpure virtual

Picks 4 values out of the processed buffer and sends it to the plotter.

This is called after the internal buffer has been filled with the Modulation values.

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