Key {gm} | R Documentation |
Create Key
Object
Description
Create a Key
object.
Key
objects represent key signatures.
Usage
Key(key, bar = NULL, to = NULL, scope = NULL)
Arguments
key |
An integer between -7 and 7, which indicates the number of flat or sharp symbols in the key signature. |
bar |
Optional. A positive integer which indicates the number of
the measure into which to insert the |
to |
Optional. A positive integer or a single character which
indicates the |
scope |
Optional. |
Value
A list with class Key
.
See Also
+.Music()
for adding Key
objects to a Music
object.
Examples
# create a Key object
Key(-7)
# insert a Key object into a specific measure
Music() + Key(7, bar = 2)
m <- Music() +
Line(list("E5"), list(1), name = "a") +
Line(list("C4"), list(1), name = "b", as = "staff")
# add a Key to a part
m + Key(2, to = "b")
# add a Key to a staff
m + Key(2, to = "b", scope = "staff")