powered by
This function selects and cuts a section of data describing a time wave. Original and cut sections can be plotted as oscillograms for comparison.
cutw(wave, f, channel=1, from = NULL, to = NULL, choose = FALSE, plot = FALSE, marks = TRUE, output="matrix", ...)
an R object.
sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.
wave
channel of the R object, by default left channel (1).
start mark (in s).
end mark (in s).
logical, if TRUE start (=from) and end (=to) points can be graphically chosen with a cursor on the oscillogram.
TRUE
from
to
logical, if TRUE returns an oscillographic plot of original and cut sections (by default FALSE).
FALSE
logical, if TRUE shows the start and end mark on the plot (by default TRUE).
character string, the class of the object to return, either "matrix", "Wave", "Sample", "audioSample" or "ts".
"matrix"
"Wave"
"Sample"
"audioSample"
"ts"
other oscillo graphical parameters.
oscillo
If plot is FALSE, a new wave is returned. The class of the returned object is set with the argument output.
plot
output
If plot is TRUE returns a two-frame plot with both original and cut sections.
oscillo, addsilw,deletew, fadew,mutew,pastew,revw, zapsilw
addsilw
deletew
fadew
mutew
pastew
revw
zapsilw
# NOT RUN { # a 0.4 s section in a bird song data(tico) a<-cutw(tico,f=22050,from=0.5,to=0.9) oscillo(a,22050) # a direct way to see what has been cut cutw(tico,f=22050,from=0.5,to=0.9,plot=TRUE) # }
Run the code above in your browser using DataLab