pastew {seewave} | R Documentation |
This function pastes a first time wave to a second one. The time wave to be pasted, the time wave to be completed and the resulting time wave can be displayed in a three-frame oscillographic plot.
pastew(wave1, wave2, f, at = "end", choose = FALSE, plot = FALSE, marks = TRUE, Sample = FALSE,...)
wave1 |
data or a Sample object generated loading a wav file
with loadSample (package sound)
describing the time wave to be pasted. |
wave2 |
data or a Sample object generated loading a wav file
with loadSample (package sound)
describing the time wave into which wave1 will be pasted. |
f |
sampling frequency of wave1 and wave2 (in Hz).
Does not need to be specified if wave1 and/or wave2 are/is (a)
Sample object(s). |
at |
wave2 position in seconds where wave1 will be pasted into.
Can be also specified as "start" , "middle" or "end" . |
choose |
logical, if TRUE the point where wave1 will
be pasted into wave2 (=at ) can be graphically chosen with a cursor. |
plot |
logical, if TRUE returns an oscillographic plot of
wave1 , wave2 and wave1 + wave2 (by default FALSE ). |
marks |
logical, if TRUE shows where wave1 has been pasted (by default TRUE ). |
Sample |
if TRUE and plot is FALSE
returns an object of class Sample |
... |
other oscillo graphical parameters. |
If plot
is TRUE
returns a two-frame plot with three waves:
(1) the wave to be pasted (wave1
),
(2) the wave to be completed (wave2
),
(3) the resulting wave.
If plot
is FALSE
, a new wave is returned as a one-column matrix
or as a Sample
object if Sample
is TRUE
.
Jerome Sueur sueur@mnhn.fr
oscillo
, addsilw
, cutw
,
deletew
, fadew
, mutew
, revw
, repw
, zapsilw
data(tico) # double a data set describing a bird song a<-pastew(tico,tico,f=22050) oscillo(a,f=22050) # a direct way to see what has been pasted pastew(tico,tico,f=22050,plot=TRUE) # cut a section and then paste it at the beginning a<-cutw(tico, f=22050, from=0.5, to=0.9) pastew(a,tico,f=22050,at="start",plot=TRUE) # or paste it at a specific location pastew(a,tico,f=22050,at=1.4,plot=TRUE)