Tempo {gm}R Documentation

Create Tempo Object

Description

Create a Tempo object to represent a tempo marking.

Usage

Tempo(tempo, unit = NULL, bar = NULL, offset = NULL, marking = NULL)

Arguments

tempo

A positive number, which indicates the number of quarter notes per minute.

unit

Deprecated. Was used to specify the beat unit. Please use marking instead.

bar

Optional. A positive integer, which indicates the number of the measure where to add the tempo. By default, it will be added at the first measure.

offset

Optional. A non-negative number, which indicates the tempo's position in a measure. The default value is 0.

marking

Optional. A single character, which represents the marking that appears on the score. See the Details section.

Details

The parameter tempo is used to specify the actual playback speed, while marking to represent the marking that appears on the score.

Some examples:

Value

A list of class Tempo.

See Also

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

Examples

# Create a tempo
tempo <- Tempo(50, marking = "Adagio (half = 25)")
tempo

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

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

[Package gm version 2.0.0 Index]