module RemiAudio::DSP::LPFilter

Direct including types

Defined in:

remiaudio/dsp/lpfilter.cr

Constant Summary

CUTOFF_MAX = 22000.0

The maximum cutoff frequency.

CUTOFF_MIN = 40.0

The minimum cutoff frequency.

ENABLE_AT = CUTOFF_MAX - 1.0

If the cutoff is set above this, the filter is automatically disabled.

This is above human hearing limits.

RESONANCE_MAX = 1.0

The maximum resonance amount.

RESONANCE_MIN = 0.0

The mininum resonance amount.

Class Method Summary

Instance Method Summary

Class Method Detail

def self.midiToCutoff(val : UInt8) : Float64 #

Converts a MIDI value (0-127) to a cutoff frequency in hertz.


[View source]

Instance Method Detail

def active=(active : Bool) #

[View source]
def active? : Bool #

[View source]
def cutoff : Float64 #

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

[View source]
def invSampleRate : Float64 #

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

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

[View source]
abstract def reset : Nil #

[View source]
def resonance : Float64 #

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

[View source]
def sampleRate : Float64 #

[View source]
def sampleRate=(val : Int | Float) : Nil #

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

[View source]
abstract def updateCoefficients : Nil #

[View source]