listen {seewave}R Documentation

Play a sound wave

Description

Play a sound wave

Usage

listen(wave, f, from = NULL, to = NULL, choose = FALSE)

Arguments

wave a vector, a matrix (first column), an object of class ts, Sample (left channel), or Wave (left channel).
f sampling frequency of wave (in Hz). Does not need to be specified if wave is an object of class ts, Sample, or Wave.
from start of play (in s).
to end of play (in s).
choose logical, if TRUE start (=from) and end (=to) points can be graphically chosen with a cursor on the oscillogram.

Note

This function is based on play but allows to read one-colum matrix, data.frame and Sample objects.

Author(s)

Jerome Sueur sueur@mnhn.fr but the original play function is by Matthias Heymann (package sound).

See Also

play

Examples

data(tico)
listen(tico,f=22050)
listen(tico,f=22050,from=0.5,to=1.5)
listen(noise(d=1,f=8000,Sample=TRUE))
# change f to play the sound a different speed
data(sheep)
# normal
listen(sheep,f=8000)
# two times faster
listen(sheep,f=8000*2)
# two times slower
listen(sheep,f=8000/2)

[Package seewave version 1.5.4 Index]