Show an object as musical score or audio file.

show(x, to, musescore)

# S3 method for Music
show(x, to = NULL, musescore = NULL)

Arguments

x

An object.

to

Optional. A character vector which contains "score", "audio" or both, which indicates whether to show the object as musical score or audio file. The default value is "score".

musescore

Optional. A character vector which represents the command line options passed to MuseScore. See MuseScore command line options for details. Also see "Examples" section.

Value

Invisible NULL. The generated musical score or audio file is

  1. showed in Viewer panel if show is called in RStudio,

  2. included in generated HTML file if called in R Markdown document,

  3. showed in output cell if called in R Jupyter Notebook, and

  4. showed in user's browser if called in a normal R console.

Methods (by class)

  • Music: show a Music object.

Examples

if (interactive()) {
  m <- Music() + Meter(4, 4) + Line(list("C4"), list(4))
  show(m, c("score", "audio"), "-r 800 -T 5")
}