play plays audio

play(x, ...)
# S3 method for audioSample
play(x, rate, ...)
# S3 method for Sample
play(x, ...) 
# S3 method for default
play(x, rate = 44100, ...)

Arguments

x

data to play

rate

sample rate - it is inferred from the object (where possible) if not specified

...

optional arguments passed to the method specific to the object being played

Value

Returns an audio instance object which can be used to control the playback subsequently.

Examples

# \donttest{
play(sin(1:10000/20))
#> Error in play.default(sin(1:10000/20)): no audio drivers are available
# }