Dynamic {gm}R Documentation

Create Dynamic Object

Description

Create a Dynamic object to represent a dynamic marking.

Usage

Dynamic(marking, i, to = NULL, velocity = NULL, above = NULL)

Arguments

marking

A single character, which represents the dynamic symbol on the score. If marking is on the list in the Details section, and velocity is not specified, the corresponding velocity on the list will be used. Otherwise, velocity must be specified, or the Dynamic will have no sound effect.

i

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

to

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

velocity

Optional. A single integer between 0 and 127, which indicates the loudness of the Dynamic.

above

Optional. A single logical, which indicates whether the dynamic symbol should appear above or below the staff.

Details

Common used dynamic markings and their velocities in MuseScore:

Value

A list of class Dynamic.

See Also

+.Music() for adding an Dynamic to a Music object.

Examples

# Create a `Dynamic`
f <- Dynamic("f", 1)
f

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

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

[Package gm version 2.0.0 Index]