Learn R Programming

sonicscrewdriver (version 0.0.7)

beatComplexity: Beat spectrum complexity

Description

This function computes a beatSpectrum and calculates some basic measurements of its complexity. The complexity value is calculated as the maximum identified repeating period (in seconds) divided by the number of peaks.

Usage

beatComplexity(wave, plot = FALSE)

Value

A list of the complexity, a vector of the peak periods, and the number of peaks.

Arguments

wave

A Wave object

plot

If TRUE a spectrogram overlaid with the peaks is plotted.

Examples

Run this code
if (FALSE) {
  beatComplexity(sheep)
  beatComplexity(sheep, plot=TRUE)
}

Run the code above in your browser using DataLab