applyDisto: Distortion effect

View source: R/effects.R

applyDistoR Documentation

Distortion effect

Description

Apply a distortion to a sound sample

Usage

applyDisto(sample, type = c("clip", "tanh"), level = 2, ..., rescale = FALSE)

Arguments

sample

soundSample object, input sample

type

Character string, the distortion type

level

Numeric >0, distortion level

...

other parameters passed to the distortion transfer function

rescale

Logical. If TRUE, the soundSample wave is rescaled to [-1,1]

Value

The distorted sound sample

Examples

# example code
raw=oscillator(freq=110,duration=0.5)
plot(raw)
dist=applyDisto(raw,type='tanh',level=5)
plot(dist)

benRenard/sequenceR documentation built on Jan. 11, 2025, 2:33 a.m.