powered by
Export an object to various file formats.
export(x, dir_path, file_name, formats)# S3 method for Music export(x, dir_path, file_name, formats)
# S3 method for Music export(x, dir_path, file_name, formats)
Invisible NULL.
NULL
Files with name file_name and with extensions formats are generated in dir_path.
file_name
formats
dir_path
An object.
A single character which specifies the directory to which to export the object.
A single character which specifies the name of the exported file(s).
A character vector which specifies the file formats. Supported file formats are "mscz", "mscx", "pdf", "png", "svg", "wav", "mp3", "flac", "ogg", "midi", "mid", "musicxml", "mxl", "xml", "metajson", "mlog", "mpos" and "spos".
Music: export a Music object.
Music
if (interactive()) { m <- Music() + Meter(4, 4) + Line(list("C4"), list(4)) export(m, tempdir(), "x", c("mp3", "png")) }
Run the code above in your browser using DataLab