powered by
Apply a distortion to a sound sample
applyDisto(sample, type = c("clip", "tanh"), level = 2, ..., rescale = FALSE)
The distorted sound sample
soundSample object, input sample
Character string, the distortion type
Numeric >0, distortion level
other parameters passed to the distortion transfer function
Logical. If TRUE, the soundSample wave is rescaled to [-1,1]
# example code raw=oscillator(freq=110,duration=0.5) plot(raw) dist=applyDisto(raw,type='tanh',level=5) plot(dist)
Run the code above in your browser using DataLab