Learn R Programming

phonTools (version 0.1-6)

snipsound: Snip a Sound Object

Description

Select a subsection of a sound object

Usage

snipsound (sound, output = TRUE)

Arguments

sound
A 'sound' object to be truncated.
output
If TRUE, the snipped 'sound' object is returned.

Value

  • A 'sound' object which interacts with several functions included in this package.

Details

The input 'sound' object is plotted and the user must click on two points on the plot. A new 'sound' object is then created and plotted, containing only the samples in between the two designated points. The location of the click is accurate to within 1/1000 of the duration of the sound.

Examples

Run this code
data (sound)

## the example below is commented because examples cannot 
## require user interaction. simply uncomment the lines below
## and select two points on the plot. 
# clipped = snipsound (sound)
# spectrogram (clipped)
# spectralslice (clipped)

Run the code above in your browser using DataLab