class RemiAudio::DSP::BiquadLP

Overview

A digital biquad lowpass filter.

This is identical to using a normal BiQuadFilter instance, except it is optimized strictly for lowpass usage and includes the LPFilter module.

Included Modules

Defined in:

remiaudio/dsp/biquadlp.cr

Constructors

Instance Method Summary

Instance methods inherited from module RemiAudio::DSP::LPFilter

active=(active : Bool) active=, active? : Bool active?, cutoff : Float64 cutoff, cutoff=(val : Float64) cutoff=, invSampleRate : Float64 invSampleRate, process(sample : Float32) : Float32
process(sample : Float64) : Float64
process
, reset : Nil reset, resonance : Float64 resonance, resonance=(val : Float64) resonance=, sampleRate : Float64 sampleRate, sampleRate=(val : Int | Float) : Nil sampleRate=, set(newCutoff : Float64, newResonance : Float64) set, updateCoefficients : Nil updateCoefficients

Class methods inherited from module RemiAudio::DSP::LPFilter

midiToCutoff(val : UInt8) : Float64 midiToCutoff

Constructor Detail

def self.new(newSampleRate) #

Creates a new BiQuadFilter.


[View source]

Instance Method Detail

def a1 : Float64 #

[View source]
def a2 : Float64 #

[View source]
def b0 : Float64 #

[View source]
def b1 : Float64 #

[View source]
def b2 : Float64 #

[View source]
def cutoff : Float64 #

The current frequency of the filter.


[View source]
def cutoff=(val : Float64) : Nil #

[View source]
def plot(pt : PlotType, *, coeffsOnly : Bool = false) : String #

Generates a string that can be passed to a program to plot this filter on a graph. The PlotType dictates what kind of script is generated.


[View source]
def process(block : Array(Float32)) : RemiAudio::DSP::BiquadLP #

"Runs" the filter over block.


[View source]
def process(block : Array(Float64)) : RemiAudio::DSP::BiquadLP #

"Runs" the filter over block.


[View source]
def process(block : Slice(Float32)) : RemiAudio::DSP::BiquadLP #

"Runs" the filter over block.


[View source]
def process(block : Slice(Float64)) : RemiAudio::DSP::BiquadLP #

"Runs" the filter over block.


[View source]
def process(sample : Float64) : Float64 #

[View source]
def reset : Nil #

Clears the internal buffer. This does not change the settings of the EQ.


[View source]
def resonance : Float64 #

The current Q value of the filter.


[View source]
def resonance=(val : Float64) : Nil #

[View source]
def set(newCutoff : Float64, newResonance : Float64) #

[View source]
def updateCoefficients : Nil #

[View source]