# Improving the Robustness of DTW to Global Time Warping Conditions in Audio Synchronization
## 3 Results
### Experimental Setup  
Our benchmark is a modification of the Mazurka Dataset [46]. The Mazurka Dataset contains historic audio recordings of five Chopin Mazurkas, along with beat-level annotations. This dataset has been used to study various audio-related tasks that require precise timing information, such as audio synchronization, beat tracking, and tempo estimation (e.g., [18; 35; 47; 48]). Table 1 shows the number of recordings for each Mazurka and descriptive statistics for the recording duration. For each Mazurka, every possible pairing of recordings is considered, the two recordings are aligned, and the predicted alignment is compared to the ground truth annotations to evaluate alignment accuracy. Note from Table 1 that the global time warping conditions in the original dataset range from 1 to 2.3 (between the longest and shortest recordings for Opus 63, No 3). We set aside the Op. 17 No. 4 and Op. 63 No. 3 Mazurkas for training/development and used the remaining three Mazurkas for testing. Because our interest in this work is in the alignment algorithm, in all experiments we simply use standard chroma features and a cosine distance metric. For computing chroma features, we used librosa [49] with default settings: 22,050 Hz sampling rate, 512 sample hop length, and spanning seven octaves between C1 and C8. We created seven different modified versions of the Mazurka Dataset. Our goal was to construct datasets that would allow us to measure alignment accuracy across a wide range of carefully controlled global time warping conditions. The modified datasets were constructed in the following manner. First, for each Mazurka, we calculated the median duration of all recordings, which we denote as \(L_{med}\). In Table 2, the \(L_{med}\) values for each Mazurka are indicated in the column labeled \"\(\times\)1.000\". Second, we determined a set of seven target durations: \(0.500L_{med}\), \(0.630L_{med}\), \(0.794L_{med}\), \(1.000L_{med}\), \(1.260L_{med}\), \(1.588L_{med}\), and \(2.000L_{med}\). Note that these target durations are spaced evenly on a log scale and span a factor of \(\frac{2.000}{0.500}=4\). Finally, we time-scale modified each individual recording to its target durations, and also modified the beat annotations accordingly. Time-scale modification (TSM) is a technique in which the tempo (and thus duration) of a piece of music is altered without changing the pitch. We used the approach described in [50], in which the audio waveform is first separated into percussive and harmonic components, the percussive component is time-scale modified with a basic overlap-add method, the harmonic component is time-scale modified with a phase vocoder [51], and the resulting time-scale modified components are added. (Note that most existing implementations of TSM use a hop size that is rounded to the nearest audio sample, which results in an \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Piece** & **Files** & **Median** & **Mean** & **Std** & **Min** & **Max** \\ \hline Opus 17, No 4 & 64 & 254.9 & 259.7 & 32.5 & 194.4 & 409.6 \\ Opus 63, No 3 & 88 & 128.2 & 129.0 & 13.4 & 96.2 & 162.9 \\ \hline Opus 24, No 2 & 64 & 136.7 & 137.5 & 13.9 & 109.6 & 180.0 \\ Opus 30, No 2 & 34 & 87.3 & 85.0 & 9.2 & 68.0 & 99.0 \\ Opus 68, No 3 & 51 & 99.6 & 101.1 & 19.4 & 71.8 & 164.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Overview of the original Chopin Mazurka dataset [46]. This is used as the source data to generate a benchmark suite in which the global average time warping factor is controlled. The top two pieces are used for training and the bottom three pieces are used for testing. All durations are in seconds. effective TSM factor that is slightly different than what is specified. Because we wanted precise control over the recording durations, we implemented our TSM from scratch, including a re-implementation of the STFT function that allows for a non-integer hop size in samples.)