## 2 Materials and Methods
### Multi-Time-Scale Feature Extraction
#### 2.2.1 Short-Term Features  
For the short-term analysis, we considered features in the time domain, features in the frequency domain, ceptral features and chroma for a total of 33 short-term features. We divided the input track into short-term windows and defined \(x_{i}(n)\) with \(n=1,\ldots,N\) being the sequence of sound intensities contained in the \(i-\)th window. In the time domain, we considered the zero crossing rate \(ZCR_{i}\)[28]:  
\[ZCR_{i}=\frac{1}{2N}\sum_{n=1}^{N}|sgn[x_{i}(n)]-sgn[x_{i}(n-1)]| \tag{1}\]  
with  
\[sgn(x)= \begin{cases}1&\text{if }x\geq 0\\ -1&\text{if }x<0\end{cases}  \tag{2}\]  
and the entropy of energy \(H_{i}\)[29]:  
\[H_{i}=-\sum_{j=1}^{K}e_{j}log_{2}e_{j} \tag{3}\]  
Figure 3: Pictorial representation of the feature extraction procedure. After dividing the input track into windows of 0.25 s, we estimated 33 short-term features. For each window and from the distribution of each of these 33 features, we calculated 10 statistical moments. where \(e_{j}\) is the ratio between the energy of the \(j\)-th interval of K frames in which we divided the \(i\)-th short-term window and the energy \(E_{i}\) of the \(i\)-th short-term window, defined as [30]:  
\[E_{i}=\sum_{n=1}^{N}|x_{i}(n)|^{2}. \tag{4}\]  
In the frequency domain, we computed the spectral centroid \(C_{i}\)[31]:  
\[C_{i}=\frac{\sum_{n=1}^{N/2}nX_{i}(n)}{\sum_{n=1}^{N/2}X_{i}(n)} \tag{5}\]  
and its spectral spread \(S_{i}\)[32]:  
\[S_{i}=\sqrt{\frac{\sum_{n=1}^{N/2}(n-C_{i})^{2}X_{i}(n)}{\sum_{n=1}^{N/2}X_{i}( n)}} \tag{6}\]  
where \(X_{i}(n)\), with \(n=1,\ldots,N\) being the Fourier coefficients obtained by applying the discrete Fourier transform (DFT) on the \(i\)-th short-term window. In addition, we evaluated the spectral entropy \(SH_{i}\)[33]:  
\[SH_{i}=-\sum_{j=1}^{K}n_{j}log_{2}n_{j} \tag{7}\]  
with  
\[n_{j}=\frac{E_{j}}{\sum_{j=1}^{K}E_{j}} \tag{8}\]  
\(E_{j}\) (\(j=1,\ldots,K\)) represents the energy estimated on one of the \(K\) bins in which we divided the window. Furthermore, we computed the spectral flux \(Fl\)[34] as a measure of the spectral variation between two consecutive short-term windows \(i-1\) and \(i\):  
\[Fl(i,i-1)=\sum_{n=1}^{N/2}(EN_{i}(n)-EN_{i-1}(n))^{2} \tag{9}\]  
where  
\[EN_{i}(n)=\frac{X_{i}(n)}{\sum_{n=1}^{N/2}X_{i}(n)}. \tag{10}\]  
The other considered features that we computed were the spectral roll-off [35], Mel-frequency cespstrum coefficients (MFCCs) [36; 37] and the chroma vector [38]. The spectral roll-off \(R\) is defined as:  
\[R=C\sum_{n=1}^{N/2}X_{i}(n) \tag{11}\]  
where \(C\) is a threshold frequency below which most (typically 90%) of the spectral amplitude distribution is concentrated. MFCCs were derived from a representation of the spectrum in which frequency bands were evenly distributed with respect to the Mel scale. Frequencies \(f_{Mel}\) in the Mel scale were related to frequencies in Hz \(f_{Hz}\) by the relation  
Figure 3:0  
MFCCs were computed through the following steps:  
1. Calculate the DFT of the signal in the short-term window;
2. Identify M equally spaced frequencies on the Mel scale and build a bank of triangular spectral filters \(F_{j}\) with \(j=1,\ldots,M\) centered on each corresponding M frequency in Hz;
3. Evaluate the spectral output powers \(O_{j}\) of each filter \(F_{j}\);
4. Estimate MFCCs as Figure 3:1 (13)  
with \(m=1,\ldots,M\). In the present work, we considered the first 13 MFCCs because they were deemed to contain sufficient discriminatory information in order to perform various classification tasks [27]. The chroma vector is a \(12-\)element representation of the spectral energy and is calculated by grouping the DFT coefficients of the short-term window into 12 frequency classes related to semitone spacing. For each class \(q\) in \(1,\ldots,12\), the q-th chroma element \(v_{q}\) is defined as the following ratio:  
Figure 3:2  
where \(S_{q}\) is the subset of frequencies belonging to class \(q\), and \(N_{q}\) is the number of elements in \(S_{q}\).