Line {gm} | R Documentation |
Create Line
Object
Description
Create a Line
object to represent a musical line. In gm,
the musical line is the basic unit of music. It appears in different
forms, such as voices, staffs, and parts in music scores.
Usage
Line(
pitches = NULL,
durations = NULL,
tie = NULL,
name = NULL,
as = NULL,
to = NULL,
after = NULL,
bar = NULL,
offset = NULL
)
Arguments
pitches |
A list or vector which represents the pitches
of a musical line. The items of
If not provided, the default value is |
durations |
A list or vector which represents the
durations of a musical line. The items of
If not provided, the default value is 1. |
tie |
Deprecated. Was used to add ties to notes. Please use
|
name |
Optional. A single character which represents the name of the musical line. When adding components to a musical line, it can be referred to by its name. |
as |
Optional. A single character which can be |
to |
Optional. A single character or integer, which represents the name or row number of a reference musical line to which to add the current musical line. By default, the musical line will be added at the end of the score. |
after |
Optional. A single logical which indicates whether to add the
musical line after or before the reference musical line. The default value
is |
bar |
Optional. A positive integer, which indicates the number of the measure where to add the musical line. By default, the musical line will be added at the first measure. |
offset |
Optional. A non-negative number,
which indicates the position in a measure where to add the musical line.
The default value is |
Value
A list of class Line
.
See Also
+.Music()
for adding a musical line to a Music
object.
Examples
# Create a musical line
line <- Line(c("C4", "D4", "E4"))
line
# Add it to a music
music <- Music() + Meter(4, 4) + line
music
# Generate the music score
if (interactive()) {
show(music)
}