powered by
This function deletes all signal which amplitude is below a selected threshold.
afilter(wave, f, channel = 1, threshold = 5, plot = TRUE, listen = FALSE, output = "matrix", ...)
If plot is FALSE, a new wave is returned. The class of the returned object is set with the argument output.
plot
FALSE
output
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).
amplitude threshold (in %).
logical, if TRUE plots the new oscillogram (by default TRUE).
TRUE
if TRUE the new sound is played back.
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
Jerome Sueur sueur@mnhn.fr
The threshold value is in % relative to the maximal value of wave. Signal inferior to this value is clipped.
threshold
data(orni) op<-par(mfrow=c(2,1)) afilter(orni,f=22050) title(main = "threshold level = 5") afilter(orni,f=22050,threshold=0.5,colwave="blue") title(main = "threshold level = 0.5") par(op)
Run the code above in your browser using DataLab