View source: R/1-construct-lyric.R
Lyric | R Documentation |
Lyric
ObjectCreate a Lyric
object to represent a unit of lyrics.
Lyric(text, i, to = NULL, verse = NULL)
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 |
You can use "-"
and "_"
in argument text
to create the following
structures:
Syllable:
for example, with Lyric("mo-", 1)
and Lyric("-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)
and Lyric("_", 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.
A list of class Lyric
.
+.Music()
for adding a Lyric
to a Music
object.
# 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.