## 3 Adaptive Sinusoidal Modeling with eaQHM
### The Quasi-Harmonic Model (QHM)  
QHM [48] projects \(x\left(n,m\right)\) onto a template of sinusoids \(e^{\left|2\pi n\hat{f}_{k}/f_{s}\right.}\) with constant frequencies \(\hat{f}_{k}\) and sampling frequency \(f_{s}\). QHM estimates the parameters of \(\hat{x}\left(n,m\right)\) using  
Figure 3: Illustration of the adaptation of the frequency trajectory of a sinusoidal partial inside the analysis window in eaQHM. The figure depicts the first and second iterations of eaQHM around the loop in Figure 2, showing local adaptation as the iterative projection of the original waveform onto the model.  
Figure 2: Block diagram depicting the modeling steps in the extended adaptive Quasi-Harmonic Model (eaQHM). The blocks with a dark background correspond to parameter estimation, while the feedback loop illustrates adaptation as iteration cycles around the loop. See text for the explanation of the symbols.  
\[\hat{x}\left(n,m\right)=\sum_{k=-K}^{K}\left(\mathbf{a}_{k}+n\mathbf{b}_{k}\right)e^ {j2\pi\hat{f}_{k}n/f_{s}}, \tag{3}\]  
where \(k\) is the partial number, \(K\) is the number of real sinusoids, \(\mathbf{a}_{k}\) the complex amplitude and \(\mathbf{b}_{k}\) is the complex slope of the \(k^{\text{th}}\) sinusoid. The term \(n\mathbf{b}_{k}\) arises from the derivative of \(e^{j2\pi n\hat{f}_{k}/f_{s}}\) with respect to frequency. The constant frequencies \(\hat{f}_{k}\) define the spectral template used by QHM to fit the analysis parameters \(\mathbf{a}_{k}\) and \(\mathbf{b}_{k}\) by least-squares (LS) [44; 45]. In principle, any set of frequencies \(\hat{f}_{k}\) can be used because the estimation of \(\mathbf{a}_{k}\) and \(\mathbf{b}_{k}\) also provides a means of correcting the initial frequency values \(\hat{f}_{k}\) by making \(\hat{f}_{k}\) converge to nearby frequencies \(f_{k}\) present in the signal frame. The mismatch between \(f_{k}\) and \(\hat{f}_{k}\) leads to an estimation error \(\eta_{k}=f_{k}-\hat{f}_{k}\). [PERSON] _et al._[48] showed that QHM provides an estimate of \(\eta_{k}\) given by  
\[\hat{\eta}_{k}=\frac{f_{s}}{2\pi}\frac{\text{Re}\left\{\mathbf{a}_{k}\right\} \text{Im}\left\{\mathbf{b}_{k}\right\}-\text{Im}\left\{\mathbf{a}_{k}\right\} \text{Re}\left\{\mathbf{b}_{k}\right\}}{|\mathbf{a}_{k}|^{2}}, \tag{4}\]  
which corresponds to the frequency correction block in Figure 2. Then \(\hat{x}\left(n,m\right)\) is locally synthesized as  
\[\hat{x}\left(n,m\right)=\sum_{k=-K}^{K}\hat{a}_{k}e^{j\left(2\pi\hat{f}_{k}n/ f_{s}+\hat{\phi}_{k}\right)}, \tag{5}\]  
where \(\hat{a}_{k}=|\mathbf{a}_{k}|\), \(\hat{F}_{k}=\hat{f}_{k}+\hat{\eta}_{k}\), and \(\hat{\phi}_{k}=\angle\mathbf{a}_{k}\) are constant inside the frame \(m\).  
The full-band harmonic spectral template shown in Figure 1b is obtained by setting \(\hat{f}_{k}=kf_{0}\) with \(k\) an integer and \(1\leq k\leq f_{s}/2_{0}\). The \(f_{0}\) is not necessary to estimate the parameters, but it improves the fit because the initial full-band harmonic template approximates better the spectrum of isolated quasi-harmonic sounds. QHM assumes that the sound being analyzed contains a single source, so, for isolated notes from pitched musical instruments, a constant \(f_{0}\) is used across all frames \(m\).