Signalsmith Audio's DSP Library  1.6.0
Useful C++ classes/templates for audio effects
Methods
signalsmith::envelopes::BoxFilter< Sample > Class Template Reference

#include <envelopes.h>

Detailed Description

template<typename Sample = double>
class signalsmith::envelopes::BoxFilter< Sample >

Rectangular moving average filter (FIR).

A filter of length 1 has order 0 (i.e. does nothing).

Methods

 BoxFilter (int maxLength)
 
void resize (int maxLength)
 Sets the maximum size (and current size, and resets) More...
 
void set (int length)
 Sets the current size (expanding/allocating only if needed) More...
 
void reset (Sample fill=Sample())
 Resets (with an optional "fill" value) More...
 
Sample operator() (Sample v)
 

Method Details

◆ reset()

template<typename Sample = double>
void signalsmith::envelopes::BoxFilter< Sample >::reset ( Sample  fill = Sample())
inline

Resets (with an optional "fill" value)

◆ resize()

template<typename Sample = double>
void signalsmith::envelopes::BoxFilter< Sample >::resize ( int  maxLength)
inline

Sets the maximum size (and current size, and resets)

◆ set()

template<typename Sample = double>
void signalsmith::envelopes::BoxFilter< Sample >::set ( int  length)
inline

Sets the current size (expanding/allocating only if needed)