All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Types | Public Member Functions | List of all members
Modulation Class Referenceabstract
Inheritance diagram for Modulation:
TimeModulation VoiceModulation EnvelopeModulator TimeVariantModulator EnvelopeModulator VoiceStartModulator AhdsrEnvelope ModulatorChain SimpleEnvelope TableEnvelope AudioFileEnvelope ControlModulator LfoModulator MacroModulator PitchwheelModulator AhdsrEnvelope ModulatorChain SimpleEnvelope TableEnvelope ArrayModulator ConstantModulator KeyModulator RandomModulator VelocityModulator

Public Types

enum  Mode { GainMode = 0, PitchMode }

Public Member Functions

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

Detailed Description

This is the base class for all modulation behaviour.

Member Function Documentation

void applyModulationValue ( float  calculatedModulationValue,
float &  destinationValue 
) const

This applies the previously calculated value to the supplied destination value depending on the modulation mode (adding or multiplying).

float calcIntensityValue ( float  calculatedModulationValue) const

This applies the intensity to the given value and returns the applied value.

  • In GainMode the input is supposed to be between 0.0 and 1.0. The output will be between 0.0 and 1.0 (and 1.0 if the intensity is 0.0)
  • in PitchMode the input is supposed to be between 0.0 and 1.0. The output will be between -1.0 and 1.0 (and 0.0 if the intensity is 0.0)
float getDisplayIntensity ( ) const

Returns the actual intensity of the Modulation. Use this for GUI displays, since getIntensity() could be overwritten and behave funky.

float getIntensity ( ) const

Returns the intensity. This is used by the modulator chain to either multiply or add the outcome of the Modulation.

You can subclass this method if you modulate the intensity. In this case, don't change the intensity directly (or you can't change it in the GUI anymore), but save the modulation value elsewhere and return the product:

virtual float getIntensity() const
    return intensityModulation * Modulator::getIntensity();

Reimplemented in LfoModulator, and AudioFileEnvelope.

Mode getMode ( ) const

returns the mode the Modulator is operating.

void setIntensity ( float  newIntensity)

Sets the intensity of the modulation. The intensity is multiplied with the outcome or added depending on the TargetMode of the owner ModulatorChain.

In GainMode, the Intensity is between 0.0 and 1.0. In PitchMode, the Intensity can be between 0.5 and 2.0.

void setIntensityFromSlider ( float  sliderValue)

Use this method to set the intensity from the ModulatorEditorHeader's intensity slider converting linear -12 ... 12 to log 0.5 ... 2.

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