Learn R Programming

phonTools (version 0.2-2.2)

selectslice: Select Slices

Description

Select spectral slices from a spectrogram.

Usage

selectslice (specobject, n = 1, plot = TRUE, ...)

Value

A dataframe with one column for each spectral slice selected. Row names indicate frequencies, column names indicate times in milliseconds. Values are decibels below peak.

Arguments

specobject

A 'spectrogram' object created with the spectrogram() function included in this package.

n

The number of desired slices.

plot

If FALSE, the spectrogram is not plotted.

...

Additional arguments are passed to the internal call of plot.spectrogram().

Author

Santiago Barreda <sbarreda@ucdavis.edu>

Details

This function allows the user to select a given number of time points on a spectrogram, and to retrieve spectral slices at those time points. The spectrogram object is plotted, and the user must click on the spectrogram a given number of times at the desired points. The analysis parameters of the slices will reflect the parameters used when creating the spectrogram. Setting the 'plot' parameter to FALSE is useful if you want one set of analysis parameters for the visually presented spectrogram and another set for the spectral slices.

Examples

Run this code

## uncomment to run

# sound = vowelsynth ()
# spect = spectrogram (sound)
# slices = selectslice (spect, n = 3)

Run the code above in your browser using DataLab