|
LMMS
|
#include <juce_LogRampedValue.h>
Public Member Functions | |
| LogRampedValue ()=default | |
| LogRampedValue (FloatType initialValue) noexcept | |
| void | setLogParameters (FloatType midPointAmplitudedB, bool rateOfChangeShouldIncrease) noexcept |
| void | reset (double sampleRate, double rampLengthInSeconds) noexcept |
| void | reset (int numSteps) noexcept |
| void | setTargetValue (FloatType newValue) noexcept |
| FloatType | getNextValue () noexcept |
| FloatType | skip (int numSamples) noexcept |
| Public Member Functions inherited from juce::SmoothedValueBase< LogRampedValue< FloatType > > | |
| SmoothedValueBase ()=default | |
| bool | isSmoothing () const noexcept |
| FloatType | getCurrentValue () const noexcept |
| FloatType | getTargetValue () const noexcept |
| void | setCurrentAndTargetValue (FloatType newValue) |
| void | applyGain (FloatType *samples, int numSamples) noexcept |
Private Member Functions | |
| void | updateRampParameters () |
Private Attributes | |
| bool | increasingRateOfChange = true |
| FloatType | B = Decibels::decibelsToGain ((FloatType) -40) |
| int | stepsToTarget = 0 |
| FloatType | temp = 0 |
| FloatType | source = 0 |
| FloatType | r = 0 |
| FloatType | d = 1 |
Additional Inherited Members | |
| Public Types inherited from juce::SmoothedValueBase< LogRampedValue< FloatType > > | |
| using | FloatType |
| Protected Attributes inherited from juce::SmoothedValueBase< LogRampedValue< FloatType > > | |
| FloatType | currentValue |
| FloatType | target |
| int | countdown |
Utility class for logarithmically smoothed linear values.
Logarithmically smoothed values can be more relevant than linear ones for specific cases such as algorithm change smoothing, using two of them in opposite directions.
The gradient of the logarithmic/exponential slope can be configured by calling LogRampedValue::setLogParameters.
@tags{DSP}
|
default |
Constructor.
|
inlinenoexcept |
Constructor.
|
inlinenoexcept |
Compute the next value.
|
inlinenoexcept |
Reset to a new sample rate and ramp length.
| sampleRate | The sample rate |
| rampLengthInSeconds | The duration of the ramp in seconds |
|
inlinenoexcept |
Set a new ramp length directly in samples.
| numSteps | The number of samples over which the ramp should be active |
|
inlinenoexcept |
Sets the behaviour of the log ramp.
| midPointAmplitudedB | Sets the amplitude of the mid point in decibels, with the target value at 0 dB and the initial value at -inf dB |
| rateOfChangeShouldIncrease | If true then the ramp starts shallow and gets progressively steeper, if false then the ramp is initially steep and flattens out as you approach the target value |
|
inlinenoexcept |
Set a new target value.
| newValue | The new target value |
|
inlinenoexcept |
Skip the next numSamples samples.
This is identical to calling getNextValue numSamples times.
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |