View source: R/1-construct-grace.R
| Grace | R Documentation |
Grace ObjectCreate a Grace object. The Grace object can be added to an existing
note or chord. It will turn the note or chord to a grace note or chord.
Grace(i, to = NULL, slash = NULL)
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 |
slash |
Optional. A single logical, which indicates if there is
a slash symbol on the grace note or chord. The default value is |
A Grace object can not be added to a rest, tuplet, or note or chord
that has a dotted duration. There must be a note or chord after
the note or chord where the Grace object is added.
A list of class Grace.
+.Music() for adding a Grace object to a Music object.
# Create a `Grace`
grace <- Grace(1)
grace
# Add it to a `Music`
music <- Music() + Meter(4, 4) + Line(c("C4", "D4"), c(0.5, 1)) + grace
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.