The advantage of R over most common sound analysis software (e.g. Raven, SAP, Avisoft) is its higher flexibility, which allows the implementation of custom made analyses that better fit the research questions and the characteristics of the vocalizations. However, this requires some proficiency in R coding that may dissuade beginners. Hopefully the codes I make available here will encourage bioacousticians to take advantage of this powerful tool.

Most of the tools I have developed for acoustic analysis are now available in the package warbleR. I will also post R scripts to detail the usage of new addtions to this package. Check out the article describing warbleR. Please cite this paper when using any of the package functions.

Sound analysis in R has been made possible owing to the awesome package seewave. Take a look at seewave’s website to learn more about its different tools. I will also post code containing functions from the packages monitoR and tuneR.


Evaluating group acoustic signatures using cross-correlation

Social learning is often diagnosed by mapping the geographic variation of behavior. Behavioral variation at a small geographical scale that shows both sharp differences among localities and consistency within localities is indicative of social learning of local traditions. This pattern translates into a pretty straightforward statistical hypothesis: the behavior is... [Read More]

Working with higher structural levels in vocal signals

Animal vocalizations can be hierarchically structured: elements group together in syllables, syllables in songs, songs in bouts and so on. Many important biological patterns of vocal variation are better described at higher structural levels, so we are often interested in characterizing vocalizations at those levels. There are several tools in... [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... [Read More]

Potential issues of the 'spectral parameters/PCA' approach

Somehow measuring a bunch of spectral/temporal parameters and then reducing its dimensionality using principal component analysis has become the standard procedure when looking at variation in signal structure (i.e. measuring acoustic space), particularly in behavioral ecology and comparative bioacoustics. In most cases the approach is used without any kind of... [Read More]

Frequency range detection from spectrum

We are often interested in getting the frequency range of acoustic signals, either because we have specific predictions about its variation or simply because we want to measure other stuff within that range. Measuring frequency range is typically done by drawing boxes in Raven/Avisoft/Syrinx. An alternative way, and potentially less... [Read More]

Tracking frequency contours when dominant frequency jumps across harmonics

When tracking dominant frequency in order to obtain a frequency contour most algorithms rely on getting the highest amplitude frequency (i.e. dominant frequency) at each time window. This method, however, can be problematic when the highest amplitude is found at different harmonics in different time windows. Here, I demonstrate how... [Read More]

Simulating animal vocalizations

This post shows how to simulate animal vocalizations using the new warbleR function sim_songs. The function allows users to create song with several sub-units and harmonics, which are return as a wave object in the R environment. This can have several applications, from simulating song evolution to testing the efficacy... [Read More]