mances of "Yesterday" as training data. Similarly, the score prior parameters are estimated by frequency counts from the score of "Yesterday" 6 . All tests are carried out on "Michelle".

## 4.2.3 Results

In Figure 9 we show the result of typesetting a performance with and without tempo tracking. Due to fluctuations in tempo, the quality of the automatically generated score is very poor. The quality can be significantly improved by using our model.

Figure 10 shows some tempo tracking examples on Michelle dataset for pianists from different background and training. We observe that in most cases the results are satisfactory.

In Figure 11, we give a summary of test results on Michelle data in terms of the loglikelihood and edit distance as a function of model order and number of particles used for inference. Figure 11(a) shows that the median likelihood on test data is increasing with model order. This suggests that a higher order filter is able to capture structure in pianists' expressive timing. Moreover, as for the sythetic data, we see a somewhat monotonic increase in the likelihood of solutions found when using more particles.

The edit distance between the original score and the estimates are given in Figure 11(b).

Since both pieces are arranged for piano, due to polyphony, there are many onsets that are associated with the same quantization location. Consequently, many ^^^^^^ in the original ssore are effectively zero. In such cases, typically, the corresponding inter onset interval Yk = Yk = 1 is also very small and the correct quantization (namely γk = 0) can be identified en if the tempo estimate is completely wrong.  As a consequence, the edit distance remains small. To make the task slightly more challenging, we exclude the onsets with γ frue = 0 from edit distance calculation.

We observe that the extra prediction ability obtained using a higher order model does not directly translate to a better transcription. The errors are around 5% for all models.

On the other hand, the variance of edit distance for higher order models is smaller.  This suggests that higher order models tend to be more robust against divergence from the original tempo track.

## 5. Discussion

We have presented a switching state space model for joint rhythm quantization and tempo tracking. The model describes the rhythmic structure of musical pieces by a prior distribution over quantization locations. In this representation, it is easy to construct a generic prior that prefers simpler notations and to learn parameters from a data set. The prior on quantization locations c 0 : K translates to a non-Markovian distribution over a score γ 1 : K .

Timing deviations introduced by performers (tempo fluctuation, accentuations and motor errors) are modeled as independent Gaussian noise sources. Performer specific timing preferences are captured by the parameters of these distributions.

Given the model, we have formulated rhythm quantization as a MAP state estimation problem and tempo tracking as a filtering problem.  We have introduced Markov chain