Display a Music object as a music score or audio file.
show(x, to, musescore)
# S3 method for Music
show(x, to = NULL, musescore = NULL)A Music object.
Optional. A character vector, which can be "score",
"audio", or both. It specifies the output format. By default, both
are displayed. You can change the default behavior by setting the
gm.show_to option with options().
Optional. A character vector, which represents the command line options passed to MuseScore. See MuseScore command line usage for details.
An invisible NULL. A music score or audio file will be
displayed.
This function works in
RStudio
R Markdown files
Jupyter Notebooks
Shiny applications
R.app GUI
if (interactive()) {
music <- Music() + Meter(4, 4) + Line("C4")
show(music, musescore = "-r 800 -T 5")
}