setenv | R Documentation |
This function sets the amplitude envelope of a time wave to another one
setenv(wave1, wave2, f, channel = c(1,1), envt="hil", msmooth = NULL, ksmooth = NULL,
plot = FALSE, listen = FALSE, output = "matrix", ...)
wave1 |
a first R object. |
wave2 |
a second R object. |
f |
sampling frequency of |
channel |
channel of the R objects, by default left channel (1) for each object. |
envt |
the type of envelope to be used for |
msmooth |
a vector of length 2 to smooth the amplitude envelope of |
ksmooth |
kernel smooth via |
plot |
if |
listen |
if |
output |
character string, the class of the object to return, either
|
... |
other |
wave1
and wave2
can have different duration (length)
Smoothing the envelope with smooth
or ksmooth
can significantly
change the value returned.
If plot
is FALSE
, a new wave is returned. The class
of the returned object is set with the argument output
.
Jerome Sueur sueur@mnhn.fr
drawenv
, env
, synth
data(tico)
a<-synth(d=1,f=22050,cf=1000)
# apply 'tico' ammplitude envelope to 'a' that has a square amplitude envelope
setenv(a,tico,f=22050,plot=TRUE)
# the same but with smoothing the envelope
setenv(a,tico,f=22050,ksmooth=kernel("daniell",50),plot=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.