wavelength 1.0.0
Loading...
Searching...
No Matches
OnePoleFilter Class Reference

Value that moves toward a target by a fixed fraction of the distance at each step. More...

#include <onepolefilter.h>

Public Member Functions

 OnePoleFilter ()
 Construct a filter at 0 that jumps straight to its target.
void SetTarget (float fTarget)
 Set the value the filter moves toward.
float Update ()
 Move the value one step toward the target.
float GetValue () const
float GetTarget () const
float GetCoefficient () const
void SetCoefficient (float fCoefficient)

Detailed Description

Value that moves toward a target by a fixed fraction of the distance at each step.

The RTTI includes the class name. The class is not polymorphic, and the object is 0xc bytes. SynthPS2 smooths the volume of each MIDI channel and the sweep of the software filter with one.

Constructor & Destructor Documentation

◆ OnePoleFilter()

OnePoleFilter::OnePoleFilter ( )
inline

Construct a filter at 0 that jumps straight to its target.

Member Function Documentation

◆ SetTarget()

void OnePoleFilter::SetTarget ( float fTarget)
inline

Set the value the filter moves toward.

Parameters
fTargetThe target.
Ghidra address:
NTSC-U/C: 0x003969a0
Ghidra address:
PAL: 0x00405060

◆ Update()

float OnePoleFilter::Update ( )
inline

Move the value one step toward the target.

Returns
The new value.

◆ GetValue()

float OnePoleFilter::GetValue ( ) const
inline
Returns
The value.

◆ GetTarget()

float OnePoleFilter::GetTarget ( ) const
inline
Returns
The value the filter moves toward.

◆ GetCoefficient()

float OnePoleFilter::GetCoefficient ( ) const
inline
Returns
The fraction of the distance covered at each step.

◆ SetCoefficient()

void OnePoleFilter::SetCoefficient ( float fCoefficient)
inline
Parameters
fCoefficientThe fraction of the distance covered at each step.

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