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 |
to |
Optional. A single character or a single positive integer,
which indicates the musical line where to add the |
verse |
Optional. A positive integer which indicates the verse
where to add the |
Details
You can use "-"
and "_"
in argument text
to create the following
structures:
-
Syllable: for example, with
Lyric("mo-", 1)
andLyric("-ther", 3)
, the two syllables of mother are added to the first and third notes, with a hyphen placed on the second note. -
Melisma: for example, with
Lyric("love_", 1)
andLyric("_", 3)
, the word love is added to the first note, followed by an underscore line which extends over the second and third notes. -
Elision: for example, with
Lyric("my_love", 1)
, words my and love are both added to the first note, connected by an elision slur.
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)
}