Lyric {gm}R Documentation

Create Lyric Object

Description

Create a Lyric object to represent a unit of lyrics.

Usage

Lyric(text, i, to = NULL, verse = NULL)

Arguments

text

A single character, which usually represents a word or syllable of the lyrics. See the Details section for more complex usage.

i

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

to

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

verse

Optional. A positive integer which indicates the verse where to add the Lyric. The default value is 1. See the MuseScore handbook .

Details

You can use "-" and "_" in argument text to create the following structures:

Use "\\-" and "\\_" if you want to add hyphens and underscores literally.

Value

A list of class Lyric.

See Also

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

Examples

# Create two syllables
syllable_1 <- Lyric("He-", 1)
syllable_2 <- Lyric("-llo", 3)
syllable_1
syllable_2

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

music

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

[Package gm version 2.0.0 Index]