show {gm}R Documentation

Show Music Object

Description

Display a Music object as a music score or audio file.

Usage

show(x, to, musescore)

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

Arguments

x

A Music object.

to

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().

musescore

Optional. A character vector, which represents the command line options passed to MuseScore. See MuseScore command line usage for details.

Details

This function works in

Value

An invisible NULL. A music score or audio file will be displayed.

Examples

if (interactive()) {
  music <- Music() + Meter(4, 4) + Line("C4")
  show(music, musescore = "-r 800 -T 5")
}

[Package gm version 2.0.0 Index]