dfDTW calculates acoustic dissimilarity of dominant frequency contours using dynamic
time warping. Internally it applies the dtwDist function from the dtw package.dfDTW(X, wl = 512, length.out = 20, wn = "hanning", ovlp = 70, bp = c(0, 22),
threshold = 5, img = TRUE, parallel = 1, path = NULL, img.suffix = "dfDTW", pb = TRUE,
clip.edges = TRUE, window.type = "none", open.end = FALSE, scale = FALSE, ...)ftwindow for more options.spectro. Default is 70.FALSE, image files are not produced. Default is TRUE.NULL (default) then the current working directory is used.NULL.TRUE. Note that progress bar is only used
when parallel = 1.TRUE (default) this edges will be excluded and signal contour will be calculated on the
remainging values. Note that DTW cannot be applied if missing values (e.i. when amplitude is not detected).TRUE dominant frequency values are z-transformed using the scale function, which "ignores" differences in absolute frequencies between the signals in order to focus the
comparison in the frequency contour, regardless of the pitch of signals. Default is TRUE.trackfreqs for customizing
graphical output.FALSE it also produces image files with the spectrograms of the signals listed in the
input data frame showing the location of the dominant frequencies.approx function to interpolate values between dominant
frequency measures. If 'img' is TRUE the function also produces image files
with the spectrograms of the signals listed in the input data frame showing the
location of the dominant frequencies.specreator for creating spectrograms from selections,
snrspecs for creating spectrograms to
optimize noise margins used in sig2noise and dfts, ffts, ffDTW for frequency contour overlaid spectrograms.
https://marce10.github.io/2016-09-12-Similarity_of_acoustic_signals_with_dynamic_time_warping_(DTW)/ Other spectrogram.creators: dfts,
ffDTW, ffts,
snrspecs, sp.en.ts,
specreator, trackfreqs## Not run: ------------------------------------
# # set the temp directory
# setwd(tempdir())
#
# #load data
# data(list = c("Phae.long1", "Phae.long2","selec.table"))
# writeWave(Phae.long2, "Phae.long2.wav") #save sound files
# writeWave(Phae.long1, "Phae.long1.wav")
#
# # run function
# dfDTW(selec.table, length.out = 30, flim = c(1, 12), bp = c(2, 9), wl = 300)
#
## ---------------------------------------------
Run the code above in your browser using DataLab