Stem {gm}R Documentation

Create Stem Object

Description

Create a Stem object to modify the stem of some note.

Usage

Stem(direction, i, to = NULL)

Arguments

direction

A single character, which can be "down", "up", "double", and "none". See the MusicXML specification.

i

A single positive integer, which represents the position of the stem in a musical line.

to

Optional. A single character or a single positive integer, which indicates the musical line where to modify the stem.

Value

A list of class Stem.

See Also

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

Examples

# Create a `Stem`
stem <- Stem("none", 1)
stem

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

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

[Package gm version 2.0.0 Index]