dynaSpec: dynamic spectrograms in R

The R package dynaSpec can now be installed from github. This is a set of tools to generate dynamic spectrogram visualizations in video format. It is still on the making and new visualizations will be available soon. FFMPEG must be installed in order for this package to work. To install dynaSpec from github you will need the R package devtools: # From github devtools::install_github("maRce10/dynaSpec") #load package library(dynaSpec) Installation of external dependencies can be tricky on operating systems other than Linux. [Read More]

Spectrograms on trees

This post describes the new warbleR function phylo_spectro. The function adds spectrograms of sounds annotated in a selection table (‘X argument) onto the tips of a tree (of class ‘phylo’). The ’tip.label’ column in ‘X’ is used to match spectrograms and tree tips. The function uses internally the plot.phylo function from the ape package to plot the tree and warbleR’s specreator function to create the spectrograms. Arguments for both of these functions can be provided for further customization. [Read More]

Acoustic space scatter plot

Someone asked me for the code to make figure 3 in the Methods in Ecology and Evolution paper describing warbleR. So, here it is. The figure was made in part by my collaborator Grace Smith-Vidaurre, so thanks to Grace for sharing. The figure shows the grouping of long-billed hermit songs in the acoustic space based on similarity of dominant frequency contours. Similarity was assessed using dynamic time warping. The scatterplot is based on the two axes from a classic multidimensional scaling. [Read More]

Creating song catalogs

When looking at geographic variation of songs we usually want to compare the spectrograms from different individuals and sites. This can be challenging when working with large numbers of signals, individuals and/or sites. The new warbleR function catalog aims to simplify this task. This is how it works: The function plots a matrix of spectrograms from signals listed in a selection table (a data frame similar to the example data frame selec. [Read More]

Creating dynamic spectrograms (videos)

This code creates a video with a spectrogram scrolling from right to left. The spectrogram is synchronized with the audio. This is done by creating single image files for each of the movie frames and then putting them together in .mp4 video format. You will need the ffmpeg UNIX application to be able to run the code (only works for OSX and Linux). First load the warbleR package require("warbleR") Download and read the example sound file (long-billed hermit song) [Read More]

Pdf files with spectrograms of full recordings

The warbleR function lspec produces image files with spectrograms of whole recordings split into multiple rows. For a long recording several image files will be produced, which could be inconvenient when dealing with many long recordings. I recently added a new function lspec2pdf that combines lspec images in .jpeg format into a single pdf file (available in warbleR 1.1.5 or higher). You need warbleR version 1.1.5 or higher to be able to run the code (currently you have to download it from github using the package devtools). [Read More]

Updates on catalog function

A [previous post]https://marce10.github.io/coded_bioacoustics/post/2017-03-17-creating_song_catalogs/) described the new function catalog. Here are a few updates on catalog based on suggestions from warbleR users. To be able to run the code you need warbleR 1.1.9 or higher, which hasn’t been released on CRAN and it’s only available in the most recent development version on github. It can be installed using the devtools package as follows # install devtools if is not yet installed if(! [Read More]