play | R Documentation |
Renders a ProTracker module as audio::audioSample()
and plays it.
## S3 method for class 'pt2mod'
play(x, duration = NA, options = pt2_render_options(), position = 0L, ...)
x |
Object to be played. |
duration |
Duration of the rendered output in seconds. When set to |
options |
A list of options used for rendering the audio. Use
|
position |
Starting position in the pattern sequence table ( |
... |
Arguments passed to |
Returns an [audio::
$.audioInstance]
object which
allows you to control the playback (pause, resume, rewind).
Pepijn de Vries
## Not run:
mod <- pt2_read_mod(pt2_demo())
## ctrl will contain the audioInstance that will let you control the audio playback:
ctrl <- play(mod)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.