show {gm} | R Documentation |
Show Object
Description
Show an object as musical score or audio file.
Usage
show(x, to)
## S3 method for class 'Music'
show(x, to = 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". |
Value
Invisible NULL
.
The generated musical score or audio file is
showed in Viewer panel if
show
is called in RStudio,included in generated HTML file if called in R Markdown document,
showed in output cell if called in R Jupyter Notebook, and
showed in user's browser if called in a normal R console.
Methods (by class)
-
Music
: show aMusic
object.
Examples
if (interactive()) {
m <- Music() + Meter(4, 4) + Line(list("C4"), list(4))
show(m, c("score", "audio"))
}
[Package gm version 1.0.2 Index]