# A Novel Tempogram Generating Algorithm Based on Matching Pursuit
## 4 Discussion
### Similarity  
Similarity is very important because we derive the periodicity from the similarity between the novelty curve and the compared curves. Our algorithm can provide more similar curves to compare. To explain this point, we calculated the Spearman correlation coefficients between all of the frames of the novelty curve and their corresponding most similar curves of ACF, FT, and MP respectively. For ACF, the most similar curve corresponding to the original frame of the novelty curve is the curve with the biggest autocorrelation coefficient. We can obtain the most similar curve according to the information of the corresponding lag. For FT, the most similar curve is the curve of the Fourier basis with the biggest Fourier coefficient. For MP, the most similar curve is the curve of the tempo atom with the biggest MP coefficient. Table 1 shows the statistic information of the Spearman correlation coefficients, in which the experiments were performed on the clip train1.wav, as well and the resolutions were set to 0.5 for all of the algorithms. The comparison of the means and variances indicates that the curves that were most similar to the original frames were from MP.  
Figure 3: The musical signal (**a**) and the corresponding novelty curve (**b**) of the clip (train1.wav).  
Figure 4: Comparison of tempograms: (**a**) autocorrelation function (ACF) tempogram; (**b**) Fourier transform (FT) tempogram; (**c**) Matching Pursuit (MP) tempogram. All of the tempograms are computed or interpolated to ensure the resolutions to be 1 for comparison.  
Figure 5 shows example curves of ACF, FT, and MP most similar to the 20 th frame of the novelty curve. For ACF, in theory, the most similar curve is itself, that is to say, \(lag=0\) or \(lag\)_near to 0_. However, it is beyond the tempo band we can perceive because the corresponding tempo to \(lag=1\) is 2610 bpm (\(f_{s}=1/0.023=43.5\)[8]). Figure 5b shows the most similar curve that we computed through ACF, in which the corresponding lag is \(lag=47\). Visually, some people may regard the curve from ACF as the most similar curve to the frame of the novelty curve, but actually, many peaks are not incongruuous with the peaks of the frame. Figure 5c shows the most similar Fourier basis, where it is notable that the amplitudes of the basis include not only the positive part, but also the negative part. Figure 5d shows the most similar curve that was derived from MP, where the amplitudes only keep the positive part, which is more consistent with the novelty curve. The Spearman correlation coefficients between Figures 5a and 5b-d are 0.73, 0.34, and 0.83. It indicates that the most similar curve to Figure 5a is Figure 5d.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithm** & **ACF** & **FT** & **MP** \\ \hline mean & 0.55 & \(-0.002\) & 0.80 \\ variance & 0.11 & 0.54 & 0.08 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of the Spearman correlation coefficients.  
Figure 5: The most similar curves. (**a**) The 20 th frame of the novelty curve of train1; (**b**) The most similar curve of ACF; (**c**) The most similar curve of FT; (**d**) The most similar curve of MP.