Notehead {gm}R Documentation

Create Notehead Object

Description

Create a Notehead object to customize the appearance of a note's head.

Usage

Notehead(
  i,
  j = NULL,
  to = NULL,
  shape = NULL,
  color = NULL,
  filled = NULL,
  bracket = NULL
)

Arguments

i

A single positive integer, which represents the position of the note in a musical line.

j

Optional. A single positive integer, which represents the position of the note in a chord.

to

Optional. A single character or a single positive integer, which indicates the musical line where to apply the Notehead.

shape

Optional. A single character which represents the shape of the note's head. See the MusicXML specification for all shapes. Unfortunately, not all shapes are supported in MuseScore.

color

Optional. A single character which represents the color of the note's head. It must be in the hexadecimal RGB or ARGB format.

filled

Optional. A single logical, which indicates whether the note's head is filled or hollow.

bracket

Optional. A single logical, which indicates whether the note's head is enclosed in brackets.

Value

A list of class Notehead.

See Also

+.Music() for adding a Notehead to a Music object.

Examples

# Create a `Notehead`
notehead <- Notehead(1, shape = "diamond", color = "#800080")
notehead

# Add it to a `Music`
music <- Music() + Meter(4, 4) + Line(c("C4", "D4")) + notehead
music

# Generate the music score
if (interactive()) {
  show(music)
}

[Package gm version 2.0.0 Index]