# space-delimited lyrics; use periods for timesteps with no lyric
x <- "These are the ly- rics . . . to this song"
is_lyrics(x)
lyrical(x)
as_lyrics(x)
# character vector; empty, period or NA for no lyric
x <- c("These", "are", "the", "ly-", "rics",
"", ".", NA, "to", "this", "song") #
as_lyrics(x)
# generate empty lyrics object from noteworthy, noteinfo or music object
notes <- as_noteworthy("c d e d c r*3 e g c'")
x <- lyrics_template(notes)
x
x[1:5] <- strsplit("These are the ly- rics", " ")[[1]]
x[9:11] <- c("to", "this", "song")
x
summary(x)
attributes(x)
Run the code above in your browser using DataLab