Pedal: Create 'Pedal' Object

View source: R/1-construct-pedal.R

PedalR 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)
}

flujoo/gm documentation built on July 12, 2024, 4:56 p.m.