# Digital Signal Processing of the Inharmonic Complex Tone
## 2 DSP Algorithms Used for the Analysis of String Instruments' Recordings
### Envelope Estimation  
By the proposed digital filter bank, an array of \(N+2\) subchannel signals is obtained, \(\{x_{n}[k]\}\), \(k\) = 0, 1, \(\ldots\), \(K\)\(-\)1, \(n\) = 0, 1, \(\ldots\), \(N+1\). Each element of the array is a signal of the same length \(K\) as the selected segment of the recorded signal. If the bank parameters are properly chosen, for channels 1 to \(N\), the content corresponds to one harmonic partial of the signal. The signals \(x_{n}[k]\) can be further analyzed in the time and frequency domains. The estimation of the envelope of a musical signal can be performed in various ways; an overview of methods is presented in [33; 34]. Having in mind that in this case signals are prefiltered, i.e., can be classified as narrow band signals, in the proposed application, the estimation by Hilbert transform is applied  
\[A_{n}[k]=\sqrt{x_{n}^{2}[k]+\hat{x}_{n}^{2}[k]}, \tag{17}\]  
where \(\hat{x}_{n}[k]\) is the Hilbert transform of \(x_{n}[k]\). In some cases, it is useful to express envelopes mathematically. In the proposed application, the approximation equation is a modified version of the expression proposed in [35]:  
\[A_{n}^{fit}[k]=A_{n1}(t[k])^{A_{n2}-1}A_{n3}^{-\frac{t[k]-A_{n4}}{A_{n5}}}, \tag{18}\]  
where parameters \(A_{n1}\)-\(A_{n5}\) are calculated by fitting the envelope \(A_{n}[k]\) in MATLAB by the fit function [36]. In Table 2, the starting, minimum, and maximum input values for all parameters are provided. The other input parameters of the fit function are set to default values.  
The proposed approach is simplified compared to [35] because the signal is not split into segments traditionally used in music tone analysis and synthesis [37]. Instead, an additional component is inserted into the (18). The reason is that the proposed application is intended for the rapid automatic processing of recordings, with only a very limited set of allowed modifications and recombination of subchannel signals. On the other hand, the extracted envelopes usually are not perfect, i.e., additional smoothing or other preprocessing is needed before the split-point detection [33; 35]. Having that in mind, the expression (18) is chosen as a compromise between the perfect envelope fit and the  
\begin{table}
\begin{tabular}{c c c c} \hline
**Parameter** & **Starting Value** & **Min. Value** & **Max. Value** \\ \hline \(A_{n1}\) & 0.5 & \(1\times 10^{-6}\) & 10 \\ \(A_{n2}\) & 2 & 1.001 & Inf \\ \(A_{n3}\) & \(e\) & 0.1 & Inf \\ \(A_{n4}\) & 0 & \(-0.5\) & 0.5 \\ \(A_{n5}\) & 2 & \(1\times 10^{-6}\) & Inf \\ \hline \end{tabular}
\end{table}
Table 2: The input values of the parameters (14) for the MATLAB function fit.  
complexity of the solution. This proposed form of the envelope expression (18) has been experimentally proven to be sufficient for the automatic processing of most test signals, in the expected scenario of application usage. However, if there is a need for different approaches, the modular form of the current application allows adding new modules or replacing the third submodule that uses the described approach of envelope approximation.