Use the command line audio::play
function from the
audio
package to play tuneR::Wave
objects.
Arguments
- wave
An object of class
tuneR::Wave
ortuneR::WaveMC
. Note that the playing routine implemented here can only play stereo waves. Multi-channel waves are therefore converted to stereo before playing.- wait
A
logical
value. When set toTRUE
the playing routine will wait with executing any code until the playing is finished. When set toFALSE
, subsequent R code will be executed while playing.
Details
As the tuneR
package play-function relies on external
players, this method is provided as a convenient approach to play
samples in the R console, using the audio
package. Wave
objects are played at the rate as specified in the object. Of course
you can also play the Wave
objects with the tuneR
implementation
of tuneR::play
, by calling tuneR::play(wave)
.
See also
Other play.audio.routines:
playMod()
,
playSample()