Skip to contents

In humdrumR, we define a tatum as the greatest common denominator of a set of durations. In other words, given a set of durations, the largest duration that divides all the given beats is the tatum—a common unit which can measure any of the other durations

Usage

tatum(x, ...)

# S3 method for class 'meter'
tatum(x, deparser = recip)

# S3 method for class 'character'
tatum(x, deparser = recip)

# S3 method for class 'numeric'
tatum(x, deparser = duration)

# S3 method for class 'rational'
tatum(x)

# S3 method for class 'token'
tatum(x)

# S3 method for class '`NULL`'
tatum(x)

Arguments

x

*The input to compute the tatum of.

Must be a meter() object, a singleton character value, or vector of either character, numeric, or rational() values.

For character input, valuest that match the regular expression "^\*?M" are parsed as a time signature using meter(), while other strings are parsed as durations using rhythmInterval(). numeric input is also parsed using rhythmInterval(); parse failures result in errors.

deparser

What output format is desired?

For character or meter input, the default is recip(); for numeric input, the default is duration().

Must be a rhythm function or NULL.

Details

tatum() is a generic function; it can read any input which can be parsed by the rhythm parser. If can also take a meter() object or character string of the form "MX/Y".

The tatum of a meter() is the tatum of all that meters metric levels. If meters and durations are provided—like tatum(c('M4/4', '6')— the tatum of all the meters' levels and all the durations is computed.

The deparser argument is a rhythm function which controls the output format. If deparser is NULL, the tatum is returned as a rational() value.

See also

Other Metric functions: meter, tactus()

Examples


tatum(c("4", "8", "12"))
#> **recip (character)
#> [1] 24

tatum(c("M4/4"))
#> [1] "16"
#> attr(,"Exclusive")
#> [1] "recip"

tatum(c('M4/4', '6'))
#> **recip (character)
#> [1] 48