Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DCBlocker Class Reference

DC blocking filter (high-pass filter) to remove DC offset. More...

#include <gin_wtoscillators.h>

Public Member Functions

 DCBlocker ()
 
 ~DCBlocker ()
 
void setSampleRate (float sampleRate_)
 
void setCutoff (float cutoff_)
 
float process (float x)
 
void reset ()
 

Detailed Description

DC blocking filter (high-pass filter) to remove DC offset.

DCBlocker implements a simple first-order high-pass filter to remove DC offset from audio signals. This is useful after certain DSP operations (like waveshaping or oscillators) that may introduce DC bias.

Key Features:

Usage:

DCBlocker blocker;
blocker.setSampleRate(44100.0f);
blocker.setCutoff(10.0f); // Block below 10 Hz
// Per-sample processing
float output = blocker.process(input);
DC blocking filter (high-pass filter) to remove DC offset.
Definition gin_wtoscillators.h:43
void setSampleRate(float sampleRate_)
Definition gin_wtoscillators.h:48
float process(float x)
Definition gin_wtoscillators.h:60
void setCutoff(float cutoff_)
Definition gin_wtoscillators.h:54

Note: This is a per-sample filter. For stereo, use two instances.

See also
WTOscillator

Constructor & Destructor Documentation

◆ DCBlocker()

DCBlocker::DCBlocker ( )

◆ ~DCBlocker()

DCBlocker::~DCBlocker ( )

Member Function Documentation

◆ setSampleRate()

void DCBlocker::setSampleRate ( float  sampleRate_)

◆ setCutoff()

void DCBlocker::setCutoff ( float  cutoff_)

◆ process()

float DCBlocker::process ( float  x)

◆ reset()

void DCBlocker::reset ( )

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