Hairpin {gm}R Documentation

Create Hairpin Object

Description

Create a Hairpin object to represent a crescendo or diminuendo symbol.

Usage

Hairpin(symbol, i, j, to = NULL, above = NULL)

Arguments

symbol

A single character, which can be "<" or ">". They represent crescendo and diminuendo respectively.

i, j

A single positive integer. They indicate the start and end position of the Hairpin object in a musical line.

to

Optional. A single character or a single positive integer, which indicates the musical line where to add the Hairpin object.

above

Optional. A single logical, which indicates whether the Hairpin object should appear above or below the staff.

Value

A list of class Hairpin.

See Also

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

Examples

# Create a crescendo
crescendo <- Hairpin("<", 1, 3)
crescendo

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

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

[Package gm version 2.0.0 Index]