rhythm

[Function]
  `(``rhythm` rhythm [tempo] [beat])

Returns the value of rhythm converted to seconds. Rhythm can be a proportion (number), a rhythmic symbol or a list of the same. The optional tempo is a metronome speed, and defaults to `*tempo*`. The optional Beat parameter specifies the metronome's pulse and defaults to `*beat*`.

A rhythmic symbol consists of a metric letter (Table 1) that may be optionally preceded by a division letter: `t` for triplet or `q` for quintuplet, and optionally followed by any number of dots. Rhythmic symbols can be combined into simple expressions involving addition, subtraction and multiplication.

Table 1. Table of metric letter.

letter | value |  | letter | value
--- | --- | --- | --- | ---
`m` | maxima |  | `q` | quarter
`l` | longa |  | `e` | eighth
`b` | brevis |  | `s` | sixteenth
`w` | whole |  | `t` | thirty-second
`h` | half |  | `x` | sixty-fourth

Table 2 contains some examples of representative rhythmic tokens.

Table 2. Examples of rhythmic symbols and expressions.

type | symbol
--- | ---
quarter | `q`
triplet quarter | `tq`
dotted-eight | `e.`
triplet dotted sixteenth | `ts.`
triple dotted half | `h...`
quintuplet whole | `qw`
sixteenth plus triplet quarter | `s+tq`
whole minus triplet sixteenth | `w-ts`
whole times 4 | `w*4`

#### Examples:

Example 1. Calculating rhythmic values.

    (rhythm 'q)
    ⇒ 1.0
    (rhythm 1/4 120.0)
    ⇒ .5
    (rhythm 'w+q )
    ⇒ 5.0
    (define *tempo* 120.0)

    (rhythm '(q th e.. x) )
    ⇒ (0.5 0.6666666666666666 0.4375 0.03125)

#### See also:

- `*beat*` [Variable]
- `*tempo*` [Variable]