OpenShot Audio Library | OpenShotAudio: juce::dsp::LogRampedValue< FloatType > Class Template Reference

OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::dsp::LogRampedValue< FloatType > Class Template Reference

`#include <juce_LogRampedValue.h>`

Inheritance diagram for juce::dsp::LogRampedValue< FloatType >:

## 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
void | applyGain (FloatType *samplesOut, const FloatType *samplesIn, int numSamples) noexcept
void | applyGain (AudioBuffer< FloatType > &buffer, int numSamples) noexcept

## Additional Inherited Members
Public Types inherited from juce::SmoothedValueBase< LogRampedValue< FloatType > >
using | FloatType = typename FloatTypeHelper< LogRampedValue< FloatType > >::Type
Protected Attributes inherited from juce::SmoothedValueBase< LogRampedValue< FloatType > >
FloatType | currentValue
FloatType | target
int | countdown

## Detailed Description

template<typename FloatType>
class juce::dsp::LogRampedValue< FloatType >

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.

See also
  SmoothedValue

Definition at line 48 of file juce_LogRampedValue.h.

## Constructor & Destructor Documentation

## ◆ LogRampedValue() [1/2]

template<typename FloatType >

juce::dsp::LogRampedValue< FloatType >::LogRampedValue | ( |  | ) |
| default

Constructor.

## ◆ LogRampedValue() [2/2]

template<typename FloatType >

juce::dsp::LogRampedValue< FloatType >::LogRampedValue | ( | FloatType | initialValue | ) |
| inlinenoexcept

Constructor.

Definition at line 56 of file juce_LogRampedValue.h.

## Member Function Documentation

## ◆ getNextValue()

template<typename FloatType >

FloatType juce::dsp::LogRampedValue< FloatType >::getNextValue | ( |  | ) |
| inlinenoexcept

Compute the next value.

Returns
  Smoothed value

Definition at line 132 of file juce_LogRampedValue.h.

## ◆ reset() [1/2]

template<typename FloatType >

void juce::dsp::LogRampedValue< FloatType >::reset | ( | double | sampleRate,
|  | double | rampLengthInSeconds
| ) |  |
| inlinenoexcept

Reset to a new sample rate and ramp length.

Parameters

  sampleRate | The sample rate
  rampLengthInSeconds | The duration of the ramp in seconds

Definition at line 87 of file juce_LogRampedValue.h.

Referenced by juce::dsp::LogRampedValue< FloatType >::reset().

## ◆ reset() [2/2]

template<typename FloatType >

void juce::dsp::LogRampedValue< FloatType >::reset | ( | int | numSteps | ) |
| inlinenoexcept

Set a new ramp length directly in samples.

Parameters

  numSteps | The number of samples over which the ramp should be active

Definition at line 96 of file juce_LogRampedValue.h.

## ◆ setLogParameters()

template<typename FloatType >

void juce::dsp::LogRampedValue< FloatType >::setLogParameters | ( | FloatType | midPointAmplitudedB,
|  | bool | rateOfChangeShouldIncrease
| ) |  |
| inlinenoexcept

Sets the behaviour of the log ramp.

Parameters

  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

Definition at line 74 of file juce_LogRampedValue.h.

## ◆ setTargetValue()

template<typename FloatType >

void juce::dsp::LogRampedValue< FloatType >::setTargetValue | ( | FloatType | newValue | ) |
| inlinenoexcept

Set a new target value.

Parameters

  newValue | The new target value

Definition at line 110 of file juce_LogRampedValue.h.

## ◆ skip()

template<typename FloatType >

FloatType juce::dsp::LogRampedValue< FloatType >::skip | ( | int | numSamples | ) |
| inlinenoexcept

Skip the next numSamples samples.

This is identical to calling getNextValue numSamples times.

See also
  getNextValue

Definition at line 151 of file juce_LogRampedValue.h.

The documentation for this class was generated from the following file:

- juce_LogRampedValue.h