Velocity {gm} | R Documentation |
Create Velocity
Object
Description
Create a Velocity
object to set some notes' velocities.
Usage
Velocity(velocity, to = NULL, i = NULL, j = NULL)
Arguments
velocity |
A single integer between |
to |
Optional. A single character or a single positive integer, which indicates the musical line where to apply the velocity. If not provided, the velocity will be applied to all notes. |
i |
Optional. A single positive integer, which represents the position of the velocity in a musical line. |
j |
Optional. A single positive integer, which represents the position of the velocity in a chord. |
Value
A list of class Velocity
.
See Also
Examples
# Create a `Velocity`
velocity <- Velocity(10)
velocity
# Add it to a `Music`
music <- Music() + Meter(4, 4) + Line(c("C4", "D4")) + velocity
music
# Generate the music score
if (interactive()) {
show(music)
}
[Package gm version 2.0.0 Index]