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 |
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 |
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:
-
Tempo(50)
: the playback speed is 50 quarter notes per minute. A marking of "quarter = 50" will be added to the score. -
Tempo(50, marking = "Adagio")
: the playback speed is 50 quarter notes per minute, while the marking on the score is "Adagio". -
Tempo(50, marking = "Adagio half. = 20")
: the playback speed is 50 quarter notes per minute, while the marking on the score is "Adagio half. = 20". -
Tempo(50, marking = "Adagio (quarter = 45-80)")
: you can add a speed range and parentheses to the marking. -
Tempo(50, marking = "quarter. = quarter")
: you can also indicate metric modulations withmarking
.
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)
}