export {gm} | R Documentation |
Export Music
Object
Description
Export a Music
object to a file format such as PNG or MP3.
Usage
export(x, ...)
## S3 method for class 'Music'
export(x, path, musescore = NULL, ...)
Arguments
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. |
Details
Supported file extensions:
flac
metajson
mid
midi
mlog
mp3
mpos
mscx
mscz
musicxml
mxl
ogg
pdf
png
spos
svg
wav
xml
Value
An invisible NULL
. A file is generated in the specified path.
Examples
if (interactive()) {
music <- Music() + Meter(4, 4) + Line("C4")
export(music, tempfile(fileext = ".mp3"), "-r 200 -b 520")
}
[Package gm version 2.0.0 Index]