Clef {gm} | R Documentation |
Create Clef
Object
Description
Create a Clef
object to represent a clef.
Usage
Clef(sign, line = NULL, octave = NULL, to = NULL, bar = NULL, offset = NULL)
Arguments
sign |
A single character, which can be |
line |
Optional. A single integer, which depends on
|
octave |
Optional. A single integer, which can be
|
to |
Optional. A single character or a single positive integer, which indicates the musical line where to add the clef. |
bar |
Optional. A positive integer, which indicates the number of the measure where to add the clef. By default, the clef will be added at the first measure. |
offset |
Optional. A non-negative number,
which indicates the clef's position in a measure. The default value is |
Details
See Wikipedia for more details.
Value
A list of class Clef
.
See Also
+.Music()
for adding a Clef
to a Music
object.
Examples
# Create a bass clef
clef <- Clef("F")
clef
# Add the clef to a `Music`
music <- Music() + Meter(4, 4) + Line(c("C3", "D3")) + clef
music
# Generate the music score
if (interactive()) {
show(music)
}