|
JUCE
|
A base class for the smoothed value classes. More...
Public Types | |
| using | FloatType = typename FloatTypeHelper< SmoothedValueType >::Type |
Public Member Functions | |
| SmoothedValueBase ()=default | |
| Constructor. More... | |
| virtual | ~SmoothedValueBase () |
| bool | isSmoothing () const noexcept |
| Returns true if the current value is currently being interpolated. More... | |
| FloatType | getCurrentValue () const noexcept |
| Returns the current value of the ramp. More... | |
| FloatType | getTargetValue () const noexcept |
| Returns the target value towards which the smoothed value is currently moving. More... | |
| void | setCurrentAndTargetValue (FloatType newValue) |
| Sets the current value and the target value. More... | |
| void | applyGain (FloatType *samples, int numSamples) noexcept |
| Applies a smoothed gain to a stream of samples S[i] *= gain. More... | |
| void | applyGain (FloatType *samplesOut, const FloatType *samplesIn, int numSamples) noexcept |
| Computes output as a smoothed gain applied to a stream of samples. More... | |
| void | applyGain (AudioBuffer< FloatType > &buffer, int numSamples) noexcept |
| Applies a smoothed gain to a buffer. More... | |
Protected Attributes | |
| FloatType | currentValue = 0 |
| FloatType | target = currentValue |
| int | countdown = 0 |
A base class for the smoothed value classes.
This class is used to provide common functionality to the SmoothedValue and dsp::LogRampedValue classes.
| using SmoothedValueBase< SmoothedValueType >::FloatType = typename FloatTypeHelper<SmoothedValueType>::Type |
|
default |
Constructor.
|
virtual |
|
noexcept |
Returns true if the current value is currently being interpolated.
Referenced by SmoothedValueBase< SmoothedValue< NumericType, ValueSmoothingTypes::Linear > >::applyGain(), SmoothedValue< Type >::getNextValue(), dsp::Gain< FloatType >::isSmoothing(), and dsp::Oscillator< SampleType >::process().
|
noexcept |
Returns the current value of the ramp.
|
noexcept |
Returns the target value towards which the smoothed value is currently moving.
Referenced by dsp::Bias< FloatType >::getBias(), dsp::Oscillator< SampleType >::getFrequency(), and dsp::Gain< FloatType >::getGainLinear().
| void SmoothedValueBase< SmoothedValueType >::setCurrentAndTargetValue | ( | FloatType | newValue | ) |
Sets the current value and the target value.
| newValue | the new value to take |
Referenced by SmoothedValue< Type >::reset(), dsp::Oscillator< SampleType >::setFrequency(), SmoothedValue< Type >::setTargetValue(), and SmoothedValue< Type >::skip().
|
noexcept |
Applies a smoothed gain to a stream of samples S[i] *= gain.
| samples | Pointer to a raw array of samples |
| numSamples | Length of array of samples |
|
noexcept |
Computes output as a smoothed gain applied to a stream of samples.
Sout[i] = Sin[i] * gain
| samplesOut | A pointer to a raw array of output samples |
| samplesIn | A pointer to a raw array of input samples |
| numSamples | The length of the array of samples |
|
noexcept |
Applies a smoothed gain to a buffer.
|
protected |
Referenced by SmoothedValueBase< SmoothedValue< NumericType, ValueSmoothingTypes::Linear > >::getCurrentValue(), SmoothedValue< Type >::getNextValue(), SmoothedValueBase< SmoothedValue< NumericType, ValueSmoothingTypes::Linear > >::setCurrentAndTargetValue(), SmoothedValue< Type >::setNextValue(), SmoothedValue< Type >::setStepSize(), SmoothedValue< Type >::skip(), SmoothedValue< Type >::skipCurrentValue(), and SmoothedValue< Type >::SmoothedValue().
|
protected |
Referenced by SmoothedValueBase< SmoothedValue< NumericType, ValueSmoothingTypes::Linear > >::applyGain(), SmoothedValue< Type >::getNextValue(), SmoothedValueBase< SmoothedValue< NumericType, ValueSmoothingTypes::Linear > >::getTargetValue(), SmoothedValue< Type >::reset(), SmoothedValueBase< SmoothedValue< NumericType, ValueSmoothingTypes::Linear > >::setCurrentAndTargetValue(), SmoothedValue< Type >::setStepSize(), SmoothedValue< Type >::setTargetValue(), SmoothedValue< Type >::skip(), and SmoothedValue< Type >::SmoothedValue().
|
protected |
Referenced by SmoothedValue< Type >::getNextValue(), SmoothedValueBase< SmoothedValue< NumericType, ValueSmoothingTypes::Linear > >::isSmoothing(), SmoothedValueBase< SmoothedValue< NumericType, ValueSmoothingTypes::Linear > >::setCurrentAndTargetValue(), SmoothedValue< Type >::setStepSize(), SmoothedValue< Type >::setTargetValue(), and SmoothedValue< Type >::skip().
1.8.13