# A Novel Tempogram Generating Algorithm Based on Matching Pursuit
## 4 Discussion
### Tempo Resolution  
As mentioned in the section of tempo dictionary, tempo resolution is defined as the distance between the two valid adjacent tempi in the tempogram. To some extent, tempo resolution is just like the frequency resolution, but not the same. The word \"valid\" here means that the tempo can be computed, but not estimated. Apparently, the bigger the distance is, the worst the resolution is. On the contrary, the smaller the distance is, the better the resolution is. In the tempogram image, the tempo resolution indicates the recognizability or the clarity of the tempo. Under the condition that the tempo resolution is the same, we can judge which is the better algorithm by the image. Generally, the tempo resolution should be smaller than 1. According to the annotation data of MIREX (Music Information Retrieval Evaluation eXchange), the tempo precision is 0.5. When considering the tempo resolution of ACF, the distance of the adjacent tempi is \(\Delta\tau=60\cdot f_{s}\cdot(\frac{1}{n}-\frac{1}{n+1})=\frac{60\cdot f_{s}} {n\cdot(n+1)}\), where \(n\) is the lag. It indicates that the resolution is getting worse with the lag decreasing. Following the paper [8], we let \(f_{s}=1/0.023=43.5\). Then, if \(l=51(\tau=51.2)\), we can get the resolution \(\Delta\tau=0.98\). But, if \(l<51\), the resolution will be \(\Delta\tau>1\). For example, if \(l=21(\tau=124.2)\), then the resolution will be \(\Delta\tau=5.6\). However, the tempi around 120 bpm are frequently used in all kinds of music, and evidently, the tempo resolution of ACF is not enough. If \(l<21\), then the resolution will be even worse. In conclusion, the resolution of ACF is not constant, and if \(\tau>51\) bpm \((l<51)\), the resolution cannot satisfy with our requirement. When considering the method of DFT [11], because the Hann-window length is 6 s, the tempo resolution is \(\Delta\tau=60\cdot f_{s}/N=60/6=10\) bpm. Apparently, it is not enough for the accuracy of the tempo. Inspecting the method of FT [8], it computed the frequency coefficients corresponding to the tempi by Discrete Time Fourier Transform (DTFT). It looks like it can calculate the coefficient at any frequency, but in fact, it only approximately samples the coefficients on the discretized frequency band. We can judge how the algorithm is by the tempogram image further. To judge which algorithm produces the best resolution of the image, we chose a clip (train\(1.\)wav) that was downloaded from MIREX dataset [34] for demonstration. The musical signal and the corresponding novelty curve are shown in the Figure 3. The sample rate is 22,050 Hz and the ground truth tempo is roughly 129.5 bpm. All of the experiments below were performed on this clip. To compare the tempo resolution, we show three tempograms of the clip in the Figure 4, in which the tempogram of Figure 4a-c are created by the methods of ACF, FT, and our MP, respectively. For comparative purposes, all of the tempo resolutions are set to 1, that is to say, the coefficients must be computed or estimated at all of the integral tempi of the band \(\tau\in[30,600]\), \(\tau\in\mathbb{N}\). Therefore, we can judge which algorithm is the best by the clarity of the images. For FT, we discretized the parameter \(\omega\) following the papers [8; 33], so that the coefficients of the integral tempi could be computed. For ACF, in order to generate 571 coefficients at the integral tempi, we must estimate. Especially for the tempo band \(\tau>51\), we must interpolate. For MP, the number of coefficients is determined by the number of iteration. Therefore, we set the number of iterations of MP to 571, so that the coefficients have the ability to cover all of the integral tempi. Significantly, there are many zero or near-zero coefficients among them. We set the tempo resolution to 1 when transforming the set of tempo to the set of frequency, and set the hop size to 2 when shifting the mother atoms. Consequently, we can see some broad, or narrow horizontal stripes in the Figure 4a,b, but Figure 4c presents the clear points or lines.