drawenv(wave, f, n = 20, plot = FALSE, listen = FALSE, Sample = FALSE)
TRUE
returns the oscillogram
of the new time wave (by default FALSE
).TRUE
the new sound is played back.TRUE
and plot
is FALSE
returns an object of class Sample
.plot
is FALSE
, a new wave is returned as a one-column matrix
or as a Sample
object if Sample
is TRUE
.wave
.
The user has then to choose points on the positive side of the y-axis (amplitude).
The junction of these points will draw a new amplitude envelope.
The order of points along the x-axis (time) is not important
but points cannot be cancelled. When this process is finished
the new time wave is returned in the console or as an oscillogram
in a second graphics device if plot
is TRUE
.
The function uses locator
.setenv
, env
, synth
a<-synth(d=1,f=22050,cf=1000)
# drawenv(a,f=22050,plot=TRUE)
# choose points on the oscillogram view to draw a new enveloppe
# stop (ESC on Windows; right mouse button on Linux)
# check the result on the second graphics device opened thanks to plot=TRUE
Run the code above in your browser using DataLab