OpenShot Audio Library | OpenShotAudio 0.4.0

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

`#include <juce_FirstOrderTPTFilter.h>`

## Public Types
using | Type = FirstOrderTPTFilterType

## Public Member Functions
| FirstOrderTPTFilter ()
void | setType (Type newType)
void | setCutoffFrequency (SampleType newFrequencyHz)
Type | getType () const noexcept
SampleType | getCutoffFrequency () const noexcept
void | prepare (const ProcessSpec &spec)
void | reset ()
void | reset (SampleType newValue)
template<typename ProcessContext >
void | process (const ProcessContext &context) noexcept
SampleType | processSample (int channel, SampleType inputValue)
void | snapToZero () noexcept

## Detailed Description

template<typename SampleType>
class juce::dsp::FirstOrderTPTFilter< SampleType >

A first order filter class using the TPT (Topology-Preserving Transform) structure.

This filter can be modulated at high rates without producing audio artefacts. See Vadim Zavalishin's documentation about TPT structures for more information.

Note: Using this class prevents some loud audio artefacts commonly encountered when changing the cutoff frequency using of other filter simulation structures and IIR filter classes. However, this class may still require additional smoothing for cutoff frequency changes.

see StateVariableFilter, IIRFilter, SmoothedValue

Definition at line 53 of file juce_FirstOrderTPTFilter.h.

## Member Typedef Documentation

## ◆ Type

template<typename SampleType >

using juce::dsp::FirstOrderTPTFilter< SampleType >::Type = FirstOrderTPTFilterType

Definition at line 57 of file juce_FirstOrderTPTFilter.h.

## Constructor & Destructor Documentation

## ◆ FirstOrderTPTFilter()

template<typename SampleType >

juce::dsp::FirstOrderTPTFilter< SampleType >::FirstOrderTPTFilter | ( |  | ) |

Constructor.

Definition at line 31 of file juce_FirstOrderTPTFilter.cpp.

## Member Function Documentation

## ◆ getCutoffFrequency()

template<typename SampleType >

SampleType juce::dsp::FirstOrderTPTFilter< SampleType >::getCutoffFrequency | ( |  | ) | const
| inline noexcept

Returns the cutoff frequency of the filter.

Definition at line 78 of file juce_FirstOrderTPTFilter.h.

## ◆ getType()

template<typename SampleType >

Type juce::dsp::FirstOrderTPTFilter< SampleType >::getType | ( |  | ) | const
| inline noexcept

Returns the type of the filter.

Definition at line 75 of file juce_FirstOrderTPTFilter.h.

## ◆ prepare()

template<typename SampleType >

void juce::dsp::FirstOrderTPTFilter< SampleType >::prepare | ( | const ProcessSpec & | spec | ) |

Initialises the filter.

Definition at line 54 of file juce_FirstOrderTPTFilter.cpp.

## ◆ process()

template<typename SampleType >
template<typename ProcessContext >

void juce::dsp::FirstOrderTPTFilter< SampleType >::process | ( | const ProcessContext & | context | ) |
| inline noexcept

Processes the input and output samples supplied in the processing context.

Definition at line 93 of file juce_FirstOrderTPTFilter.h.

## ◆ processSample()

template<typename SampleType >

SampleType juce::dsp::FirstOrderTPTFilter< SampleType >::processSample | ( | int | channel,
|  | SampleType | inputValue )

Processes one sample at a time on a given channel.

Definition at line 80 of file juce_FirstOrderTPTFilter.cpp.

Referenced by juce::dsp::FirstOrderTPTFilter< SampleType >::process().

## ◆ reset() [1/2]

template<typename SampleType >

void juce::dsp::FirstOrderTPTFilter< SampleType >::reset | ( |  | ) |

Resets the internal state variables of the filter.

Definition at line 67 of file juce_FirstOrderTPTFilter.cpp.

## ◆ reset() [2/2]

template<typename SampleType >

void juce::dsp::FirstOrderTPTFilter< SampleType >::reset | ( | SampleType | newValue | ) |

Resets the internal state variables of the filter to a given value.

Definition at line 73 of file juce_FirstOrderTPTFilter.cpp.

## ◆ setCutoffFrequency()

template<typename SampleType >

void juce::dsp::FirstOrderTPTFilter< SampleType >::setCutoffFrequency | ( | SampleType | newFrequencyHz | ) |

Sets the cutoff frequency of the filter.

Parameters

  newFrequencyHz | cutoff frequency in Hz.

Definition at line 44 of file juce_FirstOrderTPTFilter.cpp.

## ◆ setType()

template<typename SampleType >

void juce::dsp::FirstOrderTPTFilter< SampleType >::setType | ( | Type | newType | ) |

Sets the filter type.

Definition at line 38 of file juce_FirstOrderTPTFilter.cpp.

## ◆ snapToZero()

template<typename SampleType >

void juce::dsp::FirstOrderTPTFilter< SampleType >::snapToZero | ( |  | ) |
| noexcept

Ensure that the state variables are rounded to zero if the state variables are denormals. This is only needed if you are doing sample by sample processing.

Definition at line 101 of file juce_FirstOrderTPTFilter.cpp.

Referenced by juce::dsp::FirstOrderTPTFilter< SampleType >::process().

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

- juce_FirstOrderTPTFilter.h
- juce_FirstOrderTPTFilter.cpp