Pedal {gm}R Documentation

Create Pedal Object

Description

Create a Pedal object to represent piano sustain pedal marks.

Usage

Pedal(i, j, to = NULL)

Arguments

i, j

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

to

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

Value

A list of class Pedal.

See Also

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

Examples

# Create a `Pedal`
pedal <- Pedal(1, 3)
pedal

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

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

[Package gm version 2.0.0 Index]