Create an Articulation
object to represent an articulation mark.
Articulation(name, i, to = NULL)
A single character, which represents the name or symbol
of the articulation. For example, to create a staccato dot, name
can
be "staccato"
or "."
, which looks like a staccato. See the
Details section for supported articulations.
A single positive integer, which represents the position of the articulation in a musical line.
Optional. A single character or a single positive integer, which indicates the musical line where to add the articulation.
A list of class Articulation
.
Supported articulation names and symbols:
"accent" or ">"
"staccato" or "."
"staccatissimo" or "'"
"tenuto" or "-"
"tenuto-staccato", "detached-legato" or "-."
"marcato", "strong-accent" or "^"
"scoop"
"plop"
"doit"
"fall" or "falloff"
"stress" or ","
"unstress" or "u"
"soft accent", "soft-accent" or "<>"
The names are from the MusicXML specification and MuseScore.
+.Music()
for adding an Articulation
to
a Music
object.
# Create a staccato
staccato <- Articulation(".", 1)
staccato
#> Articulation
#>
#> * staccato
#> * to be added at position 1
# Add it to a `Music`
music <- Music() + Meter(4, 4) + Line(c("C4", "D4")) + staccato
music
#> Music
#>
#> $meters
#> # A tibble: 1 × 6
#> bar number unit actual_number actual_unit invisible
#> <int> <int> <int> <int> <int> <lgl>
#> 1 1 4 4 4 4 FALSE
#>
#> $notes
#> # A tibble: 2 × 7
#> line i j pitch midi duration length
#> <int> <int> <int> <chr> <int> <chr> <dbl>
#> 1 1 1 NA C4 60 NA 1
#> 2 1 2 NA D4 62 NA 1
#>
#> $lines
#> # A tibble: 1 × 7
#> part staff voice segment bar offset name
#> <int> <int> <int> <int> <int> <dbl> <chr>
#> 1 1 1 1 1 1 0 NA
#>
#> $articulations
#> # A tibble: 1 × 3
#> line i name
#> <int> <int> <chr>
#> 1 1 1 staccato
#>
# Generate the music score
if (interactive()) {
show(music)
}