The noise term fr s denotes the amount of accentuation (that is deliberately playing a note ahead or back in time) without causing the tempo to be changed. We assume ( Th ~ N(0, Q,). Ideal onsets and actually observed "noisy" onsets are related by

$$\begin{array}{r c l}{{y_{k}}}&{{=}}&{{\tau_{k}\,+\,\epsilon_{k}}}\end{array}$$
$\left(\mathrm{f}_{\mathrm{o}}\right)$. 
The noise term ek models small scale expressive deviations or motor errors in timing of individual notes. In this paper we will assume that ε k has a Gaussian distribution parameterized by N (0, R).

The initial tempo distribution p ( Δ 0 ) specifies a range of reasonable tempi and is given by a Gaussian with a broad variance. We assume an uninformative (flat) prior on τ 0 . The conditional independence structure is given by the graphical model in Figure 1. Table 1 shows a possible realization from the model.

We note that our model is a particular instance of the well known switching state space model (also known as conditionally linear dynamical system, jump Markov linear system, switching Kalman filter) (See, e.g.,  Bar-Shalom & Li, 1993; Doucet & Andrieu, 2001; Murphy, 2002).

| 0   |      |      |      |      |
|-----|------|------|------|------|
| t   |      |      |      |      |
| T k | t    | t    | t    |      |
| 0   | 1/2  | 3/2  | 2    |      |
| C   | ..   |      |      |      |
| A   | 0.5  | 0.6  | 0.7  |      |
| 0   | 0.25 | 0.85 | 1.20 |      |
| T   | 0    | 0.23 | 0.88 | 1.24 |
| Y   |      |      |      |      |

Table 1: A possible realization from the model: a ritardando. For clarity we assume ( r = 0.

In the following sections, we will sometimes refer use zk = ( Tk , Ak ) T and refer to zo: K
as a tempo trajectory. Given this definition, we can compactly represent Eq. 4 and Eq. 5 by

$$\begin{array}{r c l}{{z_{k}}}&{{=}}&{{\left(\begin{array}{l l}{{1}}&{{\gamma_{k}}}\\ {{0}}&{{1}}\end{array}\right)z_{k\,-\,1}\,+\,\zeta_{k}}}\end{array}$$
$$\left(7\right)$$

where $\zeta_k\,=\,\left(\zeta_{\tau_k},\,\zeta_{\Delta_k}\right)$. 

## 2.3 Extensions

There are several possible extensions to this basic parameterization. For example, one could represent the period ∆ in the logarithmic scale. This warping ensures positivity and seems to be perceptually more plausible since it promotes equal relative changes in tempo rather than on an absolute scale  (Grubb, 1998; Cemgil et al., 2001). Although the resulting model becomes nonlinear, it can be approximated fairly well by an extended Kalman filter (Bar-
Shalom & Li, 1993).

A simple random walk model for tempo fluctuations such as in Eq. 7 seems not to be very realistic. We would expect the tempo deviations to be more structured and smoother.