applyDisto | R Documentation |
Apply a distortion to a sound sample
applyDisto(sample, type = c("clip", "tanh"), level = 2, ..., rescale = FALSE)
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] |
The distorted sound sample
# example code
raw=oscillator(freq=110,duration=0.5)
plot(raw)
dist=applyDisto(raw,type='tanh',level=5)
plot(dist)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.