View source: R/5-export-music.R
export | R Documentation |
Music
ObjectExport a Music
object to a file format such as PNG or MP3.
export(x, ...)
## S3 method for class 'Music'
export(x, path, musescore = NULL, ...)
x |
A |
... |
Optional arguments to |
path |
A single character, which specifies the output file path.
For example, |
musescore |
Optional. A character vector, which represents the command line options passed to MuseScore. See MuseScore command line usage for details. |
Supported file extensions:
flac
metajson
mid
midi
mlog
mp3
mpos
mscx
mscz
musicxml
mxl
ogg
png
spos
svg
wav
xml
An invisible NULL
. A file is generated in the specified path.
if (interactive()) {
music <- Music() + Meter(4, 4) + Line("C4")
export(music, tempfile(fileext = ".mp3"), "-r 200 -b 520")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.