(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.

lettervalue  lettervalue
mmaxima  qquarter
llonga  eeighth
bbrevis  ssixteenth
wwhole  tthirty-second
hhalf  xsixty-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 sixteenthts.
triple dotted halfh...
quintuplet wholeqw
sixteenth plus triplet quarters+tq
whole minus triplet sixteenthw-ts
whole times 4w*4


Example 1. Calculating rhythmic values.

(rhythm 'q)
(rhythm 1/4 120.0)
(rhythm 'w+q )
(define *tempo* 120.0)

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

See also: