leonawicz / tabr

R package: tabr. Notation-based and tidy music data analysis and transcription.
https://leonawicz.github.io/tabr/
Other
126 stars 10 forks source link

`lyrics` class object #26

Closed leonawicz closed 5 years ago

leonawicz commented 5 years ago

Just a heads up note to say that I am considering adding a simple lyrics class that corresponds to noteworthy and noteinfo in structure and behavior. It would serve the purpose of mapping content from an arbitrary character vector by timestep. The goal would be to potentially pass this object to lilypond or related render_* wrapper function so that arbitrary lyrics text could be attached at specific timesteps as part of the lyrics line in LilyPond output.

This would also remain distinct from notate, which attaches different text to individual timesteps and is done so as part of noteinfo.

leonawicz commented 5 years ago

Initial version of lyrics class and associated functions is available. Generic methods have also been implemented. Lyrics support has been built into the music class and associated functions and methods.

leonawicz commented 5 years ago

A lyrics object can now be added to track to me combined with an existing phrase object so that a lyrics line can be placed in the sheet music output aligned with the notes on the staff.

Or, preferably, if a lyrics object is included when defining a music object, the render_music_* and plot_music_* functions will achieve the same, but will also automatically handle lyric removal at rest timesteps (necessary to work with LilyPond's method of skipping rests when engraving lyrics).

A lyrics color option has been added, e.g., render_music(..., colors = list(lyrics = "red")).