# NOT RUN {
data(list = c("Phae.long1", "lbh_selec_table"))
writeWave(Phae.long1, file.path(tempdir(), "Phae.long1.wav")) #save sound files
# subset selection table
st <- lbh_selec_table[lbh_selec_table$sound.files == "Phae.long1.wav",]
# read wave file as an R object
sgnl <- tuneR::readWave(file.path(tempdir(), st$sound.files[1]))
# create color column
st$colors <- c("red2", "blue", "green")
# highlight selections
color_spectro(wave = sgnl, wl = 300, ovlp = 90, flim = c(1, 8.6), collevels = seq(-40, 0, 5),
dB = "B", X = st, col.clm = "colors", base.col = "skyblue", t.mar = 0.07, f.mar = 0.1,
interactive = NULL)
# interactive (selected manually: you have to select them by clicking on the spectrogram)
color_spectro(wave = sgnl, wl = 300, ovlp = 90, flim = c(1, 8.6), collevels = seq(-40, 0, 5),
dB = "B", col.clm = "colors", t.mar = 0.07, f.mar = 1, interactive = 2)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab