module RemiAudio::DSP::SoftClipping

Overview

The Soft Clipping module implements a type of limiter with a type of distortion that tends to be more pleasant to the ears than straight clipping. This will round off the peaks of the audio signal that pass above the maximum amplitude rather than cut them off flat.

A simplified diagram can be found here.

Defined in:

remiaudio/dsp/softclipping.cr

Class Method Summary

Class Method Detail

def self.process(maxAmplitude : Float32 | Float64, blockLeft : Array(Float64) | Slice(Float64), blockRight : Array(Float64) | Slice(Float64)) : Nil #

Applies soft clipping to the two blocks of audio.

DEPRECATED Use the new SoftClipper class


[View source]
def self.process(maxAmplitude : Float32 | Float64, sample : Float64) : Float64 #

Applies soft clipping to a single sample.

DEPRECATED Use the new SoftClipper class


[View source]
def self.process(maxAmplitude : Float32 | Float64, sample : Float32) : Float32 #

Applies soft clipping to a single sample.

DEPRECATED Use the new SoftClipper class


[View source]