Description Usage Arguments Details Value See Also Examples
This allows you to get set the method used to play the result of your sonification. These functions are probably only necessary on Linux, but work on Linux, OS X, and Windows.
1 2 3 |
newPlayer |
A character string; either
|
By default on Windows and OS X, audio is played with the
play
function from the audio package. So
getPlayer()
will return "audio::play"
.
However, audio's play
function does not work
well on Linux–for instance, it seems to cause
segmentation faults–so the default is
aplay, which
comes along with many Linux distributions. If you want to
use another player, you can use setPlayer()
to
specify an external wav file player. Then, when
print
-ing a sonify
object, playitbyr
will render to a temporary file and then play it using
system2
.
For external players, I recommend a command-line player to avoid having to wait for a GUI to load up.
setPlayer()
is called for its side effect, to set
the option for player
.
getPlayer()
returns the option set by
setPlayer()
.
print.sonify
,
playLastRendering
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.