Slur {gm}R Documentation

Create Slur Object

Description

Create a Slur object to represent a slur.

Usage

Slur(i, j, to = NULL, to_j = NULL, above = NULL)

Arguments

i, j

A single positive integer. They indicate the start and end positions of the slur.

to, to_j

Optional. A single character or a single positive integer, which indicates the musical line where to add the slur. Specify to_j if the start and end positions are in different musical lines.

above

Optional. A single logical, which indicates whether the slur should appear above or below the staff. By default, the position is decided by MuseScore.

Value

A list of class Slur.

See Also

+.Music() for adding a slur to a Music object.

Examples

# Create a slur
slur <- Slur(1, 3)
slur

# Add it to a `Music`
music <- Music() + Meter(4, 4) + Line(c("C4", "D4", "E4")) + slur
music

# Generate the music score
if (interactive()) {
  show(music)
}

[Package gm version 2.0.0 Index]