duration | R Documentation |
Output is numeric
(real number).
If duration()
is applied to a humdrumR data class
you may use the data's fields as arguments.
If no field names are specified, the first selectedField is used as x
.
If quarters()
is applied to a humdrumR data class
you may use the data's fields as arguments.
If no field names are specified, the first selectedField is used as x
.
## Default S3 method:
duration(x, ..., parseArgs = list(), scale = 1, unit = 1, inPlace = FALSE)
humData |> select(Token) |> duration()
humData |> duration(Token)
humData |> duration(simple = TRUE)
duration(x, ..., parseArgs = list(), scale = 1, unit = 1, inPlace = FALSE)
## Default S3 method:
quarters(x, ..., parseArgs = list(), scale = 1, unit = 1, inPlace = FALSE)
humData |> select(Token) |> quarters()
humData |> quarters(Token)
humData |> quarters(simple = TRUE)
quarters(x, ..., parseArgs = list(), scale = 1, unit = 1, inPlace = FALSE)
x |
An input vector. The Must be parsable as rhythm infromation. |
... |
Arguments passed to the rhythm parser. There are also two hidden (advanced) arguments you can specify: |
scale |
A Defaults to Must be |
inPlace |
Should non-rhythm information be retained in the output string? Defaults to Must be a singleton Defaults to A singleton See "Grace notes" section below. |
To better understand how this function works, read about the family of rhythm functions, or how rhythms are parsed and deparsed.
Other rhythm functions:
grid()
,
notehead()
,
recip()
tokens <- c('4.GG', '8G', '16E', '16F#', '16G', '16D', 'q8D#', '4E')
duration(tokens)
quarters(tokens, parse(grace = NA))
quarters(tokens, inPlace = TRUE)
## Not run:
B075 <- readHumdrum(humdrumRroot, "HumdrumData/BeethovenVariations/B075_00_05_a.krn")
with(B075, subset = Spine > 2, duration(Token))
with(B075, subset = Spine > 2, quarters(Token))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.